diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-02-03 17:16:31 +0000 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-02-04 06:19:43 -1000 |
commit | a2495ede07498ee36b18b03e7038ba30c9871bb2 (patch) | |
tree | 25ccb05b03a1a9ee19c75f348b5a5f06bcf150d7 /tcg | |
parent | 5f0dd8cd33cb6c753ed4435e13bd0622a38a9967 (diff) | |
download | qemu-a2495ede07498ee36b18b03e7038ba30c9871bb2.zip qemu-a2495ede07498ee36b18b03e7038ba30c9871bb2.tar.gz qemu-a2495ede07498ee36b18b03e7038ba30c9871bb2.tar.bz2 |
tcg/aarch64: Fix patching of LDR in tb_target_set_jmp_target
'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>
Diffstat (limited to 'tcg')
-rw-r--r-- | tcg/aarch64/tcg-target.c.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc index fde3b30..a091326 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); |