#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
}
#endif
+ ASSERT(sizeof(step_workspace) == 16 * sizeof(StgWord));
+ // otherwise adjust the padding in step_workspace.
+
// tell the stats department that we've started a GC
stat_startGC();
bdescr * part_list;
unsigned int n_part_blocks; // count of above
-} step_workspace;
+ StgWord pad[5];
+
+} step_workspace ATTRIBUTE_ALIGNED(64);
+// align so that computing gct->steps[n] is a shift, not a multiply
+// fails if the size is <64, which is why we need the pad above
/* ----------------------------------------------------------------------------
GC thread object