Fix name-capture bug in rule matching
[ghc-hetmet.git] / compiler / nativeGen / MachCodeGen.hs
index 0d8aa4e..aaf7cec 100644 (file)
@@ -42,13 +42,13 @@ import Constants    ( wORD_SIZE )
 
 #ifdef DEBUG
 import Outputable      ( assertPanic )
-import TRACE           ( trace )
+import Debug.Trace     ( trace )
 #endif
 
 import Control.Monad   ( mapAndUnzipM )
-import Maybe           ( fromJust )
-import DATA_BITS
-import DATA_WORD
+import Data.Maybe      ( fromJust )
+import Data.Bits
+import Data.Word
 
 -- -----------------------------------------------------------------------------
 -- Top-level of the instruction selector
@@ -2909,6 +2909,10 @@ genCCall fn cconv result_regs args
 
 #if i386_TARGET_ARCH
 
+genCCall (CmmPrim MO_WriteBarrier) _ _ _ = return nilOL
+       -- write barrier compiles to no code on x86/x86-64; 
+       -- we keep it this long in order to prevent earlier optimisations.
+
 -- we only cope with a single result for foreign calls
 genCCall (CmmPrim op) [(r,_)] args vols = do
   case op of
@@ -3078,7 +3082,7 @@ outOfLineFloatOp mop res args vols
           code2 <- stmtToInstrs (CmmAssign res (CmmReg tmp))
           return (code1 `appOL` code2)
   where
-       lbl = mkForeignLabel fn Nothing True
+       lbl = mkForeignLabel fn Nothing False
 
        fn = case mop of
              MO_F32_Sqrt  -> FSLIT("sqrtf")
@@ -3119,6 +3123,10 @@ outOfLineFloatOp mop res args vols
 
 #if x86_64_TARGET_ARCH
 
+genCCall (CmmPrim MO_WriteBarrier) _ _ _ = return nilOL
+       -- write barrier compiles to no code on x86/x86-64; 
+       -- we keep it this long in order to prevent earlier optimisations.
+
 genCCall (CmmPrim op) [(r,_)] args vols = 
   outOfLineFloatOp op r args vols