[commit: ghc] wip/T16188: Fix Int overflow on 32 bit platform (07f5cbc)

git at git.haskell.org git at git.haskell.org
Sun Feb 10 21:31:53 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T16188
Link       : http://ghc.haskell.org/trac/ghc/changeset/07f5cbc8cc61436cd5f3e9280191bad5480203c5/ghc

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

commit 07f5cbc8cc61436cd5f3e9280191bad5480203c5
Author: Peter Trommler <ptrommler at acm.org>
Date:   Wed Feb 6 22:31:20 2019 +0100

    Fix Int overflow on 32 bit platform


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

07f5cbc8cc61436cd5f3e9280191bad5480203c5
 compiler/nativeGen/X86/CodeGen.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs
index 9591c42..abd4995 100644
--- a/compiler/nativeGen/X86/CodeGen.hs
+++ b/compiler/nativeGen/X86/CodeGen.hs
@@ -2129,7 +2129,7 @@ genCCall dflags is32Bit (PrimTarget (MO_Ctz width)) [dst] [src] bid
         src_r <- getNewRegNat (intFormat width)
         return $ appOL (code_src src_r) $ case width of
             W8 -> toOL
-                [ OR    II32 (OpImm (ImmInt 0xFFFFFF00)) (OpReg src_r)
+                [ OR    II32 (OpImm (ImmInteger 0xFFFFFF00)) (OpReg src_r)
                 , TZCNT II32 (OpReg src_r)        dst_r
                 ]
             W16 -> toOL



More information about the ghc-commits mailing list