Commit b4b78631 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo Committed by Simon Marlow
Browse files

Fix for optimizer bug on linux-powerpc (#6156).

parent 9a3c8bd7
......@@ -320,15 +320,15 @@ iselExpr64 (CmmLit (CmmInt i _)) = do
(rlo,rhi) <- getNewRegPairNat II32
let
half0 = fromIntegral (fromIntegral i :: Word16)
half1 = fromIntegral ((fromIntegral i `shiftR` 16) :: Word16)
half2 = fromIntegral ((fromIntegral i `shiftR` 32) :: Word16)
half3 = fromIntegral ((fromIntegral i `shiftR` 48) :: Word16)
half1 = fromIntegral (fromIntegral (i `shiftR` 16) :: Word16)
half2 = fromIntegral (fromIntegral (i `shiftR` 32) :: Word16)
half3 = fromIntegral (fromIntegral (i `shiftR` 48) :: Word16)
code = toOL [
LIS rlo (ImmInt half1),
OR rlo rlo (RIImm $ ImmInt half0),
LIS rhi (ImmInt half3),
OR rlo rlo (RIImm $ ImmInt half2)
OR rhi rhi (RIImm $ ImmInt half2)
]
return (ChildCode64 code rlo)
......
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