[Git][ghc/ghc][wip/T23576] Fix MO_Mul some more
Jaro Reinders (@Noughtmare)
gitlab at gitlab.haskell.org
Fri Jun 30 14:02:47 UTC 2023
Jaro Reinders pushed to branch wip/T23576 at Glasgow Haskell Compiler / GHC
Commits:
cfac2bae by Jaro Reinders at 2023-06-30T16:02:41+02:00
Fix MO_Mul some more
- - - - -
1 changed file:
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
Changes:
=====================================
compiler/GHC/CmmToAsm/X86/CodeGen.hs
=====================================
@@ -625,23 +625,25 @@ iselExpr64 (CmmMachOp (MO_Mul _) [e1,e2]) = do
RegCode64 code1 r1hi r1lo <- iselExpr64 e1
RegCode64 code2 r2hi r2lo <- iselExpr64 e2
Reg64 rhi rlo <- getNewReg64
- Reg64 rhi' rlo' <- getNewReg64
+ tmp <- getNewRegNat II32
let
code = code1 `appOL`
code2 `appOL`
- toOL [ MOV II32 (OpReg r1lo) (OpReg rlo'),
- MOV II32 (OpReg r2lo) (OpReg rhi'),
+ toOL [ MOV II32 (OpReg r1lo) (OpReg eax),
+ MOV II32 (OpReg r2lo) (OpReg tmp),
MOV II32 (OpReg r1hi) (OpReg rhi),
- IMUL II32 (OpReg rhi') (OpReg rhi),
+ IMUL II32 (OpReg tmp) (OpReg rhi),
MOV II32 (OpReg r2hi) (OpReg rlo),
- IMUL II32 (OpReg rlo') (OpReg rlo),
+ IMUL II32 (OpReg eax) (OpReg rlo),
ADD II32 (OpReg rlo) (OpReg rhi),
- MUL2 II32 (OpReg rhi'),
+ MUL2 II32 (OpReg tmp),
ADD II32 (OpReg edx) (OpReg rhi),
MOV II32 (OpReg eax) (OpReg rlo)
]
return (RegCode64 code rhi rlo)
+
+
iselExpr64 expr
= do
platform <- getPlatform
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/cfac2baeeef291b5caf6e43620fb956671550309
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/cfac2baeeef291b5caf6e43620fb956671550309
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/20230630/3950d026/attachment-0001.html>
More information about the ghc-commits
mailing list