-#define BITMAP(lbl,size) \
- static const StgLargeBitmap lbl = { size, {
+#define BITMAP(lbl,size,contents) \
+ static const StgLargeBitmap lbl = { \
+ (size*4+SIZEOF_VOID_P-1)/SIZEOF_VOID_P, { contents } };
+
+#if SIZEOF_VOID_P == 8
+#define BITMAP_SWITCH64(small, large) small
+#define BITMAP64(first, second) \
+ (((StgWord32)(first)) | ((StgWord)(StgWord32)(second) << 32))
+#else
+#define BITMAP_SWITCH64(small, large) large
+#define BITMAP64(first, second) first, second
+#endif
+#define BITMAP32(x) ((StgWord32)(x))
+#define COMMA ,