On 24/10/2011 15:26, David Peixotto wrote:
On Oct 22, 2011, at 5:43 PM, Johan Tibell wrote:
On Sat, Oct 22, 2011 at 6:40 AM, David Peixotto <[email protected]
<mailto:[email protected]>> wrote:
Ok, so to do it the "quick" way would be to change the translation
of the PopCnt primop in compiler/codeGen/CgPrimOp.hs? The change
would be to first narrow the argument by generating code for the
narrow primop before the code for the PopCnt primop.
You should only have to add calls to the narrowXWord/Int in the base
package. In the instance declarations for Bits in e.g. GHC.Int and
GHC.Word. You should have to touch the code generator I think.
Ah, now I understand. I didn't realize that popcnt was a method of the
Bits class. I think your fix will work. I'll give it a try.
I presume you didn't get around to implementing this fix, because I just
noticed that cgrun071 is failing on OS X 10.8. I think the right fix
for now is to make the primops do the narrowing, until we have proper
Word{8,16,32,64}# types. I commit the fix.
Cheers,
Simon
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc