aboutsummaryrefslogtreecommitdiff
path: root/accel
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-12-05 16:55:40 -0600
committerRichard Henderson <richard.henderson@linaro.org>2023-01-17 10:25:49 -1000
commit2fd2e78d1b5281d589eabdf31a21166c80bebd80 (patch)
tree700d3fbf2985621bd6d02736c11ea77ff9f80787 /accel
parent90c0fee3a28b25d23081b3c435762cadde813ec4 (diff)
downloadqemu-2fd2e78d1b5281d589eabdf31a21166c80bebd80.zip
qemu-2fd2e78d1b5281d589eabdf31a21166c80bebd80.tar.gz
qemu-2fd2e78d1b5281d589eabdf31a21166c80bebd80.tar.bz2
tcg: Remove TCG_TARGET_HAS_direct_jump
We now have the option to generate direct or indirect goto_tb depending on the dynamic displacement, thus the define is no longer necessary or completely accurate. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'accel')
-rw-r--r--accel/tcg/cpu-exec.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 37c5f91..04cd1f3 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -572,19 +572,18 @@ void cpu_exec_step_atomic(CPUState *cpu)
void tb_set_jmp_target(TranslationBlock *tb, int n, uintptr_t addr)
{
+ /*
+ * Get the rx view of the structure, from which we find the
+ * executable code address, and tb_target_set_jmp_target can
+ * produce a pc-relative displacement to jmp_target_addr[n].
+ */
+ const TranslationBlock *c_tb = tcg_splitwx_to_rx(tb);
+ uintptr_t offset = tb->jmp_insn_offset[n];
+ uintptr_t jmp_rx = (uintptr_t)tb->tc.ptr + offset;
+ uintptr_t jmp_rw = jmp_rx - tcg_splitwx_diff;
+
tb->jmp_target_addr[n] = addr;
- if (TCG_TARGET_HAS_direct_jump) {
- /*
- * Get the rx view of the structure, from which we find the
- * executable code address, and tb_target_set_jmp_target can
- * produce a pc-relative displacement to jmp_target_addr[n].
- */
- const TranslationBlock *c_tb = tcg_splitwx_to_rx(tb);
- uintptr_t offset = tb->jmp_insn_offset[n];
- uintptr_t jmp_rx = (uintptr_t)tb->tc.ptr + offset;
- uintptr_t jmp_rw = jmp_rx - tcg_splitwx_diff;
- tb_target_set_jmp_target(c_tb, n, jmp_rx, jmp_rw);
- }
+ tb_target_set_jmp_target(c_tb, n, jmp_rx, jmp_rw);
}
static inline void tb_add_jump(TranslationBlock *tb, int n,