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

On branch  : master

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

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

commit ef2ac839746750300dc8e96b8accaee8498298d7
Author: Johan Tibell <johan.tib...@gmail.com>
Date:   Wed Jun 15 14:36:13 2011 +0200

    Fix -Werror failure in native code gen

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

 compiler/nativeGen/X86/CodeGen.hs |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/compiler/nativeGen/X86/CodeGen.hs 
b/compiler/nativeGen/X86/CodeGen.hs
index fcefbd8..3898f27 100644
--- a/compiler/nativeGen/X86/CodeGen.hs
+++ b/compiler/nativeGen/X86/CodeGen.hs
@@ -1507,9 +1507,9 @@ genCCall
 -- Unroll memcpy calls if the source and destination pointers are at
 -- least DWORD aligned and the number of bytes to copy isn't too
 -- large.  Otherwise, call C's memcpy.
-genCCall (CmmPrim MO_Memcpy) _ args@[CmmHinted dst _, CmmHinted src _,
-                                     CmmHinted (CmmLit (CmmInt n _)) _,
-                                     CmmHinted (CmmLit (CmmInt align _)) _]
+genCCall (CmmPrim MO_Memcpy) _ [CmmHinted dst _, CmmHinted src _,
+                                CmmHinted (CmmLit (CmmInt n _)) _,
+                                CmmHinted (CmmLit (CmmInt align _)) _]
     | n <= maxInlineSizeThreshold && align .&. 3 == 0 = do
         code_dst <- getAnyReg dst
         dst_r <- getNewRegNat size
@@ -1549,10 +1549,10 @@ genCCall (CmmPrim MO_Memcpy) _ args@[CmmHinted dst _, 
CmmHinted src _,
         dst_addr = AddrBaseIndex (EABaseReg dst) EAIndexNone
                    (ImmInteger (n - i))
 
-genCCall (CmmPrim MO_Memset) _ args@[CmmHinted dst _,
-                                     CmmHinted (CmmLit (CmmInt c _)) _,
-                                     CmmHinted (CmmLit (CmmInt n _)) _,
-                                     CmmHinted (CmmLit (CmmInt align _)) _]
+genCCall (CmmPrim MO_Memset) _ [CmmHinted dst _,
+                                CmmHinted (CmmLit (CmmInt c _)) _,
+                                CmmHinted (CmmLit (CmmInt n _)) _,
+                                CmmHinted (CmmLit (CmmInt align _)) _]
     | n <= maxInlineSizeThreshold && align .&. 3 == 0 = do
         code_dst <- getAnyReg dst
         dst_r <- getNewRegNat size
@@ -1960,6 +1960,7 @@ genCCall  = panic "X86.genCCAll: not defined"
 -- | We're willing to inline and unroll memcpy/memset calls that touch
 -- at most these many bytes.  This threshold is the same as the one
 -- used by GCC and LLVM.
+maxInlineSizeThreshold :: Integer
 maxInlineSizeThreshold = 128
 
 outOfLineCmmOp :: CallishMachOp -> Maybe HintedCmmFormal -> [HintedCmmActual] 
-> NatM InstrBlock



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to