[Git][ghc/ghc][wip/T23003] rts/nonmoving: Fix on LLP64 platforms
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Wed Oct 4 03:40:02 UTC 2023
Ben Gamari pushed to branch wip/T23003 at Glasgow Haskell Compiler / GHC
Commits:
eba65885 by Ben Gamari at 2023-10-03T23:39:44-04:00
rts/nonmoving: Fix on LLP64 platforms
Previously `NONMOVING_SEGMENT_MASK` and friends were defined with the `UL`
size suffix. However, this is wrong on LLP64 platforms like Windows,
where `long` is 32-bits.
Fixes #23003.
Fixes #24042.
- - - - -
1 changed file:
- rts/sm/NonMoving.h
Changes:
=====================================
rts/sm/NonMoving.h
=====================================
@@ -17,13 +17,13 @@
#include "BeginPrivate.h"
// Segments
-#define NONMOVING_SEGMENT_BITS 15UL // 2^15 = 32kByte
+#define NONMOVING_SEGMENT_BITS 15ULL // 2^15 = 32kByte
// Mask to find base of segment
-#define NONMOVING_SEGMENT_MASK ((1UL << NONMOVING_SEGMENT_BITS) - 1)
+#define NONMOVING_SEGMENT_MASK ((1ULL << NONMOVING_SEGMENT_BITS) - 1)
// In bytes
-#define NONMOVING_SEGMENT_SIZE (1UL << NONMOVING_SEGMENT_BITS)
+#define NONMOVING_SEGMENT_SIZE (1ULL << NONMOVING_SEGMENT_BITS)
// In words
-#define NONMOVING_SEGMENT_SIZE_W ((1UL << NONMOVING_SEGMENT_BITS) / SIZEOF_VOID_P)
+#define NONMOVING_SEGMENT_SIZE_W ((1ULL << NONMOVING_SEGMENT_BITS) / SIZEOF_VOID_P)
// In blocks
#define NONMOVING_SEGMENT_BLOCKS (NONMOVING_SEGMENT_SIZE / BLOCK_SIZE)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/eba6588544165a8da4107e0dfde7ce2fbdd6d945
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/eba6588544165a8da4107e0dfde7ce2fbdd6d945
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20231003/6c4f999d/attachment-0001.html>
More information about the ghc-commits
mailing list