mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 12:35:36 +00:00
target/arm/translate: make DISAS_UPDATE match declared semantics
DISAS_UPDATE should be used when the wider CPU state other than just the PC has been updated and we should therefore exit the TCG runtime and return to the main execution loop rather assuming DISAS_JUMP would do that. Backports commit e8d5230221851e8933811f1579fd13371f576955 from qemu
This commit is contained in:
parent
7d02489baf
commit
63d40e1a55
|
@ -11609,16 +11609,9 @@ tb_end:
|
|||
case DISAS_NEXT:
|
||||
gen_goto_tb(dc, 1, dc->pc);
|
||||
break;
|
||||
default:
|
||||
case DISAS_UPDATE:
|
||||
gen_a64_set_pc_im(dc, dc->pc);
|
||||
/* fall through */
|
||||
case DISAS_JUMP:
|
||||
tcg_gen_lookup_and_goto_ptr(tcg_ctx, tcg_ctx->cpu_pc);
|
||||
break;
|
||||
case DISAS_EXIT:
|
||||
tcg_gen_exit_tb(tcg_ctx, 0);
|
||||
break;
|
||||
case DISAS_TB_JUMP:
|
||||
case DISAS_EXC:
|
||||
case DISAS_SWI:
|
||||
|
@ -11642,6 +11635,13 @@ tb_end:
|
|||
*/
|
||||
tcg_gen_exit_tb(tcg_ctx, 0);
|
||||
break;
|
||||
case DISAS_UPDATE:
|
||||
gen_a64_set_pc_im(dc, dc->pc);
|
||||
/* fall through */
|
||||
case DISAS_EXIT:
|
||||
default:
|
||||
tcg_gen_exit_tb(tcg_ctx, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12329,12 +12329,12 @@ tb_end:
|
|||
case DISAS_NEXT:
|
||||
gen_goto_tb(dc, 1, dc->pc);
|
||||
break;
|
||||
case DISAS_UPDATE:
|
||||
gen_set_pc_im(dc, dc->pc);
|
||||
/* fall through */
|
||||
case DISAS_JUMP:
|
||||
gen_goto_ptr(dc);
|
||||
break;
|
||||
case DISAS_UPDATE:
|
||||
gen_set_pc_im(dc, dc->pc);
|
||||
/* fall through */
|
||||
default:
|
||||
/* indicate that the hash table must be used to find the next TB */
|
||||
tcg_gen_exit_tb(tcg_ctx, 0);
|
||||
|
|
|
@ -156,7 +156,7 @@ static inline void gen_intermediate_code_a64(ARMCPU *cpu, TranslationBlock *tb)
|
|||
{
|
||||
}
|
||||
|
||||
static inline void gen_a64_set_pc_im(uint64_t val)
|
||||
static inline void gen_a64_set_pc_im(DisasContext *s, uint64_t val)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue