- -- Using the same SRT for each of these is a little bit conservative
- -- but it should work for now.
- stmtC (CmmCall (CmmForeignCall suspendThread CCallConv)
- [ (id,PtrHint) ]
- [ (CmmReg (CmmGlobal BaseReg), PtrHint) ]
- srt)
- stmtC (CmmCall temp_target results temp_args srt)
- stmtC (CmmCall (CmmForeignCall resumeThread CCallConv)
- [ (new_base, PtrHint) ]
- [ (CmmReg (CmmLocal id), PtrHint) ]
- srt)
+ -- The CmmUnsafe arguments are only correct because this part
+ -- of the code hasn't been moved into the CPS pass yet.
+ -- Once that happens, this function will just emit a (CmmSafe srt) call,
+ -- and the CPS will will be the one to convert that
+ -- to this sequence of three CmmUnsafe calls.
+ stmtC (CmmCall (CmmCallee suspendThread CCallConv)
+ [ CmmHinted id PtrHint ]
+ [ CmmHinted (CmmReg (CmmGlobal BaseReg)) PtrHint ]
+ CmmUnsafe ret)
+ stmtC (CmmCall temp_target results temp_args CmmUnsafe ret)
+ stmtC (CmmCall (CmmCallee resumeThread CCallConv)
+ [ CmmHinted new_base PtrHint ]
+ [ CmmHinted (CmmReg (CmmLocal id)) PtrHint ]
+ CmmUnsafe ret)