Properly ppr InstEqs in wanteds of implication constraints
[ghc-hetmet.git] / compiler / codeGen / CgPrimOp.hs
index 049e12a..a73000c 100644 (file)
@@ -1,3 +1,10 @@
+{-# OPTIONS -w #-}
+-- The above warning supression flag is a temporary kludge.
+-- While working on this module you are encouraged to remove it and fix
+-- any warnings in the module. See
+--     http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
+-- for details
+
 -----------------------------------------------------------------------------
 --
 -- Code generation for PrimOps.
@@ -32,7 +39,7 @@ import Outputable
 -- ---------------------------------------------------------------------------
 -- Code generation for PrimOps
 
-cgPrimOp   :: CmmFormals       -- where to put the results
+cgPrimOp   :: CmmFormalsWithoutKinds   -- where to put the results
           -> PrimOp            -- the op
           -> [StgArg]          -- arguments
           -> StgLiveVars       -- live vars, in case we need to save them
@@ -44,7 +51,7 @@ cgPrimOp results op args live
        emitPrimOp results op non_void_args live
 
 
-emitPrimOp :: CmmFormals       -- where to put the results
+emitPrimOp :: CmmFormalsWithoutKinds   -- where to put the results
           -> PrimOp            -- the op
           -> [CmmExpr]         -- arguments
           -> StgLiveVars       -- live vars, in case we need to save them
@@ -121,6 +128,7 @@ emitPrimOp [res] ParOp [arg] live
        [(CmmReg (CmmGlobal BaseReg), PtrHint), (arg,PtrHint)] 
        (Just vols)
         NoC_SRT -- No SRT b/c we do PlayRisky
+        CmmMayReturn
   where
        newspark = CmmLit (CmmLabel (mkRtsCodeLabel SLIT("newSpark")))
 
@@ -138,6 +146,7 @@ emitPrimOp [] WriteMutVarOp [mutv,var] live
                [(CmmReg (CmmGlobal BaseReg), PtrHint), (mutv,PtrHint)]
                (Just vols)
                 NoC_SRT -- No SRT b/c we do PlayRisky
+                CmmMayReturn
 
 --  #define sizzeofByteArrayzh(r,a) \
 --     r = (((StgArrWords *)(a))->words * sizeof(W_))
@@ -344,6 +353,7 @@ emitPrimOp [res] op args live
           [(a,NoHint) | a<-args]  -- ToDo: hints?
           (Just vols)
            NoC_SRT -- No SRT b/c we do PlayRisky
+           CmmMayReturn
 
    | Just mop <- translateOp op
    = let stmt = CmmAssign (CmmLocal res) (CmmMachOp mop args) in