- stmtC (CmmCall (CmmForeignCall suspendThread CCallConv)
- [ (id,PtrHint) ]
- [ (CmmReg (CmmGlobal BaseReg), PtrHint) ]
- )
- stmtC (CmmCall temp_target results temp_args)
- stmtC (CmmCall (CmmForeignCall resumeThread CCallConv)
- [ (new_base, PtrHint) ]
- [ (CmmReg (CmmLocal id), PtrHint) ]
- )
+ -- 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 be the one to convert that
+ -- to this sequence of three CmmUnsafe calls.
+ stmtC (CmmCall (CmmCallee suspendThread CCallConv)
+ [ CmmHinted id AddrHint ]
+ [ CmmHinted (CmmReg (CmmGlobal BaseReg)) AddrHint
+ , CmmHinted (CmmLit (CmmInt (fromIntegral (fromEnum (playInterruptible safety))) wordWidth)) NoHint]
+ CmmUnsafe ret)
+ stmtC (CmmCall temp_target results temp_args CmmUnsafe ret)
+ stmtC (CmmCall (CmmCallee resumeThread CCallConv)
+ [ CmmHinted new_base AddrHint ]
+ [ CmmHinted (CmmReg (CmmLocal id)) AddrHint ]
+ CmmUnsafe ret)