qemu/target/ppc
Nicholas Piggin f64f1f8704 target/ppc: Fix LQ, STQ register-pair order for big-endian
LQ, STQ have the same register-pair ordering as LQARX/STQARX., which is
the even (lower) register contains the most significant bits. This is
not implemented correctly for big-endian.

do_ldst_quad() has variables low_addr_gpr and high_addr_gpr which is
confusing because they are low and high addresses, whereas LQARX/STQARX.
and most such things use the low and high values for lo/hi variables.
The conversion to native 128-bit memory access functions missed this
strangeness.

Fix this by changing the if condition, and change the variable names to
hi/lo to match convention.

Cc: qemu-stable@nongnu.org
Reported-by: Ivan Warren <ivan@vmfacility.fr>
Fixes: 57b38ffd0c ("target/ppc: Use tcg_gen_qemu_{ld,st}_i128 for LQARX, LQ, STQ")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1836
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
(cherry picked from commit 718209358f2e4f231cbacf974c3299c4fe7beb83)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2023-09-21 19:35:19 +03:00
..
translate target/ppc: Fix LQ, STQ register-pair order for big-endian 2023-09-21 19:35:19 +03:00
arch_dump.c target: ppc: Use MSR_HVB bit to get the target endianness for memory dump 2023-07-07 04:46:12 -03:00
compat.c
cpu-models.c
cpu-models.h
cpu-param.h
cpu-qom.h target/ppc: Define TYPE_HOST_POWERPC_CPU in cpu-qom.h 2023-07-07 04:49:14 -03:00
cpu.c target/ppc: Flush inputs to zero with NJ in ppc_store_vscr 2023-09-21 19:35:19 +03:00
cpu.h target/ppc: Move CPU QOM definitions to cpu-qom.h 2023-07-07 04:49:14 -03:00
cpu_init.c target/ppc: Restrict 'kvm_ppc.h' to sysemu in cpu_init.c 2023-07-07 04:49:14 -03:00
dfp_helper.c
excp_helper.c target/ppc: Fix pending HDEC when entering PM state 2023-08-04 10:50:19 -03:00
fpu_helper.c
gdbstub.c
helper.h target/ppc: SMT support for the HID SPR 2023-07-07 04:47:49 -03:00
helper_regs.c
helper_regs.h
insn32.decode
insn64.decode
int_helper.c target/ppc: Use aesdec_ISB_ISR_AK_IMC 2023-07-08 07:30:17 +01:00
internal.h target/ppc: Machine check on invalid real address access on POWER9/10 2023-07-07 04:49:14 -03:00
Kconfig
kvm-stub.c
kvm.c kvm: Introduce kvm_arch_get_default_type hook 2023-08-24 18:43:47 +03:00
kvm_ppc.h target/ppc: Remove pointless checks of CONFIG_USER_ONLY in 'kvm_ppc.h' 2023-07-07 04:49:14 -03:00
machine.c
mem_helper.c
meson.build
misc_helper.c target/ppc: SMT support for the HID SPR 2023-07-07 04:47:49 -03:00
mmu-book3s-v3.c
mmu-book3s-v3.h
mmu-books.h
mmu-hash32.c
mmu-hash32.h
mmu-hash64.c target/ppc: Fix VRMA page size for ISA v3.0 2023-08-04 12:22:03 -03:00
mmu-hash64.h target/ppc: Fix VRMA page size for ISA v3.0 2023-08-04 12:22:03 -03:00
mmu-radix64.c
mmu-radix64.h
mmu_common.c
mmu_helper.c
power8-pmu-regs.c.inc
power8-pmu.c
power8-pmu.h
ppc-qmp-cmds.c
spr_common.h target/ppc: SMT support for the HID SPR 2023-07-07 04:47:49 -03:00
tcg-stub.c
timebase_helper.c target/ppc: Add TFMR SPR implementation with read and write helpers 2023-07-07 04:18:26 -03:00
trace-events
trace.h
translate.c target/ppc: Disable goto_tb with architectural singlestep 2023-07-31 12:19:13 -07:00
user_only_helper.c