mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-02 10:21:10 +00:00
target/arm: optimize cross-page direct jumps in softmmu
Instead of unconditionally exiting to the exec loop, use the lookup_and_goto_ptr helper to jump to the target if it is valid. Perf impact: see next commit's log. Backports commit 7ad55b4ffd982c80f26f7f3658138d94cdc678e8 from qemu
This commit is contained in:
parent
e4dfb7f807
commit
5a42602b92
|
@ -4266,8 +4266,11 @@ static inline void gen_goto_tb(DisasContext *s, int n, target_ulong dest)
|
|||
gen_set_pc_im(s, dest);
|
||||
tcg_gen_exit_tb(tcg_ctx, (uintptr_t)s->tb + n);
|
||||
} else {
|
||||
TCGv addr = tcg_temp_new(tcg_ctx);
|
||||
gen_set_pc_im(s, dest);
|
||||
tcg_gen_exit_tb(tcg_ctx, 0);
|
||||
tcg_gen_extu_i32_tl(tcg_ctx, addr, tcg_ctx->cpu_R[15]);
|
||||
tcg_gen_lookup_and_goto_ptr(tcg_ctx, addr);
|
||||
tcg_temp_free(tcg_ctx, addr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue