import {-# SOURCE #-} StixPrim ( amodeToStix )
-import MachMisc
import MachRegs
-import AbsCSyn ( CStmtMacro(..), MagicId(..), CAddrMode, tagreg,
+import AbsCSyn ( CStmtMacro(..), CAddrMode, tagreg,
CCheckMacro(..) )
-import Constants ( uF_RET, uF_SU, uF_UPDATEE, uF_SIZE, sEQ_FRAME_SIZE )
-import CallConv ( cCallConv )
+import Constants ( uF_RET, uF_SU, uF_UPDATEE, uF_SIZE )
+import ForeignCall ( CCallConv(..) )
import PrimOp ( PrimOp(..) )
import PrimRep ( PrimRep(..) )
import Stix
import UniqSupply ( returnUs, thenUs, UniqSM )
-import Outputable
import CLabel ( mkBlackHoleInfoTableLabel, mkIndStaticInfoLabel,
mkIndInfoLabel, mkUpdInfoLabel, mkSeqInfoLabel,
mkRtsGCEntryLabel, mkStgUpdatePAPLabel )
macroCode UPD_CAF args
= let
[cafptr,bhptr] = map amodeToStix args
+ new_caf = StCall SLIT("newCAF") CCallConv VoidRep [cafptr]
w0 = StInd PtrRep cafptr
w1 = StInd PtrRep (StIndex PtrRep cafptr fixedHS)
- blocking_queue = StInd PtrRep (StIndex PtrRep bhptr fixedHS)
- a1 = StAssign PtrRep w0 ind_static_info
- a2 = StAssign PtrRep w1 bhptr
- a3 = StCall SLIT("newCAF") cCallConv VoidRep [cafptr]
+ a1 = StAssign PtrRep w1 bhptr
+ a2 = StAssign PtrRep w0 ind_static_info
in
- returnUs (\xs -> a1 : a2 : a3 : xs)
+ returnUs (\xs -> new_caf : a1 : a2 : xs)
\end{code}
-----------------------------------------------------------------------------
macroCode REGISTER_FOREIGN_EXPORT [arg]
= returnUs (
- \xs -> StCall SLIT("getStablePtr") cCallConv VoidRep [amodeToStix arg]
+ \xs -> StCall SLIT("getStablePtr") CCallConv VoidRep [amodeToStix arg]
: xs
)
updatePAP, stackOverflow :: StixTree
-updatePAP = StJump stg_update_PAP
-stackOverflow = StCall SLIT("StackOverflow") cCallConv VoidRep []
+updatePAP = StJump NoDestInfo stg_update_PAP
+stackOverflow = StCall SLIT("StackOverflow") CCallConv VoidRep []
\end{code}
-----------------------------------------------------------------------------
mkStJump_to_GCentry :: String -> StixTree
mkStJump_to_GCentry gcname
-- | opt_Static
- = StJump (StCLbl (mkRtsGCEntryLabel gcname))
+ = StJump NoDestInfo (StCLbl (mkRtsGCEntryLabel gcname))
-- | otherwise -- it's in a different DLL
-- = StJump (StInd PtrRep (StLitLbl True sdoc))