Skip to content

Commit c769453

Browse files
wentongwupm215
authored andcommitted
target/nios2: in line the semantics of DISAS_UPDATE with other targets
In line the semantics of DISAS_UPDATE on nios2 target with other targets which is to explicitly write the PC back into the cpu state before doing a tcg_gen_exit_tb(). 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 42928f2 commit c769453

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

target/nios2/translate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,14 +865,14 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns)
865865
/* Indicate where the next block should start */
866866
switch (dc->is_jmp) {
867867
case DISAS_NEXT:
868+
case DISAS_UPDATE:
868869
/* Save the current PC back into the CPU register */
869870
tcg_gen_movi_tl(cpu_R[R_PC], dc->pc);
870871
tcg_gen_exit_tb(NULL, 0);
871872
break;
872873

873874
default:
874875
case DISAS_JUMP:
875-
case DISAS_UPDATE:
876876
/* The jump will already have updated the PC register */
877877
tcg_gen_exit_tb(NULL, 0);
878878
break;

0 commit comments

Comments
 (0)