[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 40/40] tcg/aarch64: Fix patching of LDR in tb_target_set_jmp_targe
From: |
Richard Henderson |
Subject: |
[PULL 40/40] tcg/aarch64: Fix patching of LDR in tb_target_set_jmp_target |
Date: |
Sat, 4 Feb 2023 06:33:10 -1000 |
'offset' should be bits [23:5] of LDR instruction, rather than [4:0].
Fixes: d59d83a1c388 ("tcg/aarch64: Reorg goto_tb implementation")
Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>
Reported-by: Zenghui Yu <yuzenghui@huawei.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/aarch64/tcg-target.c.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc
index fde3b30ad1..a091326f84 100644
--- a/tcg/aarch64/tcg-target.c.inc
+++ b/tcg/aarch64/tcg-target.c.inc
@@ -1914,7 +1914,7 @@ void tb_target_set_jmp_target(const TranslationBlock *tb,
int n,
ptrdiff_t i_offset = i_addr - jmp_rx;
/* Note that we asserted this in range in tcg_out_goto_tb. */
- insn = deposit32(I3305_LDR | TCG_REG_TMP, 0, 5, i_offset >> 2);
+ insn = deposit32(I3305_LDR | TCG_REG_TMP, 5, 19, i_offset >> 2);
}
qatomic_set((uint32_t *)jmp_rw, insn);
flush_idcache_range(jmp_rx, jmp_rw, 4);
--
2.34.1
- [PULL 30/40] target/s390x: Use Int128 for return from CKSM, (continued)
- [PULL 30/40] target/s390x: Use Int128 for return from CKSM, Richard Henderson, 2023/02/04
- [PULL 31/40] target/s390x: Use Int128 for return from TRE, Richard Henderson, 2023/02/04
- [PULL 32/40] target/s390x: Copy wout_x1 to wout_x1_P, Richard Henderson, 2023/02/04
- [PULL 33/40] target/s390x: Use Int128 for returning float128, Richard Henderson, 2023/02/04
- [PULL 35/40] target/s390x: Use tcg_gen_atomic_cmpxchg_i128 for CDSG, Richard Henderson, 2023/02/04
- [PULL 36/40] target/s390x: Implement CC_OP_NZ in gen_op_calc_cc, Richard Henderson, 2023/02/04
- [PULL 34/40] target/s390x: Use Int128 for passing float128, Richard Henderson, 2023/02/04
- [PULL 38/40] target/i386: Inline cmpxchg8b, Richard Henderson, 2023/02/04
- [PULL 39/40] target/i386: Inline cmpxchg16b, Richard Henderson, 2023/02/04
- [PULL 37/40] target/i386: Split out gen_cmpxchg8b, gen_cmpxchg16b, Richard Henderson, 2023/02/04
- [PULL 40/40] tcg/aarch64: Fix patching of LDR in tb_target_set_jmp_target,
Richard Henderson <=
- Re: [PULL 00/40] tcg patch queue, Peter Maydell, 2023/02/05