From d07a6e61ca1bcf8d71f2d01e45885f0a3233d1f0 Mon Sep 17 00:00:00 2001 From: sof Date: Sat, 2 Mar 2002 17:43:44 +0000 Subject: [PATCH] [project @ 2002-03-02 17:43:44 by sof] - new utility return address, stg_ut_1_0_unreg_{info,ret}, which returns via Sp[1] (assuming R1 is in Sp[0], which it is in the unregisterised, no-REG_R1 case. The only 'consumer' of this entry point is the implementation of PrimOps.takeMVarzh_fast in an unregisterised build. --- ghc/rts/HeapStackCheck.hc | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/ghc/rts/HeapStackCheck.hc b/ghc/rts/HeapStackCheck.hc index 55c3988..f3882fe 100644 --- a/ghc/rts/HeapStackCheck.hc +++ b/ghc/rts/HeapStackCheck.hc @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: HeapStackCheck.hc,v 1.25 2002/02/28 18:54:53 sof Exp $ + * $Id: HeapStackCheck.hc,v 1.26 2002/03/02 17:43:44 sof Exp $ * * (c) The GHC Team, 1998-1999 * @@ -669,14 +669,9 @@ INFO_TABLE_SRT_BITMAP(stg_gc_unpt_r1_info, stg_gc_unpt_r1_ret, 0/*BITMAP*/, EXTFUN(stg_gc_unpt_r1_ret) { FB_ -#ifdef REG_R1 R1.w = Sp[0]; Sp += 1; JMP_(ENTRY_CODE(Sp[0])); -#else - /* Keep R1 on the stack */ - JMP_(ENTRY_CODE(Sp[1])); -#endif FE_ } @@ -690,6 +685,20 @@ EXTFUN(stg_gc_unpt_r1) FE_ } +/*-- Unboxed tuple return (unregisterised build only)------------------ */ + +INFO_TABLE_SRT_BITMAP(stg_ut_1_0_unreg_info, stg_ut_1_0_unreg_ret, 0/*BITMAP*/, + 0/*SRT*/, 0/*SRT_OFF*/, 0/*SRT_LEN*/, + RET_SMALL,, EF_, 0, 0); + +EXTFUN(stg_ut_1_0_unreg_ret) +{ + FB_ + /* R1 is on the stack (*Sp) */ + JMP_(ENTRY_CODE(Sp[1])); + FE_ +} + /*-- R1 is unboxed -------------------------------------------------- */ INFO_TABLE_SRT_BITMAP(stg_gc_unbx_r1_info, stg_gc_unbx_r1_ret, 1/*BITMAP*/, -- 1.7.10.4