From e77996aa35993a6c54a5b2e9dee813f223912bbf Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 9 Nov 1999 15:57:42 +0000 Subject: [PATCH] [project @ 1999-11-09 15:57:39 by simonmar] Fix up some problems with the IN_STG_CODE macro. --- ghc/includes/Regs.h | 6 +++--- ghc/includes/Stg.h | 10 ++++++---- ghc/includes/StgMacros.h | 4 ++-- ghc/rts/HeapStackCheck.h | 3 ++- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/ghc/includes/Regs.h b/ghc/includes/Regs.h index 0cb2eb2..c683137 100644 --- a/ghc/includes/Regs.h +++ b/ghc/includes/Regs.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Regs.h,v 1.6 1999/11/09 15:47:08 simonmar Exp $ + * $Id: Regs.h,v 1.7 1999/11/09 15:57:39 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -63,7 +63,7 @@ typedef struct StgRegTable_ { extern DLL_IMPORT_RTS StgRegTable MainRegTable; #endif -#ifdef IN_STG_CODE +#if IN_STG_CODE /* * Registers Hp and HpLim are global across the entire system, and are @@ -519,7 +519,7 @@ GLOBAL_REG_DECL(bdescr *,CurrentNursery,REG_CurrentNursery) Handy bunches of saves/restores ------------------------------------------------------------------------ */ -#ifdef IN_STG_CODE +#if IN_STG_CODE #define CALLER_SAVE_USER \ CALLER_SAVE_R1 \ diff --git a/ghc/includes/Stg.h b/ghc/includes/Stg.h index f860a6e..c8d729d 100644 --- a/ghc/includes/Stg.h +++ b/ghc/includes/Stg.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Stg.h,v 1.20 1999/11/09 15:47:08 simonmar Exp $ + * $Id: Stg.h,v 1.21 1999/11/09 15:57:40 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -21,12 +21,14 @@ * with that. If "Stg.h" is included via "Rts.h", we're assumed to * be in vanilla C. */ -#if ! IN_STG_CODE +#ifndef IN_STG_CODE +# define IN_STG_CODE 1 +#endif + +#if IN_STG_CODE == 0 # ifndef NO_REGS # define NO_REGS /* don't define fixed registers */ # endif -#else -# define IN_STG_CODE 1 #endif /* Configuration */ diff --git a/ghc/includes/StgMacros.h b/ghc/includes/StgMacros.h index aa3dbf0..9cfc6c6 100644 --- a/ghc/includes/StgMacros.h +++ b/ghc/includes/StgMacros.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgMacros.h,v 1.17 1999/11/09 15:47:09 simonmar Exp $ + * $Id: StgMacros.h,v 1.18 1999/11/09 15:57:40 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -681,7 +681,7 @@ extern DLL_IMPORT_DATA const StgPolyInfoTable seq_frame_info; we have one). -------------------------------------------------------------------------- */ -#ifdef IN_STG_CODE +#if IN_STG_CODE static __inline__ void SaveThreadState(void) diff --git a/ghc/rts/HeapStackCheck.h b/ghc/rts/HeapStackCheck.h index 1f2efee..939b425 100644 --- a/ghc/rts/HeapStackCheck.h +++ b/ghc/rts/HeapStackCheck.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: HeapStackCheck.h,v 1.4 1999/08/25 16:11:48 simonmar Exp $ + * $Id: HeapStackCheck.h,v 1.5 1999/11/09 15:57:42 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -8,6 +8,7 @@ * ---------------------------------------------------------------------------*/ EXTFUN(stg_gc_entertop); +EXTFUN(stg_gc_enter_1_hponly); EXTFUN(stg_gc_enter_1); EXTFUN(stg_gc_enter_2); EXTFUN(stg_gc_enter_3); -- 1.7.10.4