[Git][ghc/ghc][wip/T23003] rts/nonmoving: Fix on LLP64 platforms
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Mon Oct 2 14:09:59 UTC 2023
Ben Gamari pushed to branch wip/T23003 at Glasgow Haskell Compiler / GHC
Commits:
5ec0c2ec by Ben Gamari at 2023-10-02T10:09:43-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 #23042.
- - - - -
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/5ec0c2ecb0d77e03b78a5ac44f8b86558cc0155f
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5ec0c2ecb0d77e03b78a5ac44f8b86558cc0155f
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/20231002/ab267143/attachment-0001.html>
More information about the ghc-commits
mailing list