diff options
-rw-r--r-- | compiler/codeGen/CgPrimOp.hs | 4 | ||||
-rw-r--r-- | compiler/codeGen/StgCmmPrim.hs | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/compiler/codeGen/CgPrimOp.hs b/compiler/codeGen/CgPrimOp.hs index 43a570d41e..e912a08b6e 100644 --- a/compiler/codeGen/CgPrimOp.hs +++ b/compiler/codeGen/CgPrimOp.hs @@ -145,7 +145,9 @@ emitPrimOp [res] SparkOp [arg] live = do stmtC (CmmAssign (CmmLocal tmp) arg) vols <- getVolatileRegs live - emitForeignCall' PlayRisky [] + res' <- newTemp bWord + emitForeignCall' PlayRisky + [CmmHinted res' NoHint] (CmmCallee newspark CCallConv) [ (CmmHinted (CmmReg (CmmGlobal BaseReg)) AddrHint) , (CmmHinted arg AddrHint) ] diff --git a/compiler/codeGen/StgCmmPrim.hs b/compiler/codeGen/StgCmmPrim.hs index a2337aee91..1795b55165 100644 --- a/compiler/codeGen/StgCmmPrim.hs +++ b/compiler/codeGen/StgCmmPrim.hs @@ -223,8 +223,9 @@ emitPrimOp [res] SparkOp [arg] -- refer to arg twice (once to pass to newSpark(), and once to -- assign to res), so put it in a temporary. tmp <- assignTemp arg + tmp2 <- newTemp bWord emitCCall - [] + [(tmp2,NoHint)] (CmmLit (CmmLabel (mkCmmCodeLabel rtsPackageId (fsLit "newSpark")))) [(CmmReg (CmmGlobal BaseReg), AddrHint), ((CmmReg (CmmLocal tmp)), AddrHint)] emit (mkAssign (CmmLocal res) (CmmReg (CmmLocal tmp))) |