X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FConstants.h;h=5e02a98e864afc87bca7dc0592bb92e10582ab51;hb=0161fb7f6f98cc3943444595e0b3726c85e9361f;hp=c521b768a0065d254fb10d9e72e96ed7c455c1db;hpb=438596897ebbe25a07e1c82085cfbc5bdb00f09e;p=ghc-hetmet.git diff --git a/ghc/includes/Constants.h b/ghc/includes/Constants.h index c521b76..5e02a98 100644 --- a/ghc/includes/Constants.h +++ b/ghc/includes/Constants.h @@ -1,5 +1,7 @@ /* ---------------------------------------------------------------------------- - * $Id: Constants.h,v 1.2 1998/12/02 13:21:03 simonm Exp $ + * $Id: Constants.h,v 1.17 2001/08/01 08:20:33 simonmar Exp $ + * + * (c) The GHC Team, 1998-1999 * * Constants * @@ -16,14 +18,17 @@ 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 TICKY_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 @@ -33,13 +38,15 @@ NOTE: keep these in line with the real definitions in InfoTables.h - NOTE: the PROF, GRAN and TICKY values are *wrong* (ToDo) + 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 TICKY_ITBL_SIZE 1 +#define PAR_ITBL_SIZE 0 +#define TICKY_ITBL_SIZE 0 /* ----------------------------------------------------------------------------- Minimum closure sizes @@ -88,33 +95,37 @@ #define MAX_SPEC_AP_SIZE 8 +/* Specialised FUN/THUNK/CONSTR closure types */ + +#define MAX_SPEC_THUNK_SIZE 2 +#define MAX_SPEC_FUN_SIZE 2 +#define MAX_SPEC_CONSTR_SIZE 2 + /* ----------------------------------------------------------------------------- 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 -#define UF_CCS 3 /* ----------------------------------------------------------------------------- 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. @@ -146,15 +157,25 @@ #define INT64_SIZE 2 #endif + +/*---- The size of StgWord, in bytes. */ +#define WORD_SIZE SIZEOF_VOID_P + /*---- Maximum number of constructors in a data type for direct-returns. */ #define MAX_VECTORED_RTN 8 -/*---- Range of built-in table of static small int-like closures. */ +/*---- Range of built-in table of static small int-like and char-like closures. */ -#define MAX_INTLIKE (16) +#define MAX_INTLIKE 16 #define MIN_INTLIKE (-16) +#define MAX_CHARLIKE 255 +#define MIN_CHARLIKE 0 + +/* You can change these constants (I hope) but be sure to modify + rts/StgMiscClosures.hs accordingly. */ + /*---- Minimum number of words left in heap after GC to carry on */ #define HEAP_HWM_WORDS 1024 @@ -178,18 +199,11 @@ #define INFO_FIRST_TAG 0 /* ----------------------------------------------------------------------------- - Context switch timing constants. - -------------------------------------------------------------------------- */ - -#define CS_MAX_FREQUENCY 100 /* context switches per second */ -#define CS_MIN_MILLISECS (1000/CS_MAX_FREQUENCY)/* milliseconds per slice */ - -/* ----------------------------------------------------------------------------- How much C stack to reserve for local temporaries when in the STG 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 @@ -207,8 +221,8 @@ -------------------------------------------------------------------------- */ /* 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