baseRegOffset (VanillaReg _ ILIT(6)) = OFFSET_R6
baseRegOffset (VanillaReg _ ILIT(7)) = OFFSET_R7
baseRegOffset (VanillaReg _ ILIT(8)) = OFFSET_R8
+baseRegOffset (VanillaReg _ ILIT(9)) = OFFSET_R9
+baseRegOffset (VanillaReg _ ILIT(10)) = OFFSET_R10
baseRegOffset (FloatReg ILIT(1)) = OFFSET_F1
baseRegOffset (FloatReg ILIT(2)) = OFFSET_F2
baseRegOffset (FloatReg ILIT(3)) = OFFSET_F3
CodeSegment(..), StixReg(..), StixTree(..), StixTreeList,
sStLitLbl, pprStixTrees,
- stgBaseReg, stgNode, stgSp, stgSu, stgSpLim, stgHp, stgHpLim, stgTagReg,
+ stgBaseReg, stgNode, stgSp, stgSu, stgSpLim,
+ stgHp, stgHpLim, stgTagReg, stgR9, stgR10,
getUniqLabelNCG,
fixedHS, arrWordsHS, arrPtrsHS
import AbsCUtils ( magicIdPrimRep )
import CallConv ( CallConv, pprCallConv )
import CLabel ( mkAsmTempLabel, CLabel, pprCLabel, pprCLabel_asm )
-import PrimRep ( PrimRep, showPrimRep )
+import PrimRep ( PrimRep(..), showPrimRep )
import PrimOp ( PrimOp, pprPrimOp )
import Unique ( Unique )
import SMRep ( fixedHdrSize, arrWordsHdrSize, arrPtrsHdrSize )
stgSpLim = StReg (StixMagicId SpLim)
stgHp = StReg (StixMagicId Hp)
stgHpLim = StReg (StixMagicId HpLim)
+stgR9 = StReg (StixMagicId (VanillaReg WordRep ILIT(9)))
+stgR10 = StReg (StixMagicId (VanillaReg WordRep ILIT(10)))
getUniqLabelNCG :: UniqSM CLabel
getUniqLabelNCG
module StixMacro ( macroCode, checkCode ) where
#include "HsVersions.h"
+#include "nativeGen/NCG.h"
import {-# SOURCE #-} StixPrim ( amodeToStix )
fail = StLabel ulbl_fail
join = StLabel ulbl_pass
+
+ -- see includes/StgMacros.h for explaination of these magic consts
+ aLL_NON_PTRS
+ = IF_ARCH_alpha(16383,65535)
+
+ assign_liveness ptr_regs
+ = StAssign WordRep stgR9
+ (StPrim XorOp [StInt aLL_NON_PTRS, ptr_regs])
+ assign_reentry reentry
+ = StAssign WordRep stgR10 reentry
in
returnUs (
assts (assign_ret r ret : gc_ut ptrs nonptrs : join : xs))
HP_CHK_GEN ->
- error "unimplemented check"
- )
+ let [words,liveness,reentry] = args_stix
+ in (\xs -> assign_hp words : cjmp_hp :
+ assts (assign_liveness liveness :
+ assign_reentry reentry :
+ gc_gen : join : xs))
+ )
-- Various canned heap-check routines
gc_unbx_r1 = StJump (StLitLbl (ptext SLIT("stg_gc_unbx_r1")))
gc_f1 = StJump (StLitLbl (ptext SLIT("stg_gc_f1")))
gc_d1 = StJump (StLitLbl (ptext SLIT("stg_gc_d1")))
+gc_gen = StJump (StLitLbl (ptext SLIT("stg_gen_chk")))
gc_ut (StInt p) (StInt np)
= StJump (StLitLbl (ptext SLIT("stg_gc_ut_") <> int (fromInteger p)
/* --------------------------------------------------------------------------
- * $Id: mkNativeHdr.c,v 1.2 1998/12/02 13:21:50 simonm Exp $
+ * $Id: mkNativeHdr.c,v 1.3 2000/01/25 18:09:52 sewardj Exp $
*
* (c) The GHC Team, 1992-1998
*
#define OFFSET_R6 OFFSET(RegTable, RegTable.rR6)
#define OFFSET_R7 OFFSET(RegTable, RegTable.rR7)
#define OFFSET_R8 OFFSET(RegTable, RegTable.rR8)
+#define OFFSET_R9 OFFSET(RegTable, RegTable.rR9)
+#define OFFSET_R10 OFFSET(RegTable, RegTable.rR10)
#define OFFSET_F1 OFFSET(RegTable, RegTable.rF1)
#define OFFSET_F2 OFFSET(RegTable, RegTable.rF2)
#define OFFSET_F3 OFFSET(RegTable, RegTable.rF3)
printf("#define OFFSET_R6 %d\n", OFFSET_R6);
printf("#define OFFSET_R7 %d\n", OFFSET_R7);
printf("#define OFFSET_R8 %d\n", OFFSET_R8);
+ printf("#define OFFSET_R9 %d\n", OFFSET_R9);
+ printf("#define OFFSET_R10 %d\n", OFFSET_R10);
printf("#define OFFSET_F1 %d\n", OFFSET_F1);
printf("#define OFFSET_F2 %d\n", OFFSET_F2);
printf("#define OFFSET_F3 %d\n", OFFSET_F3);