- other -> [] -- "(HWL ignored; no args passed in regs)"
-
- num_arg_regs = length arg_regs
-
- (reg_args, stk_args) = splitAt num_arg_regs all_args
-
- (sp_stk_args, stk_offsets, stk_tags)
- = mkTaggedVirtStkOffsets vSp idPrimRep stk_args
-
- -- HWL; Note: empty list of live regs in slow entry code
- -- Old version (reschedule combined with heap check);
- -- see argSatisfactionCheck for new version
- --slow_entry_code = forceHeapCheck [node] True slow_entry_code'
- -- where node = UnusedReg PtrRep 1
- --slow_entry_code = forceHeapCheck [] True slow_entry_code'
-
- slow_entry_code
- = profCtrC SLIT("TICK_ENT_FUN_STD") [
- CLbl ticky_ctr_label DataPtrRep
- ] `thenC`
-
- -- Bind args, and record expected position of stk ptrs
- mapCs bindNewToStack arg_offsets `thenC`
- setRealAndVirtualSp sp_all_args `thenC`
-
- argSatisfactionCheck closure_info arg_regs `thenC`
-
- -- OK, so there are enough args. Now we need to stuff as
- -- many of them in registers as the fast-entry code
- -- expects. Note that the zipWith will give up when it hits
- -- the end of arg_regs.
-
- mapFCs getCAddrMode all_args `thenFC` \ stk_amodes ->
- absC (mkAbstractCs (zipWith assign_to_reg arg_regs stk_amodes))
- `thenC`
-
- -- Now adjust real stack pointers (no need to adjust Hp,
- -- but call this function for convenience).
- adjustSpAndHp sp_stk_args `thenC`
-
- absC (CFallThrough (CLbl fast_label CodePtrRep))
-
- assign_to_reg reg_id amode = CAssign (CReg reg_id) amode
-
- -- HWL
- -- Old version (reschedule combined with heap check);
- -- see argSatisfactionCheck for new version
- -- fast_entry_code = forceHeapCheck [] True fast_entry_code'