diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-06-02 14:02:33 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-06-02 14:02:33 +0000 |
commit | dd56e9ab4544e83d27532a8d9058140bfe81825c (patch) | |
tree | 5c5ba3eb63a02d7de3c8c514e883f7dd36e98332 /rts/HeapStackCheck.cmm | |
parent | cfe2fd2a36f43c1f998bb5e7c0cec15480ed3f96 (diff) | |
download | haskell-dd56e9ab4544e83d27532a8d9058140bfe81825c.tar.gz |
Remove old GUM/GranSim code
Diffstat (limited to 'rts/HeapStackCheck.cmm')
-rw-r--r-- | rts/HeapStackCheck.cmm | 290 |
1 files changed, 0 insertions, 290 deletions
diff --git a/rts/HeapStackCheck.cmm b/rts/HeapStackCheck.cmm index a1b6d65f34..0c1af6292e 100644 --- a/rts/HeapStackCheck.cmm +++ b/rts/HeapStackCheck.cmm @@ -148,296 +148,6 @@ __stg_gc_enter_1 GC_GENERIC } -#if defined(GRAN) -/* - ToDo: merge the block and yield macros, calling something like BLOCK(N) - at the end; -*/ - -/* - Should we actually ever do a yield in such a case?? -- HWL -*/ -gran_yield_0 -{ - SAVE_THREAD_STATE(); - TSO_what_next(CurrentTSO) = ThreadRunGHC; - R1 = ThreadYielding; - jump StgReturn; -} - -gran_yield_1 -{ - Sp_adj(-1); - Sp(0) = R1; - SAVE_THREAD_STATE(); - TSO_what_next(CurrentTSO) = ThreadRunGHC; - R1 = ThreadYielding; - jump StgReturn; -} - -/*- 2 Regs--------------------------------------------------------------------*/ - -gran_yield_2 -{ - Sp_adj(-2); - Sp(1) = R2; - Sp(0) = R1; - SAVE_THREAD_STATE(); - TSO_what_next(CurrentTSO) = ThreadRunGHC; - R1 = ThreadYielding; - jump StgReturn; -} - -/*- 3 Regs -------------------------------------------------------------------*/ - -gran_yield_3 -{ - Sp_adj(-3); - Sp(2) = R3; - Sp(1) = R2; - Sp(0) = R1; - SAVE_THREAD_STATE(); - TSO_what_next(CurrentTSO) = ThreadRunGHC; - R1 = ThreadYielding; - jump StgReturn; -} - -/*- 4 Regs -------------------------------------------------------------------*/ - -gran_yield_4 -{ - Sp_adj(-4); - Sp(3) = R4; - Sp(2) = R3; - Sp(1) = R2; - Sp(0) = R1; - SAVE_THREAD_STATE(); - TSO_what_next(CurrentTSO) = ThreadRunGHC; - R1 = ThreadYielding; - jump StgReturn; -} - -/*- 5 Regs -------------------------------------------------------------------*/ - -gran_yield_5 -{ - Sp_adj(-5); - Sp(4) = R5; - Sp(3) = R4; - Sp(2) = R3; - Sp(1) = R2; - Sp(0) = R1; - SAVE_THREAD_STATE(); - TSO_what_next(CurrentTSO) = ThreadRunGHC; - R1 = ThreadYielding; - jump StgReturn; -} - -/*- 6 Regs -------------------------------------------------------------------*/ - -gran_yield_6 -{ - Sp_adj(-6); - Sp(5) = R6; - Sp(4) = R5; - Sp(3) = R4; - Sp(2) = R3; - Sp(1) = R2; - Sp(0) = R1; - SAVE_THREAD_STATE(); - TSO_what_next(CurrentTSO) = ThreadRunGHC; - R1 = ThreadYielding; - jump StgReturn; -} - -/*- 7 Regs -------------------------------------------------------------------*/ - -gran_yield_7 -{ - Sp_adj(-7); - Sp(6) = R7; - Sp(5) = R6; - Sp(4) = R5; - Sp(3) = R4; - Sp(2) = R3; - Sp(1) = R2; - Sp(0) = R1; - SAVE_THREAD_STATE(); - TSO_what_next(CurrentTSO) = ThreadRunGHC; - R1 = ThreadYielding; - jump StgReturn; -} - -/*- 8 Regs -------------------------------------------------------------------*/ - -gran_yield_8 -{ - Sp_adj(-8); - Sp(7) = R8; - Sp(6) = R7; - Sp(5) = R6; - Sp(4) = R5; - Sp(3) = R4; - Sp(2) = R3; - Sp(1) = R2; - Sp(0) = R1; - SAVE_THREAD_STATE(); - TSO_what_next(CurrentTSO) = ThreadRunGHC; - R1 = ThreadYielding; - jump StgReturn; -} - -// the same routines but with a block rather than a yield - -gran_block_1 -{ - Sp_adj(-1); - Sp(0) = R1; - SAVE_THREAD_STATE(); - TSO_what_next(CurrentTSO) = ThreadRunGHC; - R1 = ThreadBlocked; - jump StgReturn; -} - -/*- 2 Regs--------------------------------------------------------------------*/ - -gran_block_2 -{ - Sp_adj(-2); - Sp(1) = R2; - Sp(0) = R1; - SAVE_THREAD_STATE(); - TSO_what_next(CurrentTSO) = ThreadRunGHC; - R1 = ThreadBlocked; - jump StgReturn; -} - -/*- 3 Regs -------------------------------------------------------------------*/ - -gran_block_3 -{ - Sp_adj(-3); - Sp(2) = R3; - Sp(1) = R2; - Sp(0) = R1; - SAVE_THREAD_STATE(); - TSO_what_next(CurrentTSO) = ThreadRunGHC; - R1 = ThreadBlocked; - jump StgReturn; -} - -/*- 4 Regs -------------------------------------------------------------------*/ - -gran_block_4 -{ - Sp_adj(-4); - Sp(3) = R4; - Sp(2) = R3; - Sp(1) = R2; - Sp(0) = R1; - SAVE_THREAD_STATE(); - TSO_what_next(CurrentTSO) = ThreadRunGHC; - R1 = ThreadBlocked; - jump StgReturn; -} - -/*- 5 Regs -------------------------------------------------------------------*/ - -gran_block_5 -{ - Sp_adj(-5); - Sp(4) = R5; - Sp(3) = R4; - Sp(2) = R3; - Sp(1) = R2; - Sp(0) = R1; - SAVE_THREAD_STATE(); - TSO_what_next(CurrentTSO) = ThreadRunGHC; - R1 = ThreadBlocked; - jump StgReturn; -} - -/*- 6 Regs -------------------------------------------------------------------*/ - -gran_block_6 -{ - Sp_adj(-6); - Sp(5) = R6; - Sp(4) = R5; - Sp(3) = R4; - Sp(2) = R3; - Sp(1) = R2; - Sp(0) = R1; - SAVE_THREAD_STATE(); - TSO_what_next(CurrentTSO) = ThreadRunGHC; - R1 = ThreadBlocked; - jump StgReturn; -} - -/*- 7 Regs -------------------------------------------------------------------*/ - -gran_block_7 -{ - Sp_adj(-7); - Sp(6) = R7; - Sp(5) = R6; - Sp(4) = R5; - Sp(3) = R4; - Sp(2) = R3; - Sp(1) = R2; - Sp(0) = R1; - SAVE_THREAD_STATE(); - TSO_what_next(CurrentTSO) = ThreadRunGHC; - R1 = ThreadBlocked; - jump StgReturn; -} - -/*- 8 Regs -------------------------------------------------------------------*/ - -gran_block_8 -{ - Sp_adj(-8); - Sp(7) = R8; - Sp(6) = R7; - Sp(5) = R6; - Sp(4) = R5; - Sp(3) = R4; - Sp(2) = R3; - Sp(1) = R2; - Sp(0) = R1; - SAVE_THREAD_STATE(); - TSO_what_next(CurrentTSO) = ThreadRunGHC; - R1 = ThreadBlocked; - jump StgReturn; -} - -#endif - -#if 0 && defined(PAR) - -/* - Similar to stg_block_1 (called via StgMacro BLOCK_NP) but separates the - saving of the thread state from the actual jump via an StgReturn. - We need this separation because we call RTS routines in blocking entry codes - before jumping back into the RTS (see parallel/FetchMe.hc). -*/ - -par_block_1_no_jump -{ - Sp_adj(-1); - Sp(0) = R1; - SAVE_THREAD_STATE(); -} - -par_jump -{ - TSO_what_next(CurrentTSO) = ThreadRunGHC; - R1 = ThreadBlocked; - jump StgReturn; -} - -#endif - /* ----------------------------------------------------------------------------- Heap checks in Primitive case alternatives |