[Git][ghc/ghc][wip/T23576] Add MO_UU_Conv w W64

Jaro Reinders (@Noughtmare) gitlab at gitlab.haskell.org
Thu Jul 6 07:56:43 UTC 2023



Jaro Reinders pushed to branch wip/T23576 at Glasgow Haskell Compiler / GHC


Commits:
f238be8f by Jaro Reinders at 2023-07-06T09:56:36+02:00
Add MO_UU_Conv w W64

- - - - -


1 changed file:

- compiler/GHC/CmmToAsm/X86/CodeGen.hs


Changes:

=====================================
compiler/GHC/CmmToAsm/X86/CodeGen.hs
=====================================
@@ -599,6 +599,16 @@ iselExpr64 (CmmMachOp (MO_UU_Conv W32 W64) [expr]) = do
                           r_dst_hi
                           r_dst_lo
 
+iselExpr64 (CmmMachOp (MO_UU_Conv w W64) [expr]) | w == W8 || w == W16 = do
+     (rsrc, code) <- getByteReg expr
+     Reg64 r_dst_hi r_dst_lo <- getNewReg64
+     return $ RegCode64 (code `appOL` toOL [
+                          MOVZxL II32 (OpReg rsrc) (OpReg r_dst_lo),
+                          MOV    II32 (OpImm (ImmInt 0)) (OpReg r_dst_hi)
+                          ])
+                          r_dst_hi
+                          r_dst_lo
+
 iselExpr64 (CmmMachOp (MO_SS_Conv W32 W64) [expr]) = do
      code <- getAnyReg expr
      Reg64 r_dst_hi r_dst_lo <- getNewReg64



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f238be8f0f029f8c98f2ce2ea0b9afd409f5a213

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f238be8f0f029f8c98f2ce2ea0b9afd409f5a213
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/327a7620/attachment-0001.html>


More information about the ghc-commits mailing list