[project @ 2005-02-28 12:03:12 by simonmar]
[ghc-hetmet.git] / ghc / includes / Cmm.h
index 0dde2c8..240b16a 100644 (file)
@@ -97,7 +97,7 @@
 
 #if SIZEOF_INT == 4
 #define CInt bits32
-#elif SIZEOF_INT = 8
+#elif SIZEOF_INT == 8
 #define CInt bits64
 #else
 #error Unknown int size
 
 #if SIZEOF_LONG == 4
 #define CLong bits32
-#elif SIZEOF_LONG = 8
+#elif SIZEOF_LONG == 8
 #define CLong bits64
 #else
 #error Unknown long size
 #define HALF_W_(x) %lobits32(x)
 #endif
 
+#if SIZEOF_INT == 4 && SIZEOF_W == 8
+#define W_TO_INT(x) %lobits32(x)
+#elif SIZEOF_INT == SIZEOF_W
+#define W_TO_INT(x) (x)
+#endif
+
 /* -----------------------------------------------------------------------------
    Heap/stack access, and adjusting the heap/stack pointers.
    -------------------------------------------------------------------------- */
        if (predicate) {                        \
            /*null*/;                           \
        } else {                                \
-           foreign "C" _stgAssert(NULL, __LINE__); \
+           foreign "C" _assertFail(NULL, __LINE__); \
         }
 #else
 #define ASSERT(p) /* nothing */
    TICK_ALLOC_HEAP_NOCTR(alloc);
 
 #define MAYBE_GC(liveness,reentry)                     \
-   if (CInt[alloc_blocks] >= CInt[alloc_blocks_lim]) { \
+   if (W_[alloc_blocks] >= W_[alloc_blocks_lim]) {     \
        R9  = liveness;                                 \
         R10 = reentry;                                 \
         jump stg_gc_gen_hp;                            \