Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/b4b78631890a4cd9cde1551de9a4440e7e750372

>---------------------------------------------------------------

commit b4b78631890a4cd9cde1551de9a4440e7e750372
Author: Erik de Castro Lopo <[email protected]>
Date:   Thu Aug 23 20:39:47 2012 +1000

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

>---------------------------------------------------------------

 compiler/nativeGen/PPC/CodeGen.hs |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/compiler/nativeGen/PPC/CodeGen.hs 
b/compiler/nativeGen/PPC/CodeGen.hs
index 4090d95..b6c83ee 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)
 



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to