[Git][ghc/ghc][wip/supersven/riscv64-ncg] Move alignment check
Sven Tennie (@supersven)
gitlab at gitlab.haskell.org
Mon Apr 29 16:18:09 UTC 2024
Sven Tennie pushed to branch wip/supersven/riscv64-ncg at Glasgow Haskell Compiler / GHC
Commits:
cf6c224d by Sven Tennie at 2024-04-29T18:16:58+02:00
Move alignment check
- - - - -
1 changed file:
- compiler/GHC/CmmToAsm/RV64/CodeGen.hs
Changes:
=====================================
compiler/GHC/CmmToAsm/RV64/CodeGen.hs
=====================================
@@ -478,11 +478,6 @@ getRegister' config plat (CmmMachOp (MO_Add w0) [x, CmmLit (CmmInt i w1)]) | i <
getRegister' config plat (CmmMachOp (MO_Sub w0) [x, CmmLit (CmmInt i w1)]) | i < 0
= getRegister' config plat (CmmMachOp (MO_Add w0) [x, CmmLit (CmmInt (-i) w1)])
-getRegister' config platform (CmmMachOp (MO_AlignmentCheck align wordWidth) [e])
- = do
- reg <- getRegister' config platform e
- addAlignmentCheck align wordWidth reg
-
-- Generic case.
getRegister' config plat expr =
case expr of
@@ -622,6 +617,9 @@ getRegister' config plat expr =
-- Conversions
MO_XX_Conv _from to -> swizzleRegisterRep (intFormat to) <$> getRegister e
+ MO_AlignmentCheck align wordWidth -> do
+ reg <- getRegister' config plat e
+ addAlignmentCheck align wordWidth reg
_ -> pprPanic "getRegister' (monadic CmmMachOp):" (pdoc plat expr)
where
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/cf6c224dbd43d4eaf6d9c726214b275a9758f8d3
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/cf6c224dbd43d4eaf6d9c726214b275a9758f8d3
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/20240429/79917d0b/attachment-0001.html>
More information about the ghc-commits
mailing list