Skip to content

Commit 42928f2

Browse files
wentongwupm215
authored andcommitted
target/nios2: add DISAS_NORETURN case for nothing more to generate
Add DISAS_NORETURN case for nothing more to generate because at runtime execution will never return from some helper call. And at the same time replace DISAS_UPDATE in t_gen_helper_raise_exception and gen_exception with the newly added DISAS_NORETURN. Signed-off-by: Wentong Wu <[email protected]> Message-id: [email protected] Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Peter Maydell <[email protected]>
1 parent 0b823cb commit 42928f2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

target/nios2/translate.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static void t_gen_helper_raise_exception(DisasContext *dc,
149149
tcg_gen_movi_tl(dc->cpu_R[R_PC], dc->pc);
150150
gen_helper_raise_exception(dc->cpu_env, tmp);
151151
tcg_temp_free_i32(tmp);
152-
dc->is_jmp = DISAS_UPDATE;
152+
dc->is_jmp = DISAS_NORETURN;
153153
}
154154

155155
static bool use_goto_tb(DisasContext *dc, uint32_t dest)
@@ -802,7 +802,7 @@ static void gen_exception(DisasContext *dc, uint32_t excp)
802802
tcg_gen_movi_tl(cpu_R[R_PC], dc->pc);
803803
gen_helper_raise_exception(cpu_env, tmp);
804804
tcg_temp_free_i32(tmp);
805-
dc->is_jmp = DISAS_UPDATE;
805+
dc->is_jmp = DISAS_NORETURN;
806806
}
807807

808808
/* generate intermediate code for basic block 'tb'. */
@@ -877,6 +877,7 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns)
877877
tcg_gen_exit_tb(NULL, 0);
878878
break;
879879

880+
case DISAS_NORETURN:
880881
case DISAS_TB_JUMP:
881882
/* nothing more to generate */
882883
break;

0 commit comments

Comments
 (0)