/* ----------------------------------------------------------------------------
- * $Id: ClosureMacros.h,v 1.16 1999/05/13 17:31:06 simonm Exp $
+ * $Id: ClosureMacros.h,v 1.17 1999/06/25 09:13:37 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
#define SET_INFO(c,i) ((c)->header.info = (i))
#define GET_INFO(c) ((c)->header.info)
-#if USE_MINIINTERPRETER
-#define INIT_ENTRY(e) entry : (F_)(e)
-#define GET_ENTRY(c) ((c)->header.info->entry)
-#define ENTRY_CODE(info) (((StgInfoTable *)info)->entry)
-#define INFO_PTR_TO_STRUCT(info) ((StgInfoTable *)info)
-#define get_itbl(c) ((c)->header.info)
-static __inline__ StgFunPtr get_entry(const StgInfoTable *itbl) {
- return itbl->entry;
-}
-#else
+#ifdef TABLES_NEXT_TO_CODE
#define INIT_ENTRY(e) code : {}
#define GET_ENTRY(c) ((StgFunPtr)((c)->header.info))
#define ENTRY_CODE(info) (info)
static __inline__ StgFunPtr get_entry(const StgInfoTable *itbl) {
return (StgFunPtr)(itbl+1);
}
+#else
+#define INIT_ENTRY(e) entry : (F_)(e)
+#define GET_ENTRY(c) ((c)->header.info->entry)
+#define ENTRY_CODE(info) (((StgInfoTable *)info)->entry)
+#define INFO_PTR_TO_STRUCT(info) ((StgInfoTable *)info)
+#define get_itbl(c) ((c)->header.info)
+static __inline__ StgFunPtr get_entry(const StgInfoTable *itbl) {
+ return itbl->entry;
+}
#endif
/* -----------------------------------------------------------------------------
#define IS_HUGS_CONSTR_INFO(info) 0 /* ToDo: more than mildly bogus */
#endif
-#ifdef USE_MINIINTERPRETER
-/* in the mininterpreter, we put infotables on closures */
-#define LOOKS_LIKE_GHC_INFO(info) IS_CODE_PTR(info)
+#ifdef HAVE_WIN32_DLL_SUPPORT
+# define LOOKS_LIKE_GHC_INFO(info) (!HEAP_ALLOCED(info) && !LOOKS_LIKE_STATIC_CLOSURE(info))
#else
-/* otherwise we have entry pointers on closures */
-# ifdef HAVE_WIN32_DLL_SUPPORT
-# define LOOKS_LIKE_GHC_INFO(info) (!HEAP_ALLOCED(info) && !LOOKS_LIKE_STATIC_CLOSURE(info))
-# else
-# define LOOKS_LIKE_GHC_INFO(info) IS_CODE_PTR(info)
-# endif
+# define LOOKS_LIKE_GHC_INFO(info) IS_CODE_PTR(info)
#endif
/* -----------------------------------------------------------------------------
/* ----------------------------------------------------------------------------
- * $Id: InfoMacros.h,v 1.6 1999/05/13 17:31:06 simonm Exp $
+ * $Id: InfoMacros.h,v 1.7 1999/06/25 09:13:37 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
* layout field, so we only need one macro for these.
*/
-#ifndef USE_MINIINTERPRETER
+#ifdef TABLES_NEXT_TO_CODE
typedef struct {
StgFunPtr vec[2];
alt_5, alt_6, alt_7, alt_8 } \
}
-#endif /* MINI_INTERPRETER */
+#endif /* TABLES_NEXT_TO_CODE */
/* For polymorphic activation records, we need both a direct return
* address and a return vector:
typedef vec_info_8 StgPolyInfoTable;
-#ifdef USE_MINIINTERPRETER
+#ifndef TABLES_NEXT_TO_CODE
#define VEC_POLY_INFO_TABLE(nm, bitmap_, \
srt_, srt_off_, srt_len_, \
/* ----------------------------------------------------------------------------
- * $Id: InfoTables.h,v 1.15 1999/05/13 17:31:07 simonm Exp $
+ * $Id: InfoTables.h,v 1.16 1999/06/25 09:13:37 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
StgWord type : 16; /* } These 2 elements fit into 32 bits */
StgWord srt_len : 16; /* } */
#endif
-#if USE_MINIINTERPRETER
+#ifdef TABLES_NEXT_TO_CODE
+ StgCode code[0];
+#else
StgFunPtr entry;
StgFunPtr vector[0];
-#else
- StgCode code[0];
#endif
} StgInfoTable;
/* -----------------------------------------------------------------------------
- * $Id: MachRegs.h,v 1.4 1999/02/05 16:02:23 simonm Exp $
+ * $Id: MachRegs.h,v 1.5 1999/06/25 09:13:38 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
#endif /* hppa */
/* -----------------------------------------------------------------------------
- The Intel iX86 register mapping
+ The x86 register mapping
Ok, we've only got 6 general purpose registers, a frame pointer and a
stack pointer. \tr{%eax} and \tr{%edx} are return values from C functions,
#define REG(x) __asm__("%" #x)
+#ifndef not_doing_dynamic_linking
#define REG_Base ebx
+#endif
#define REG_Sp ebp
#if STOLEN_X86_REGS >= 3
/* -----------------------------------------------------------------------------
- * $Id: Stg.h,v 1.12 1999/05/11 16:46:20 keithw Exp $
+ * $Id: Stg.h,v 1.13 1999/06/25 09:13:38 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
#define COMPILER 1
#endif
+#ifndef USE_MINIINTERPRETER
+#define TABLES_NEXT_TO_CODE
+#endif
+
/* bit macros
*/
#define BITS_PER_BYTE 8
/* -----------------------------------------------------------------------------
- * $Id: StgMacros.h,v 1.11 1999/05/13 17:31:07 simonm Exp $
+ * $Id: StgMacros.h,v 1.12 1999/06/25 09:13:38 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
The extra subtraction of one word is because tags start at zero.
-------------------------------------------------------------------------- */
-#ifdef USE_MINIINTERPRETER
-#define RET_VEC(p,t) (((StgInfoTable *)p)->vector[t])
-#else
+#ifdef TABLES_NEXT_TO_CODE
#define RET_VEC(p,t) (*((P_)(p) - sizeofW(StgInfoTable) - t - 1))
+#else
+#define RET_VEC(p,t) (((StgInfoTable *)p)->vector[t])
#endif
/* -----------------------------------------------------------------------------
# define UPD_BH_SINGLE_ENTRY(thunk) /* nothing */
#endif /* EAGER_BLACKHOLING */
+#define UPD_FRAME_UPDATEE(p) (((StgUpdateFrame *)(p))->updatee)
+#define UPDATE_SU_FROM_UPD_FRAME(p) (Su=((StgUpdateFrame *)(p))->link)
+
/* -----------------------------------------------------------------------------
Moving Floats and Doubles