Commit b37a87b7 authored by Peter Trommler's avatar Peter Trommler 🥁 Committed by Ben Gamari

PPC nativeGen: Add support for MO_SS_Conv_W32_W64

This is required by D4363. D4362 has the implementation for i386
this commit adds PowerPC.

Test Plan: validate

Reviewers: erikd, hvr, simonmar, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie, carter

Differential Revision: https://phabricator.haskell.org/D4468
parent a00b88b9
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment