aboutsummaryrefslogtreecommitdiff
path: root/tcg/tci.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-01-29 22:11:43 -1000
committerRichard Henderson <richard.henderson@linaro.org>2021-03-17 07:24:44 -0600
commit1670a2b9bb3f109e87485385f05a641e3ada6c1c (patch)
tree8f19393ed6a82b81c1512bd8adcb2c52545abb24 /tcg/tci.c
parent158d38737bb4f23ef66b149e0897270dcaacfd12 (diff)
downloadqemu-1670a2b9bb3f109e87485385f05a641e3ada6c1c.zip
qemu-1670a2b9bb3f109e87485385f05a641e3ada6c1c.tar.gz
qemu-1670a2b9bb3f109e87485385f05a641e3ada6c1c.tar.bz2
tcg/tci: Reuse tci_args_l for goto_tb
Convert to indirect jumps, as it's less complicated. Then we just have a pointer to the tb address at which the chain is stored, from which we read. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/tci.c')
-rw-r--r--tcg/tci.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tcg/tci.c b/tcg/tci.c
index 71d6720..53e49cc 100644
--- a/tcg/tci.c
+++ b/tcg/tci.c
@@ -818,13 +818,11 @@ uintptr_t QEMU_DISABLE_CFI tcg_qemu_tb_exec(CPUArchState *env,
return (uintptr_t)ptr;
case INDEX_op_goto_tb:
- /* Jump address is aligned */
- tb_ptr = QEMU_ALIGN_PTR_UP(tb_ptr, 4);
- t0 = qatomic_read((int32_t *)tb_ptr);
- tb_ptr += sizeof(int32_t);
+ tci_args_l(&tb_ptr, &ptr);
tci_assert(tb_ptr == old_code_ptr + op_size);
- tb_ptr += (int32_t)t0;
+ tb_ptr = *(void **)ptr;
continue;
+
case INDEX_op_qemu_ld_i32:
t0 = *tb_ptr++;
taddr = tci_read_ulong(regs, &tb_ptr);