Remove the various mp registers from the StgRegTable
authorDuncan Coutts <duncan@well-typed.com>
Wed, 10 Jun 2009 17:36:09 +0000 (17:36 +0000)
committerDuncan Coutts <duncan@well-typed.com>
Wed, 10 Jun 2009 17:36:09 +0000 (17:36 +0000)
No longer need them as temp vars in the cmm primop implementations.

includes/Regs.h
includes/mkDerivedConstants.c

index c219838..beb71c9 100644 (file)
@@ -47,11 +47,6 @@ typedef union {
     StgTSOPtr      t;
 } StgUnion;
 
     StgTSOPtr      t;
 } StgUnion;
 
-// Urgh.. we don't know the size of an MP_INT here because we haven't
-// #included gmp.h.  We should really autoconf this, but GMP may not
-// be available at ./configure time if we're building it (GMP) locally.
-#define MP_INT_WORDS 3
-
 /* 
  * This is the table that holds shadow-locations for all the STG
  * registers.  The shadow locations are used when:
 /* 
  * This is the table that holds shadow-locations for all the STG
  * registers.  The shadow locations are used when:
@@ -87,14 +82,6 @@ typedef struct StgRegTable_ {
   struct bdescr_ *rCurrentNursery; /* Hp/HpLim point into this block */
   struct bdescr_ *rCurrentAlloc;   /* for allocation using allocate() */
   StgWord         rHpAlloc;    /* number of *bytes* being allocated in heap */
   struct bdescr_ *rCurrentNursery; /* Hp/HpLim point into this block */
   struct bdescr_ *rCurrentAlloc;   /* for allocation using allocate() */
   StgWord         rHpAlloc;    /* number of *bytes* being allocated in heap */
-  // rmp_tmp1..rmp_result2 are only used in THREADED_RTS builds to
-  // avoid per-thread temps in bss, but currently always incldue here
-  // so we just run mkDerivedConstants once
-  StgWord         rmp_tmp_w[MP_INT_WORDS];
-  StgWord         rmp_tmp1[MP_INT_WORDS];
-  StgWord         rmp_tmp2[MP_INT_WORDS];
-  StgWord         rmp_result1[MP_INT_WORDS];
-  StgWord         rmp_result2[MP_INT_WORDS];
   StgWord         rRet;  // holds the return code of the thread
 } StgRegTable;
 
   StgWord         rRet;  // holds the return code of the thread
 } StgRegTable;
 
index 323a7d4..a771818 100644 (file)
@@ -233,13 +233,6 @@ main(int argc, char *argv[])
     field_offset(StgRegTable, rHpAlloc);
     struct_field(StgRegTable, rRet);
 
     field_offset(StgRegTable, rHpAlloc);
     struct_field(StgRegTable, rRet);
 
-    // Needed for SMP builds
-    field_offset(StgRegTable, rmp_tmp_w);
-    field_offset(StgRegTable, rmp_tmp1);
-    field_offset(StgRegTable, rmp_tmp2);
-    field_offset(StgRegTable, rmp_result1);
-    field_offset(StgRegTable, rmp_result2);
-
     def_offset("stgEagerBlackholeInfo", FUN_OFFSET(stgEagerBlackholeInfo));
     def_offset("stgGCEnter1", FUN_OFFSET(stgGCEnter1));
     def_offset("stgGCFun", FUN_OFFSET(stgGCFun));
     def_offset("stgEagerBlackholeInfo", FUN_OFFSET(stgEagerBlackholeInfo));
     def_offset("stgGCEnter1", FUN_OFFSET(stgGCEnter1));
     def_offset("stgGCFun", FUN_OFFSET(stgGCFun));