[Git][ghc/ghc][wip/angerman/aarch64-ncg] Address Takenobus observations!
Moritz Angermann
gitlab at gitlab.haskell.org
Mon Jul 20 12:37:22 UTC 2020
Moritz Angermann pushed to branch wip/angerman/aarch64-ncg at Glasgow Haskell Compiler / GHC
Commits:
65b942b0 by Moritz Angermann at 2020-07-20T12:37:09+00:00
Address Takenobus observations!
Thanks!
- - - - -
2 changed files:
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
Changes:
=====================================
compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
=====================================
@@ -583,7 +583,7 @@ getRegister' config plat expr
-- UBFM will set the high bits to 0. SBFM will copy the sign (sign extend).
MO_UU_Conv from to -> return $ Any (intFormat to) (\dst -> code `snocOL` UBFM (OpReg (max from to) dst) (OpReg (max from to) reg) (OpImm (ImmInt 0)) (toImm (min from to)))
MO_SS_Conv from to -> return $ Any (intFormat to) (\dst -> code `snocOL` SBFM (OpReg (max from to) dst) (OpReg (max from to) reg) (OpImm (ImmInt 0)) (toImm (min from to)))
- MO_FF_Conv from to -> return $ Any (intFormat to) (\dst -> code `snocOL` FCVT (OpReg to dst) (OpReg from reg))
+ MO_FF_Conv from to -> return $ Any (floatFormat to) (\dst -> code `snocOL` FCVT (OpReg to dst) (OpReg from reg))
-- Conversions
MO_XX_Conv from to -> swizzleRegisterRep (intFormat to) <$> getRegister e
=====================================
compiler/GHC/CmmToAsm/AArch64/Instr.hs
=====================================
@@ -387,7 +387,7 @@ aarch64_mkLoadInstr config reg delta slot | (spillSlotToOffset config slot) - de
where delta' = (spillSlotToOffset config slot) - delta
aarch64_mkLoadInstr config reg delta slot | (spillSlotToOffset config slot) - delta < -4095
- = let (d, isns) = aarch64_mkLoadInstr config reg (delta - 4096) slot
+ = let (d, isns) = aarch64_mkLoadInstr config reg (delta - 4095) slot
in (d, ADD sp sp (OpImm (ImmInt 4095)) : isns ++ [SUB sp sp (OpImm (ImmInt 4095))])
aarch64_mkLoadInstr config reg delta slot | (spillSlotToOffset config slot) - delta < -256
@@ -470,8 +470,8 @@ aarch64_mkStackDeallocInstr :: Platform -> Int -> [Instr]
aarch64_mkStackDeallocInstr platform n
| n == 0 = []
| n > 0 && n < 4096 = [ ADD sp sp (OpImm (ImmInt n)) ]
- | n > 0 = ADD sp sp (OpImm (ImmInt 4095)) : aarch64_mkStackAllocInstr platform (n - 4095)
-aarch64_mkStackDeallocInstr platform n = pprPanic "aarch64_mkStackAllocInstr" (int n)
+ | n > 0 = ADD sp sp (OpImm (ImmInt 4095)) : aarch64_mkStackDeallocInstr platform (n + 4095)
+aarch64_mkStackDeallocInstr platform n = pprPanic "aarch64_mkStackDeallocInstr" (int n)
--
-- See note [extra spill slots] in X86/Instr.hs
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/65b942b00339f3eb7ba85d0d8dd8bf650f71c9b7
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/65b942b00339f3eb7ba85d0d8dd8bf650f71c9b7
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200720/a4ef712f/attachment-0001.html>
More information about the ghc-commits
mailing list