summaryrefslogtreecommitdiff
path: root/ghc/includes/mkNativeHdr.c
diff options
context:
space:
mode:
authorsewardj <unknown>2001-12-12 18:12:46 +0000
committersewardj <unknown>2001-12-12 18:12:46 +0000
commit0b447a84debf4d99aa089ca5b25ab5554ef8411c (patch)
treee69b875cf9fe5cf5164228e38e83cc8053edb74d /ghc/includes/mkNativeHdr.c
parent7738ad979047a82bfa33bbde03bac9000b2a27f9 (diff)
downloadhaskell-0b447a84debf4d99aa089ca5b25ab5554ef8411c.tar.gz
[project @ 2001-12-12 18:12:45 by sewardj]
Make the sparc native code generator work again after recent primop hackery. * Track the change from PrimOp to MachOp at the Stix level. * Teach the sparc insn selector how to generate 64-bit code. * Fix various bogons in sparc {Int,Double,Float} <-> {Int,Double,Float} conversions which only happened to generate correct code by accident, so far. * Synthesise BaseReg from &MainCapability.r on archs which do not have BaseReg in a regiser (eg sparc :) At the moment {add,sub,mul}Int# are not implemented. To be fixed.
Diffstat (limited to 'ghc/includes/mkNativeHdr.c')
-rw-r--r--ghc/includes/mkNativeHdr.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ghc/includes/mkNativeHdr.c b/ghc/includes/mkNativeHdr.c
index 7b2bebd8eb..b1500d5397 100644
--- a/ghc/includes/mkNativeHdr.c
+++ b/ghc/includes/mkNativeHdr.c
@@ -1,5 +1,5 @@
/* --------------------------------------------------------------------------
- * $Id: mkNativeHdr.c,v 1.6 2001/11/08 12:46:31 simonmar Exp $
+ * $Id: mkNativeHdr.c,v 1.7 2001/12/12 18:12:46 sewardj Exp $
*
* (c) The GHC Team, 1992-1998
*
@@ -44,6 +44,8 @@
#define OFFSET_stgGCEnter1 FUN_OFFSET(stgGCEnter1)
#define OFFSET_stgUpdatePAP FUN_OFFSET(stgUpdatePAP)
+#define OFFW_Capability_r OFFSET(cap, cap.r)
+
#define TSO_SP OFFSET(tso, tso.sp)
#define TSO_SU OFFSET(tso, tso.su)
#define TSO_STACK OFFSET(tso, tso.stack)
@@ -98,6 +100,10 @@ main()
printf("#define OFFSET_stgGCEnter1 (%d)\n", OFFSET_stgGCEnter1);
printf("#define OFFSET_stgUpdatePAP (%d)\n", OFFSET_stgUpdatePAP);
+ printf("\n-- Offset of the .r (StgRegTable) field in a Capability\n");
+
+ printf("#define OFFW_Capability_r (%d)\n", OFFW_Capability_r);
+
printf("\n-- Storage Manager offsets for the Native Code Generator\n");
printf("\n-- TSO offsets for the Native Code Generator\n");