[project @ 2000-02-28 12:02:31 by sewardj]
[ghc-hetmet.git] / ghc / includes / Constants.h
index 2e2c37b..dc6d3bd 100644 (file)
@@ -1,5 +1,5 @@
 /* ----------------------------------------------------------------------------
- * $Id: Constants.h,v 1.5 1999/02/05 16:02:21 simonm Exp $
+ * $Id: Constants.h,v 1.11 2000/02/28 12:02:32 sewardj Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
    Header Sizes
 
    NOTE: keep these in line with the real definitions in Closures.h
+   HWL: checked GRAN_HDR_SIZE; ok
    -------------------------------------------------------------------------- */
 
 #define STD_HDR_SIZE   1
 #define PROF_HDR_SIZE  1
 #define GRAN_HDR_SIZE  1
+#define PAR_HDR_SIZE   0
 #define TICKY_HDR_SIZE 0
 
-#define ARR_HDR_SIZE   1
+#define ARR_WORDS_HDR_SIZE  1
+#define ARR_PTRS_HDR_SIZE   2
 
 /* -----------------------------------------------------------------------------
    Info Table sizes
    NOTE: keep these in line with the real definitions in InfoTables.h
 
    NOTE: the PROF, and GRAN values are *wrong*  (ToDo)
+   HWL: checked GRAN_ITBL_SIZE; ok
    -------------------------------------------------------------------------- */
 
 #define STD_ITBL_SIZE   3
 #define PROF_ITBL_SIZE  1
 #define GRAN_ITBL_SIZE  1
+#define PAR_ITBL_SIZE   0
 #define TICKY_ITBL_SIZE 0
 
 /* -----------------------------------------------------------------------------
 
 /* -----------------------------------------------------------------------------
    Update Frame Layout
+   GranSim uses an additional word as bitmask in the update frame; actually,
+   not really necessary, but uses standard closure layout that way
+   NB: UF_RET etc are *wrong* in a GranSim setup; should be increased by 1 
+       if compiling for GranSim (currently not used in compiler) -- HWL
    -------------------------------------------------------------------------- */
-
 #define NOSCC_UF_SIZE  3
+#define GRAN_UF_SIZE   4
 #define SCC_UF_SIZE    4
 
-#if defined(PROFILING)
-#define UF_SIZE        SCC_UF_SIZE
-#else
-#define UF_SIZE NOSCC_UF_SIZE
-#endif
-
 #define UF_RET         0
 #define UF_SU          1
 #define UF_UPDATEE     2
 
 /* -----------------------------------------------------------------------------
    SEQ frame size
+
+   I don't think seq frames really need sccs --SDM
+   They don't need a GranSim bitmask either, but who cares anyway -- HWL
    -------------------------------------------------------------------------- */
 
-#if defined(PROFILING)
-#define SEQ_FRAME_SIZE 3
-#else
-#define SEQ_FRAME_SIZE 2
-#endif
+#define NOSCC_SEQ_FRAME_SIZE 2
+#define GRAN_SEQ_FRAME_SIZE  3
+#define SCC_SEQ_FRAME_SIZE   3
 
 /* -----------------------------------------------------------------------------
    STG Registers.
    world.  Used in StgRun.S and StgCRun.c.
    -------------------------------------------------------------------------- */
 
-#define RESERVED_C_STACK_BYTES (512 * SIZEOF_LONG)
+#define RESERVED_C_STACK_BYTES (2048 * SIZEOF_LONG)
 
 /* -----------------------------------------------------------------------------
    How much Haskell stack space to reserve for the saving of registers
    -------------------------------------------------------------------------- */
 
 /* The size of a block */
-#define BLOCK_SIZE   0x2000
-#define BLOCK_SHIFT  13
+#define BLOCK_SIZE   0x1000
+#define BLOCK_SHIFT  12
 
 /* The size of a megablock */
 #define MBLOCK_SIZE    0x100000