aboutsummaryrefslogtreecommitdiff
path: root/target/nios2
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-06-19 22:19:45 -0700
committerRichard Henderson <richard.henderson@linaro.org>2021-06-29 10:02:49 -0700
commita5f919d19c60d2085fdef4bf5c750b439c589c0a (patch)
treec86f5e0ebc86ec67124de2fb22042350be4c1b5d /target/nios2
parent50e1a0cd3cf7cc2b56fee6523882014fda95dc95 (diff)
target/nios2: Clean up goto in handle_instruction
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/nios2')
-rw-r--r--target/nios2/translate.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/target/nios2/translate.c b/target/nios2/translate.c
index 6fd4330b31..9e71267b42 100644
--- a/target/nios2/translate.c
+++ b/target/nios2/translate.c
@@ -753,7 +753,8 @@ static void handle_instruction(DisasContext *dc, CPUNios2State *env)
op = get_opcode(code);
if (unlikely(op >= ARRAY_SIZE(i_type_instructions))) {
- goto illegal_op;
+ t_gen_helper_raise_exception(dc, EXCP_ILLEGAL);
+ return;
}
dc->zero = NULL;
@@ -764,11 +765,6 @@ static void handle_instruction(DisasContext *dc, CPUNios2State *env)
if (dc->zero) {
tcg_temp_free(dc->zero);
}
-
- return;
-
-illegal_op:
- t_gen_helper_raise_exception(dc, EXCP_ILLEGAL);
}
static const char * const regnames[] = {