Commit 237159c2 authored by Peter Wortmann's avatar Peter Wortmann Committed by dterei
Browse files

Code generation: Always ask for result of newSpark



Otherwise the LLVM backend gets confused over whether its type should be
"void (i8*, i8*)" or "i64 (i8*, i8*)".
Signed-off-by: dterei's avatarDavid Terei <davidterei@gmail.com>
parent fe60dd4a
...@@ -145,7 +145,9 @@ emitPrimOp [res] SparkOp [arg] live = do ...@@ -145,7 +145,9 @@ emitPrimOp [res] SparkOp [arg] live = do
stmtC (CmmAssign (CmmLocal tmp) arg) stmtC (CmmAssign (CmmLocal tmp) arg)
vols <- getVolatileRegs live vols <- getVolatileRegs live
emitForeignCall' PlayRisky [] res' <- newTemp bWord
emitForeignCall' PlayRisky
[CmmHinted res' NoHint]
(CmmCallee newspark CCallConv) (CmmCallee newspark CCallConv)
[ (CmmHinted (CmmReg (CmmGlobal BaseReg)) AddrHint) [ (CmmHinted (CmmReg (CmmGlobal BaseReg)) AddrHint)
, (CmmHinted arg AddrHint) ] , (CmmHinted arg AddrHint) ]
......
...@@ -223,8 +223,9 @@ emitPrimOp [res] SparkOp [arg] ...@@ -223,8 +223,9 @@ emitPrimOp [res] SparkOp [arg]
-- refer to arg twice (once to pass to newSpark(), and once to -- refer to arg twice (once to pass to newSpark(), and once to
-- assign to res), so put it in a temporary. -- assign to res), so put it in a temporary.
tmp <- assignTemp arg tmp <- assignTemp arg
tmp2 <- newTemp bWord
emitCCall emitCCall
[] [(tmp2,NoHint)]
(CmmLit (CmmLabel (mkCmmCodeLabel rtsPackageId (fsLit "newSpark")))) (CmmLit (CmmLabel (mkCmmCodeLabel rtsPackageId (fsLit "newSpark"))))
[(CmmReg (CmmGlobal BaseReg), AddrHint), ((CmmReg (CmmLocal tmp)), AddrHint)] [(CmmReg (CmmGlobal BaseReg), AddrHint), ((CmmReg (CmmLocal tmp)), AddrHint)]
emit (mkAssign (CmmLocal res) (CmmReg (CmmLocal tmp))) emit (mkAssign (CmmLocal res) (CmmReg (CmmLocal tmp)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment