From: sewardj Date: Tue, 8 Jan 2002 10:36:24 +0000 (+0000) Subject: [project @ 2002-01-08 10:36:24 by sewardj] X-Git-Tag: Approximately_9120_patches~304 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e1ac738d00eb2a5db0d20c49315f3247f970b61f;p=ghc-hetmet.git [project @ 2002-01-08 10:36:24 by sewardj] merge from the stable branch: 1.70.4.2 fptools/ghc/compiler/nativeGen/StixPrim.lhs 1.5.10.3 fptools/ghc/includes/mkNativeHdr.c Track recent changes to HpLim assignment in load_thread_state. --- diff --git a/ghc/compiler/nativeGen/StixPrim.lhs b/ghc/compiler/nativeGen/StixPrim.lhs index e7909b8..c70a237 100644 --- a/ghc/compiler/nativeGen/StixPrim.lhs +++ b/ghc/compiler/nativeGen/StixPrim.lhs @@ -295,13 +295,25 @@ load_thread_state ]) : StAssignReg PtrRep stgHpLim - (StMachOp MO_Nat_Add - [StInd PtrRep - (StMachOp MO_Nat_Add - [StReg stgCurrentNursery, - StInt (toInteger (BDESCR_START * BYTES_PER_WORD))]), - StInt (toInteger (bLOCK_SIZE - (1 * BYTES_PER_WORD))) - ]) + (StIndex Word8Rep + (StInd PtrRep + (StIndex PtrRep (StReg stgCurrentNursery) + (StInt (toInteger BDESCR_START)) + ) + ) + (StMachOp MO_Nat_Sub + [StMachOp MO_NatU_Mul + [StInd WordRep + (StIndex PtrRep (StReg stgCurrentNursery) + (StInt (toInteger BDESCR_BLOCKS))), + StInt (toInteger bLOCK_SIZE{-in bytes-}) + ], + StInt (1 * BYTES_PER_WORD) + ] + ) + + ) + : xs ) \end{code} diff --git a/ghc/includes/mkNativeHdr.c b/ghc/includes/mkNativeHdr.c index b1500d5..ebc951f 100644 --- a/ghc/includes/mkNativeHdr.c +++ b/ghc/includes/mkNativeHdr.c @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- - * $Id: mkNativeHdr.c,v 1.7 2001/12/12 18:12:46 sewardj Exp $ + * $Id: mkNativeHdr.c,v 1.8 2002/01/08 10:36:24 sewardj Exp $ * * (c) The GHC Team, 1992-1998 * @@ -52,6 +52,7 @@ #define BDESCR_START OFFSET(bd, bd.start) #define BDESCR_FREE OFFSET(bd, bd.free) +#define BDESCR_BLOCKS OFFSET(bd, bd.blocks) StgRegTable RegTable; @@ -116,6 +117,7 @@ main() printf("#define BDESCR_START %d\n", BDESCR_START); printf("#define BDESCR_FREE %d\n", BDESCR_FREE); + printf("#define BDESCR_BLOCKS %d\n", BDESCR_BLOCKS); printf("\n-- FILE size for the Native Code Generator\n");