[Git][ghc/ghc][wip/T23576] Fix MO_SS_Conv W8/16 W64 again
Jaro Reinders (@Noughtmare)
gitlab at gitlab.haskell.org
Thu Jul 6 08:50:50 UTC 2023
Jaro Reinders pushed to branch wip/T23576 at Glasgow Haskell Compiler / GHC
Commits:
ae8577f0 by Jaro Reinders at 2023-07-06T10:50:42+02:00
Fix MO_SS_Conv W8/16 W64 again
- - - - -
1 changed file:
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
Changes:
=====================================
compiler/GHC/CmmToAsm/X86/CodeGen.hs
=====================================
@@ -621,24 +621,24 @@ iselExpr64 (CmmMachOp (MO_SS_Conv W32 W64) [expr]) = do
r_dst_lo
iselExpr64 (CmmMachOp (MO_SS_Conv W16 W64) [expr]) = do
- code <- getAnyReg expr
+ (r, code) <- getByteReg expr
Reg64 r_dst_hi r_dst_lo <- getNewReg64
- return $ RegCode64 (code r_dst_lo `snocOL`
- MOVZxL II32 (OpReg r_dst_lo) (OpReg eax) `snocOL`
- CLTD II32 `snocOL`
- MOV II32 (OpReg eax) (OpReg r_dst_lo) `snocOL`
- MOV II32 (OpReg edx) (OpReg r_dst_hi))
+ return $ RegCode64 (code `appOL` toOL [
+ MOVZxL II32 (OpReg r) (OpReg eax),
+ CLTD II32,
+ MOV II32 (OpReg eax) (OpReg r_dst_lo),
+ MOV II32 (OpReg edx) (OpReg r_dst_hi)])
r_dst_hi
r_dst_lo
iselExpr64 (CmmMachOp (MO_SS_Conv W8 W64) [expr]) = do
- code <- getAnyReg expr
+ (r, code) <- getByteReg expr
Reg64 r_dst_hi r_dst_lo <- getNewReg64
- return $ RegCode64 (code r_dst_lo `snocOL`
- MOVZxL II32 (OpReg r_dst_lo) (OpReg eax) `snocOL`
- CLTD II32 `snocOL`
- MOV II32 (OpReg eax) (OpReg r_dst_lo) `snocOL`
- MOV II32 (OpReg edx) (OpReg r_dst_hi))
+ return $ RegCode64 (code `appOL` toOL [
+ MOVZxL II32 (OpReg r) (OpReg eax),
+ CLTD II32,
+ MOV II32 (OpReg eax) (OpReg r_dst_lo),
+ MOV II32 (OpReg edx) (OpReg r_dst_hi)])
r_dst_hi
r_dst_lo
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ae8577f06319ca3ccfea09831a9d977430272252
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ae8577f06319ca3ccfea09831a9d977430272252
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/20230706/ed3a636a/attachment-0001.html>
More information about the ghc-commits
mailing list