summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheng Shao <astrohavoc@gmail.com>2022-10-04 15:35:32 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-10-05 20:40:41 -0400
commit8a31d02e0b76ea0d279f5c6d74239e6aa45ef631 (patch)
tree73c5ea158e394cdebbd04de29320ffa674fa153d
parentfbe1e86ea5e793533898d6935a3b4e60afbd04a7 (diff)
downloadhaskell-8a31d02e0b76ea0d279f5c6d74239e6aa45ef631.tar.gz
rts: don't enforce aligned((8)) on 32-bit targets
We simply need to align to the word size for pointer tagging to work. On 32-bit targets, aligned((8)) is wasteful.
-rw-r--r--rts/include/Stg.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/include/Stg.h b/rts/include/Stg.h
index 209db1b0f5..5849de32c1 100644
--- a/rts/include/Stg.h
+++ b/rts/include/Stg.h
@@ -263,8 +263,8 @@ typedef StgFunPtr F_;
#define EB_(X) extern const char X[]
#define IB_(X) static const char X[]
/* static (non-heap) closures (requires alignment for pointer tagging): */
-#define EC_(X) extern StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
-#define IC_(X) static StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
+#define EC_(X) extern StgWordArray (X) GNU_ATTRIBUTE(aligned (SIZEOF_VOID_P))
+#define IC_(X) static StgWordArray (X) GNU_ATTRIBUTE(aligned (SIZEOF_VOID_P))
/* writable data (does not require alignment): */
#define ERW_(X) extern StgWordArray (X)
#define IRW_(X) static StgWordArray (X)