validates breaks on x86_64 (OS X)
Johan Tibell
johan.tibell at gmail.com
Fri Aug 19 00:33:47 CEST 2011
On Thu, Aug 18, 2011 at 11:45 PM, Simon Marlow <marlowsd at gmail.com> wrote:
> It's broken on 32-bit platforms (like Johan, I validated on 64-bit and
> didn't notice the 32-bit breakage). I have a fix on the way...
I got alerted to the problem this morning (which is 32-bit only) and
had a fix that Simon was validating for me. I guess Simon got caught
up in something else while I thought he had already submitted it hence
things are still broken. Apologies. I'm now waiting for Simon to push
the fix. A quick fix is to apply this change:
diff --git a/compiler/prelude/primops.txt.pp b/compiler/prelude/primops.txt.pp
index ee0ec22..8cad832 100644
--- a/compiler/prelude/primops.txt.pp
+++ b/compiler/prelude/primops.txt.pp
@@ -308,13 +308,8 @@ primop PopCnt16Op "popCnt16#" Monadic
Word# -> Word#
{Count the number of set bits in the lower 16 bits of a word.}
primop PopCnt32Op "popCnt32#" Monadic Word# -> Word#
{Count the number of set bits in the lower 32 bits of a word.}
-#if WORD_SIZE_IN_BITS < 64
-primop PopCnt64Op "popCnt64#" Monadic Word64# -> Word#
- {Count the number of set bits in a 64-bit word.}
-#else
-primop PopCnt64Op "popCnt64#" Monadic Word# -> Word#
+primop PopCnt64Op "popCnt64#" GenPrimOp WORD64 -> Word#
{Count the number of set bits in a 64-bit word.}
-#endif
primop PopCntOp "popCnt#" Monadic Word# -> Word#
{Count the number of set bits in a word.}
I was confused about the meaning of Monadic, which I though referred
to the number of arguments in this case.
Johan
More information about the Cvs-ghc
mailing list