diff options
author | Daniel Peebles <pumpkingod@gmail.com> | 2011-04-12 13:35:59 +0200 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2011-05-19 14:04:26 +0100 |
commit | a6cc4146630e34f2d69c5a0358a9133420f9102c (patch) | |
tree | 7f090330baa6cfc17067a504784052419783be4d /includes/Cmm.h | |
parent | 7c185cd2525a20dcfa9859c5e6cf2f6300a19cc1 (diff) | |
download | haskell-a6cc4146630e34f2d69c5a0358a9133420f9102c.tar.gz |
Add array copy/clone primops
Diffstat (limited to 'includes/Cmm.h')
-rw-r--r-- | includes/Cmm.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/Cmm.h b/includes/Cmm.h index 0ba14fbff6..641faa216e 100644 --- a/includes/Cmm.h +++ b/includes/Cmm.h @@ -464,8 +464,10 @@ #define StgFunInfoExtra_bitmap(i) StgFunInfoExtraFwd_bitmap(i) #endif -#define mutArrPtrsCardWords(n) \ - ROUNDUP_BYTES_TO_WDS(((n) + (1 << MUT_ARR_PTRS_CARD_BITS) - 1) >> MUT_ARR_PTRS_CARD_BITS) +#define mutArrCardMask ((1 << MUT_ARR_PTRS_CARD_BITS) - 1) +#define mutArrPtrCardDown(i) ((i) >> MUT_ARR_PTRS_CARD_BITS) +#define mutArrPtrCardUp(i) (((i) + mutArrCardMask) >> MUT_ARR_PTRS_CARD_BITS) +#define mutArrPtrsCardWords(n) ROUNDUP_BYTES_TO_WDS(mutArrPtrCardUp(n)) #if defined(PROFILING) || (!defined(THREADED_RTS) && defined(DEBUG)) #define OVERWRITING_CLOSURE(c) foreign "C" overwritingClosure(c "ptr") |