#endif
#include "Stg.h"
+// ToDo: move RtsExternal stuff elsewhere
+#include "RtsExternal.h"
+
// Turn off inlining when debugging - it obfuscates things
#ifdef DEBUG
# undef STATIC_INLINE
#define FLEXIBLE_ARRAY 0
#endif
+#if __GNUC__ >= 3
+#define ATTRIBUTE_ALIGNED(n) __attribute__((aligned(n)))
+#else
+#define ATTRIBUTE_ALIGNED(n) /*nothing*/
+#endif
+
/* Fix for mingw stat problem (done here so it's early enough) */
#ifdef mingw32_HOST_OS
#define __MSVCRT__ 1
* We often want to know the size of something in units of an
* StgWord... (rounded up, of course!)
*/
-#define sizeofW(t) ((sizeof(t)+sizeof(W_)-1)/sizeof(W_))
+#define ROUNDUP_BYTES_TO_WDS(n) (((n) + sizeof(W_) - 1) / sizeof(W_))
+
+#define sizeofW(t) ROUNDUP_BYTES_TO_WDS(sizeof(t))
/*
* It's nice to be able to grep for casts
/* Parallel information */
#include "Parallel.h"
#include "OSThreads.h"
-#include "SMP.h"
+#include "SMPClosureOps.h"
+#include "SpinLock.h"
/* GNU mp library */
#if defined(HAVE_FRAMEWORK_GMP)
extern void __decodeDouble (MP_INT *man, I_ *_exp, StgDouble dbl);
extern void __decodeFloat (MP_INT *man, I_ *_exp, StgFloat flt);
+extern void __decodeDouble_2Int (I_ *man_sign, W_ *man_high, W_ *man_low, I_ *exp, StgDouble dbl);
+extern void __decodeFloat_Int (I_ *man, I_ *exp, StgFloat flt);
#if defined(WANT_DOTNET_SUPPORT)
#include "DNInvoke.h"