On 8/21/23 08:30, Nicholas Piggin wrote:
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-sta...@nongnu.org
Reported-by: Ivan Warren<i...@vmfacility.fr>
Fixes: 57b38ffd0c6f ("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<npig...@gmail.com>
---
Hi Ivan,

Thanks for your report. This gets AIX7.2 booting for me again with TCG,
if you would be able to confirm that it works there, it would be great.

Thanks,
Nick

  target/ppc/translate/fixedpoint-impl.c.inc | 16 ++++++++--------
  1 file changed, 8 insertions(+), 8 deletions(-)

Thanks for the catch.

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>


r~

Reply via email to