diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-11-08 08:31:24 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2022-03-02 09:00:44 -0500 |
commit | f91826947547ee6030e7cd4557e31d04acfa44c5 (patch) | |
tree | cd713a7abb098e00c08b901bf7f34c643d478a7e | |
parent | 4ddc62e55fa1eddaa98d54df54b3be1b1759a1e7 (diff) | |
download | haskell-f91826947547ee6030e7cd4557e31d04acfa44c5.tar.gz |
ncg/aarch64: Don't sign extend loads
Previously we would emit the sign-extending LDS[HB] instructions for
sub-word loads. However, this is wrong, as noted in #20638.
(cherry picked from commit 78b78ac463b0b8aad688edcea3c4af447854b929)
-rw-r--r-- | compiler/GHC/CmmToAsm/AArch64/Ppr.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/CmmToAsm/AArch64/Ppr.hs b/compiler/GHC/CmmToAsm/AArch64/Ppr.hs index 0dd068068e..44e73b29a2 100644 --- a/compiler/GHC/CmmToAsm/AArch64/Ppr.hs +++ b/compiler/GHC/CmmToAsm/AArch64/Ppr.hs @@ -536,9 +536,9 @@ pprInstr platform instr = case instr of #endif LDR _f o1@(OpReg W8 (RegReal (RealRegSingle i))) o2 | i < 32 -> - text "\tldrsb" <+> pprOp platform o1 <> comma <+> pprOp platform o2 + text "\tldrb" <+> pprOp platform o1 <> comma <+> pprOp platform o2 LDR _f o1@(OpReg W16 (RegReal (RealRegSingle i))) o2 | i < 32 -> - text "\tldrsh" <+> pprOp platform o1 <> comma <+> pprOp platform o2 + text "\tldrh" <+> pprOp platform o1 <> comma <+> pprOp platform o2 LDR _f o1 o2 -> text "\tldr" <+> pprOp platform o1 <> comma <+> pprOp platform o2 STP _f o1 o2 o3 -> text "\tstp" <+> pprOp platform o1 <> comma <+> pprOp platform o2 <> comma <+> pprOp platform o3 |