The argument order for the !CONFIG_SOFTMMU case was jumbled up since
ffc6372851d8631a9f9fa56ec613b3244dc635b9 ("tcg/aarch64: use 32-bit
offset for 32-bit user-mode emulation"), regressing from -rc2 to v2.4.0.
Fix their order to avoid segfaults, e.g., in openSUSE's GNU coreutils 8.24.Cc: Paolo Bonzini <[email protected]> Cc: Aurelien Jarno <[email protected]> Cc: Richard Henderson <[email protected]> Cc: [email protected] (v2.4.0) Signed-off-by: Andreas Färber <[email protected]> --- tcg/aarch64/tcg-target.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index 01ae610..6f7dd4e 100644 --- a/tcg/aarch64/tcg-target.c +++ b/tcg/aarch64/tcg-target.c @@ -1224,9 +1224,8 @@ static void tcg_out_qemu_ld(TCGContext *s, TCGReg data_reg, TCGReg addr_reg, add_qemu_ldst_label(s, true, oi, ext, data_reg, addr_reg, s->code_ptr, label_ptr); #else /* !CONFIG_SOFTMMU */ - tcg_out_qemu_ld_direct(s, memop, ext, data_reg, - guest_base ? TCG_REG_GUEST_BASE : TCG_REG_XZR, - otype, addr_reg); + tcg_out_qemu_ld_direct(s, memop, ext, data_reg, addr_reg, otype, + guest_base ? TCG_REG_GUEST_BASE : TCG_REG_XZR); #endif /* CONFIG_SOFTMMU */ } @@ -1245,9 +1244,8 @@ static void tcg_out_qemu_st(TCGContext *s, TCGReg data_reg, TCGReg addr_reg, add_qemu_ldst_label(s, false, oi, (memop & MO_SIZE)== MO_64, data_reg, addr_reg, s->code_ptr, label_ptr); #else /* !CONFIG_SOFTMMU */ - tcg_out_qemu_st_direct(s, memop, data_reg, - guest_base ? TCG_REG_GUEST_BASE : TCG_REG_XZR, - otype, addr_reg); + tcg_out_qemu_st_direct(s, memop, data_reg, addr_reg, otype, + guest_base ? TCG_REG_GUEST_BASE : TCG_REG_XZR); #endif /* CONFIG_SOFTMMU */ } -- 2.1.4
