From a1cb8472337f6a3ba1533010bc1598e2cc6c8212 Mon Sep 17 00:00:00 2001 From: sewardj Date: Mon, 10 Dec 2001 17:55:40 +0000 Subject: [PATCH] [project @ 2001-12-10 17:55:40 by sewardj] Fix a presumably long-standing cut-n-paste-o, wherein HP_CHK_L1 had exactly the same definition as HP_CHK_D1. --- ghc/includes/StgMacros.h | 4 ++-- ghc/rts/HeapStackCheck.hc | 35 ++++++++++++++++++++++++++++++++++- ghc/rts/Linker.c | 3 ++- 3 files changed, 38 insertions(+), 4 deletions(-) diff --git a/ghc/includes/StgMacros.h b/ghc/includes/StgMacros.h index 17c3110..64b0f80 100644 --- a/ghc/includes/StgMacros.h +++ b/ghc/includes/StgMacros.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgMacros.h,v 1.43 2001/11/23 11:58:00 simonmar Exp $ + * $Id: StgMacros.h,v 1.44 2001/12/10 17:55:40 sewardj Exp $ * * (c) The GHC Team, 1998-1999 * @@ -228,7 +228,7 @@ static inline int IS_ARG_TAG( StgWord p ) { return p <= ARGTAG_MAX; } GEN_HP_CHK_ALT(headroom,stg_gc_d1,tag_assts); #define HP_CHK_L1(headroom,tag_assts) \ - GEN_HP_CHK_ALT(headroom,stg_gc_d1,tag_assts); + GEN_HP_CHK_ALT(headroom,stg_gc_l1,tag_assts); #define HP_CHK_UT_ALT(headroom, ptrs, nptrs, r, ret, tag_assts) \ GEN_HP_CHK_ALT(headroom, stg_gc_ut_##ptrs##_##nptrs, \ diff --git a/ghc/rts/HeapStackCheck.hc b/ghc/rts/HeapStackCheck.hc index 52a9985..ad8285c 100644 --- a/ghc/rts/HeapStackCheck.hc +++ b/ghc/rts/HeapStackCheck.hc @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: HeapStackCheck.hc,v 1.19 2001/11/22 14:25:12 simonmar Exp $ + * $Id: HeapStackCheck.hc,v 1.20 2001/12/10 17:55:40 sewardj Exp $ * * (c) The GHC Team, 1998-1999 * @@ -769,6 +769,39 @@ EXTFUN(stg_gc_d1) FE_ } +/*-- L1 contains an int64 ------------------------------------------------- */ + +/* we support int64s of either 1 or 2 words in size */ + +#if SIZEOF_VOID_P == 8 +# define LLI_BITMAP 1 +#else +# define LLI_BITMAP 3 +#endif + +INFO_TABLE_SRT_BITMAP(stg_gc_l1_ret_info, stg_gc_l1_ret, LLI_BITMAP, + 0/*SRT*/, 0/*SRT_OFF*/, 0/*SRT_LEN*/, + RET_SMALL,, EF_, 0, 0); + +EXTFUN(stg_gc_l1_ret) +{ + FB_ + L1 = PK_Int64(Sp); + Sp += sizeofW(StgWord64); + JMP_(ENTRY_CODE(Sp[0])); + FE_ +} + +EXTFUN(stg_gc_l1) +{ + FB_ + Sp -= 1 + sizeofW(StgWord64); + ASSIGN_Int64(Sp+1,L1); + Sp[0] = (W_)&stg_gc_l1_ret_info; + GC_GENERIC + FE_ +} + /* ----------------------------------------------------------------------------- Heap checks for unboxed tuple case alternatives diff --git a/ghc/rts/Linker.c b/ghc/rts/Linker.c index 8dfd88d..153b2bc 100644 --- a/ghc/rts/Linker.c +++ b/ghc/rts/Linker.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Linker.c,v 1.74 2001/11/22 15:15:27 simonmar Exp $ + * $Id: Linker.c,v 1.75 2001/12/10 17:55:40 sewardj Exp $ * * (c) The GHC Team, 2000, 2001 * @@ -162,6 +162,7 @@ typedef struct _RtsSymbolVal { SymX(__stg_chk_1) \ Sym(stg_enterStackTop) \ SymX(stg_gc_d1) \ + SymX(stg_gc_l1) \ SymX(__stg_gc_enter_1) \ SymX(stg_gc_f1) \ SymX(stg_gc_noregs) \ -- 1.7.10.4