Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/d58d46278ddbf9470072bc315a0b58a01726eed9 >--------------------------------------------------------------- commit d58d46278ddbf9470072bc315a0b58a01726eed9 Author: Simon Marlow <[email protected]> Date: Tue Jul 19 15:30:15 2011 +0100 Fix a bug in the code generation for 64-bit literals on 32-bit x86: we were accidentally zeroing out the high 32 bits. This bug must have been here for ages, it was only just exposed by the new Typeable code which uses two 64-bit values to store a 128-bit hash, and so exercises the code generation for 64-bit stuff. >--------------------------------------------------------------- compiler/nativeGen/X86/CodeGen.hs | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs index 268bc75..75d821b 100644 --- a/compiler/nativeGen/X86/CodeGen.hs +++ b/compiler/nativeGen/X86/CodeGen.hs @@ -323,7 +323,7 @@ iselExpr64 (CmmLit (CmmInt i _)) = do (rlo,rhi) <- getNewRegPairNat II32 let r = fromIntegral (fromIntegral i :: Word32) - q = fromIntegral ((fromIntegral i `shiftR` 32) :: Word32) + q = fromIntegral (fromIntegral (i `shiftR` 32) :: Word32) code = toOL [ MOV II32 (OpImm (ImmInteger r)) (OpReg rlo), MOV II32 (OpImm (ImmInteger q)) (OpReg rhi) _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
