qemu/tcg
Richard Henderson 1229d60714 tcg/loongarch64: Fix tcg_out_movi vs some pcrel pointers
Simplify the logic for two-part, 32-bit pc-relative addresses.
Rather than assume all such fit in int32_t, do some arithmetic
and assert a result, do some arithmetic first and then check
to see if the pieces are in range.

Cc: qemu-stable@nongnu.org
Fixes: dacc51720d ("tcg/loongarch64: Implement tcg_out_mov and tcg_out_movi")
Reviewed-by: Song Gao <gaosong@loongson.cn>
Reported-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
(cherry picked from commit 521d7fb3eb)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2024-06-20 15:23:05 +03:00
..
aarch64 tcg/aarch64: Apple does not align __int128_t in even registers 2024-03-05 17:38:26 +03:00
arm tcg/arm: Fix goto_tb for large translation blocks 2024-02-14 21:17:26 +03:00
i386 tcg: Remove TCG_TARGET_HAS_neg_{i32,i64} 2023-11-06 08:27:21 -08:00
loongarch64 tcg/loongarch64: Fix tcg_out_movi vs some pcrel pointers 2024-06-20 15:23:05 +03:00
mips tcg: Remove TCG_TARGET_HAS_neg_{i32,i64} 2023-11-06 08:27:21 -08:00
ppc tcg/ppc: Use new registers for LQ destination 2024-01-11 21:02:11 +03:00
riscv tcg: Remove TCG_TARGET_HAS_neg_{i32,i64} 2023-11-06 08:27:21 -08:00
s390x tcg/s390x: Fix encoding of VRIc, VRSa, VRSc insns 2024-01-25 19:13:41 +03:00
sparc64 tcg/sparc64: Implement tcg_out_extrl_i64_i32 2023-11-06 10:48:46 -08:00
tci tcg: Remove TCG_TARGET_HAS_neg_{i32,i64} 2023-11-06 08:27:21 -08:00
meson.build tcg: Correct invalid mentions of 'softmmu' by 'system-mode' 2023-10-07 19:02:33 +02:00
optimize.c tcg/optimize: Do not attempt to constant fold neg_vec 2024-04-10 18:51:37 +03:00
region.c tcg: Correct invalid mentions of 'softmmu' by 'system-mode' 2023-10-07 19:02:33 +02:00
tcg-common.c
tcg-internal.h tcg: Move tcg_constant_* out of line 2023-11-06 08:27:21 -08:00
tcg-ldst.c.inc
tcg-op-gvec.c tcg: Don't free vector results 2023-11-06 08:27:21 -08:00
tcg-op-ldst.c tcg: Reduce serial context atomicity earlier 2023-12-12 13:35:19 -08:00
tcg-op-vec.c tcg: Remove vecop_list check from tcg_gen_not_vec 2023-08-29 09:57:39 -07:00
tcg-op.c tcg: Canonicalize subi to addi during opcode generation 2023-11-06 10:43:04 -08:00
tcg-pool.c.inc
tcg.c tcg/ppc: Use new registers for LQ destination 2024-01-11 21:02:11 +03:00
tci.c tcg: Remove TCG_TARGET_HAS_neg_{i32,i64} 2023-11-06 08:27:21 -08:00