-{- ---------------------
- What actually happens is something like this; but it got macro-ised
-
- = pushOnBStack (CReg CurCostCentre) `thenFC` \ _ ->
- pushOnBStack (CReg SuA) `thenFC` \ _ ->
- pushOnBStack (CReg SuB) `thenFC` \ _ ->
- pushOnBStack updatee `thenFC` \ _ ->
- pushOnBStack (CLabel sTD_UPD_RET_VEC_LABEL CodePtrRep) `thenFC` \ _ ->
-
- -- MAKE SuA, SuB POINT TO TOP OF A,B STACKS
- -- Remember, SpB hasn't yet been incremented to account for the
- -- 4-word update frame which has been pushed.
- -- This code seems crude, but effective...
- absC (AbsCStmts (CAssign (CReg SuA) (CReg SpA))
- (CAssign (CReg SuB) (CAddr (SpBRel 0 4))))
--------------------------- -}
+pushSeqFrame :: VirtualSpOffset -> FCode VirtualSpOffset
+pushSeqFrame args_sp
+ = getSpRelOffset args_sp `thenFC` \ sp_rel ->
+ absC (CMacroStmt PUSH_SEQ_FRAME [CAddr sp_rel]) `thenC`
+ returnFC (args_sp - seqFrameSize)