]> git.proxmox.com Git - mirror_qemu.git/commit
disas/nanomips: Replace exception handling
authorMilica Lazarevic <milica.lazarevic@syrmia.com>
Mon, 12 Sep 2022 12:26:32 +0000 (14:26 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 31 Oct 2022 10:32:07 +0000 (11:32 +0100)
commit39399c381d3bfc8f651f6d64f9f1f37d9763a8e3
treef304025b5eab751cc4817643eefeadfcab3a5bdd
parent3f2aec0778853afe190114bc6f1d18ab0239da09
disas/nanomips: Replace exception handling

Since there's no support for exception handling in C, the try-catch
blocks have been deleted, and throw clauses are replaced. When a runtime
error happens, we're printing out the error message. Disassembling of
the current instruction interrupts. This behavior is achieved by adding
sigsetjmp() to discard further disassembling after the error message
prints and by adding the siglongjmp() function to imitate throwing an
error. The goal was to maintain the same output as it was.

Signed-off-by: Milica Lazarevic <milica.lazarevic@syrmia.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220912122635.74032-22-milica.lazarevic@syrmia.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
disas/nanomips.cpp