tcg/aarch64: Fix tcg_out_qemu_{ld, st} for guest_base == 0
commit352bcb0a2b816ff9ab9d75d0f2384650d9e9ab19
authorRichard Henderson <rth@twiddle.net>
Tue, 1 Sep 2015 19:58:02 +0000 (1 15:58 -0400)
committerRichard Henderson <rth@twiddle.net>
Wed, 2 Sep 2015 21:23:14 +0000 (2 14:23 -0700)
tree969686ed072205f9b56f20cbe3b6f1a2bf363e10
parent090d0bfd948343d522cd20bc634105b5cfe2483b
tcg/aarch64: Fix tcg_out_qemu_{ld, st} for guest_base == 0

In ffc6372851d8631a9f9fa56ec613b3244dc635b9, we swapped the guest
base to the address base register from the address index register.
Except that 31 in the base slot is SP not XZR, so we need to be
more intelligent about which reg gets placed in which slot.

Cc: qemu-stable@nongnu.org (v2.4.0)
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reported-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg/aarch64/tcg-target.c