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 mailto:d...@rice.edu>> wrote:
Ok, so to do it the "quick" way would be to change the translation
of the PopCnt primop in compiler/codeGen/CgPrimO
On Oct 22, 2011, at 5:43 PM, Johan Tibell wrote:
> On Sat, Oct 22, 2011 at 6:40 AM, David Peixotto 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 generatin
On Sat, Oct 22, 2011 at 6:40 AM, David Peixotto 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
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.
I actually first tried the route that David s
I think it depends on how much work you want to do. Correct way is
probably to do as Johan suggests and have proper types for Word8# and
co. It would be really nice to do this as the lower levels of GHC have
very little type safety which makes me sad. Easiest is to call of the
narrow primops. An al
Hi,
On Fri, Oct 21, 2011 at 1:34 PM, David Peixotto wrote:
> I believe that we should be narrowing the argument before calling the
> function (and in fact both gcc and llvm-gcc will narrow it before a
> call to hs_popcnt8). My question is what is the right way to do
> that in the code generator?
After adding support for building GHC with llvm-gcc I had one new test
failure in validate. The failing test is cg071 which tests the popCnt
primitive function. The test is failing because a call to hs_popcnt8
is segfaulting.
The problem seems to be that the words passed to hs_popcnt8 are not
narr