commit 359c4ebb17f79767ab2aa29162e7f164cb513163
parent 9e7e5bffc4e4af37a6c29657ba87fbb6a1123cf2
Author: Michael Forney <mforney@mforney.org>
Date: Wed, 8 May 2019 14:16:39 -0700
arm64: Use 32-bit register name when loading 'b' or 'h' into 'l'
The ldrb and ldrh instructions require a 32-bit register name for the
destination and will clear the upper 32-bits of that register.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arm64/emit.c b/arm64/emit.c
@@ -67,9 +67,9 @@ static struct {
{ Ostores, Kw, "str %S0, %M1" },
{ Ostored, Kw, "str %D0, %M1" },
{ Oloadsb, Ki, "ldrsb %=, %M0" },
- { Oloadub, Ki, "ldrb %=, %M0" },
+ { Oloadub, Ki, "ldrb %W=, %M0" },
{ Oloadsh, Ki, "ldrsh %=, %M0" },
- { Oloaduh, Ki, "ldrh %=, %M0" },
+ { Oloaduh, Ki, "ldrh %W=, %M0" },
{ Oloadsw, Kw, "ldr %=, %M0" },
{ Oloadsw, Kl, "ldrsw %=, %M0" },
{ Oloaduw, Ki, "ldr %W=, %M0" },