summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/PPC
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2018-03-21 17:02:21 -0400
committerJoachim Breitner <mail@joachim-breitner.de>2018-03-21 17:02:21 -0400
commit4a47fd33d2f16070d4fe8bd32a104587608061cd (patch)
tree204afacf3bf4177de01b8f2778f4154c26bf578b /compiler/nativeGen/PPC
parentc663b715b6201d460e8bf2b6fb26e61c700384e0 (diff)
parent0aa7d8796a95298e906ea81fe4a52590d75c2e47 (diff)
downloadhaskell-wip/T14068.tar.gz
Merge branch 'wip/T14951' into wip/T14068wip/T14068
Diffstat (limited to 'compiler/nativeGen/PPC')
-rw-r--r--compiler/nativeGen/PPC/CodeGen.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs
index e2c568c836..7c345f2328 100644
--- a/compiler/nativeGen/PPC/CodeGen.hs
+++ b/compiler/nativeGen/PPC/CodeGen.hs
@@ -382,6 +382,14 @@ iselExpr64 (CmmMachOp (MO_UU_Conv W32 W64) [expr]) = do
mov_lo = MR rlo expr_reg
return $ ChildCode64 (expr_code `snocOL` mov_lo `snocOL` mov_hi)
rlo
+
+iselExpr64 (CmmMachOp (MO_SS_Conv W32 W64) [expr]) = do
+ (expr_reg,expr_code) <- getSomeReg expr
+ (rlo, rhi) <- getNewRegPairNat II32
+ let mov_hi = SRA II32 rhi expr_reg (RIImm (ImmInt 31))
+ mov_lo = MR rlo expr_reg
+ return $ ChildCode64 (expr_code `snocOL` mov_lo `snocOL` mov_hi)
+ rlo
iselExpr64 expr
= pprPanic "iselExpr64(powerpc)" (pprExpr expr)