summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2012-08-23 20:39:47 +1000
committerSimon Marlow <marlowsd@gmail.com>2012-08-23 15:04:43 +0100
commitb4b78631890a4cd9cde1551de9a4440e7e750372 (patch)
treedbd414e899ce8c940aca3ec22ae780fee26d799f /compiler
parent9a3c8bd700a63dadcf1e238408b490908cbf6765 (diff)
downloadhaskell-b4b78631890a4cd9cde1551de9a4440e7e750372.tar.gz
Fix for optimizer bug on linux-powerpc (#6156).
Diffstat (limited to 'compiler')
-rw-r--r--compiler/nativeGen/PPC/CodeGen.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs
index 4090d95c9f..b6c83eec0a 100644
--- a/compiler/nativeGen/PPC/CodeGen.hs
+++ b/compiler/nativeGen/PPC/CodeGen.hs
@@ -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)