/* -----------------------------------------------------------------------------
- * $Id: PrimOps.h,v 1.94 2002/06/03 11:31:55 simonmar Exp $
+ * $Id: PrimOps.h,v 1.96 2002/07/17 09:21:48 simonmar Exp $
*
* (c) The GHC Team, 1998-2000
*
#if SIZEOF_VOID_P == 4
#ifdef WORDS_BIGENDIAN
-#define C 0
-#define R 1
+#define RTS_CARRY_IDX__ 0
+#define RTS_REM_IDX__ 1
#else
-#define C 1
-#define R 0
+#define RTS_CARRY_IDX__ 1
+#define RTS_REM_IDX__ 0
#endif
typedef union {
StgInt32 r, c; \
long_long_u z; \
z.l = (StgInt64)a * (StgInt64)b; \
- r = z.i[R]; \
- c = z.i[C]; \
+ r = z.i[RTS_REM_IDX__]; \
+ c = z.i[RTS_CARRY_IDX__]; \
if (c == 0 || c == -1) { \
c = ((StgWord)((a^b) ^ r)) \
>> (BITS_IN (I_) - 1); \
* you test it thoroughly after changing it.
*/
-#undef C
-#undef R
-
#else
#define HALF_INT (((I_)1) << (BITS_IN (I_) / 2))
#define STG_SIG_ERR (-3)
#define STG_SIG_HAN (-4)
-extern StgInt stg_sig_install (StgInt, StgInt, StgStablePtr, sigset_t *);
-#define stg_sig_default(sig,mask) stg_sig_install(sig,STG_SIG_DFL,0,(sigset_t *)mask)
-#define stg_sig_ignore(sig,mask) stg_sig_install(sig,STG_SIG_IGN,0,(sigset_t *)mask)
-#define stg_sig_catch(sig,ptr,mask) stg_sig_install(sig,STG_SIG_HAN,ptr,(sigset_t *)mask)
-
+extern StgInt stg_sig_install (StgInt, StgInt, StgStablePtr, void *);
+#define stg_sig_default(sig,mask) stg_sig_install(sig,STG_SIG_DFL,0,(void *)mask)
+#define stg_sig_ignore(sig,mask) stg_sig_install(sig,STG_SIG_IGN,0,(void *)mask)
+#define stg_sig_catch(sig,ptr,mask) stg_sig_install(sig,STG_SIG_HAN,ptr,(void *)mask)
/* ------------------------------------------------------------------------
Parallel PrimOps