From: simonmar Date: Mon, 28 Apr 2003 10:02:15 +0000 (+0000) Subject: [project @ 2003-04-28 10:02:15 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~938 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=a5fb24aa07bf961023a79b1e947e223d91becd2f;p=ghc-hetmet.git [project @ 2003-04-28 10:02:15 by simonmar] Add a compile-time sanity check that RESERVED_STACK_WORDS is right. --- diff --git a/ghc/includes/StgMacros.h b/ghc/includes/StgMacros.h index 8c319d7..2aecd45 100644 --- a/ghc/includes/StgMacros.h +++ b/ghc/includes/StgMacros.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgMacros.h,v 1.52 2003/04/28 09:57:12 simonmar Exp $ + * $Id: StgMacros.h,v 1.53 2003/04/28 10:02:15 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -259,6 +259,13 @@ typedef StgWord StgWordArray[]; #define RET_DYN_NONPTR_REGS_SIZE 10 #define ALL_NON_PTRS 0xff +// Sanity check that RESERVED_STACK_WORDS is reasonable. We can't +// just derive RESERVED_STACK_WORDS because it's used in Haskell code +// too. +#if RESERVED_STACK_WORDS != (3 + RET_DYN_BITMAP_SIZE + RET_DYN_NONPTR_REGS_SIZE) +#error RESERVED_STACK_WORDS may be wrong! +#endif + #define LIVENESS_MASK(ptr_regs) (ALL_NON_PTRS ^ (ptr_regs)) // We can have up to 255 pointers and 255 nonpointers in the stack