[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Missing _BitScanReverse64()

From: Pádraig Brady
Subject: Re: Missing _BitScanReverse64()
Date: Tue, 06 Jan 2015 02:40:32 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

On 05/01/15 21:32, Gisle Vanem wrote:
> Pádraig Brady wrote:
>> Does the following address the issue for you?
>> It should drop back to the more generic slow path on 32 bit.
> But I do have _BitReverse. That could be an intrinsic.

I was assuming we could do the simpler patch and be
slightly slower on the shrinking 32 bit target.
Though I suppose it's only slightly more awkward to use
builtins where available, so I've done that in the attached.

>> BTW do we have the same issue with __popcnt64 in count-one-bits.h?
> Seems so:
>    __MACHINEX64(unsigned __int64 __popcnt64(unsigned __int64))
> X86 compilers only.

I've included that too, and also count-trailing-zeros is updated.


p.s. I noticed that count_one_bits() branches on the popcount_support
variable on each call, which might negate much of the gain from using this 

Attachment: gnulib-win32-64bit-intrinsics.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]