]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/nios2: Clean up goto in handle_instruction
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 20 Jun 2021 05:19:45 +0000 (22:19 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 29 Jun 2021 17:02:49 +0000 (10:02 -0700)
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/nios2/translate.c

index 6fd4330b312e3ac6225669a9765080d85acd0c0c..9e71267b42fce0d9f8e5f70e9f12087a449c34ab 100644 (file)
@@ -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[] = {