Re: Missing _BitScanReverse64()

2015-01-05 Thread Paul Eggert
Pádraig Brady wrote: 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 instruction? Could be. As far as I know it's never been benchmarked. I stole that code from Emacs without investigating its perfo

Re: Missing _BitScanReverse64()

2015-01-05 Thread Pádraig Brady
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

Re: [PATCH 02/14] Fix character encoding aliases for OS/2

2015-01-05 Thread KO Myung-Hun
Daiki Ueno wrote: > Sorry for the delay. > > KO Myung-Hun writes: > >>> I'm attaching two patches: the first one is an update of the patch we >>> are currently working on (I added mappings from the "unusable" codepages >>> to their equivalents), and the second one is an alternative >>> impleme

[PATCH] doc/INSTALL: update from autoconf

2015-01-05 Thread Eric Blake
Picks up the copyright year, and also the fact that newer texinfo uses '' instead of `' for quoting. * doc/install.texi: Resync from autoconf. * doc/INSTALL: Reflect recent autoconf update. * doc/INSTALL.ISO: Likewise. * doc/INSTALL.UTF-8: Likewise. Signed-off-by: Eric Blake --- I'm eliding the

Re: [PATCH] stdio: fix use of PRIdMAX on modern mingw

2015-01-05 Thread Pádraig Brady
On 05/01/15 23:03, Eric Blake wrote: > Commit cf88e56ab broke the use of PRIdMAX and friends on modern > mingw64 installations. Basically, when requesting > _USE_MINGW_ANSI_STDIO, not only does mingw turn on support for %lld, > it also rewrites to provide PRIdMAX as "lld" instead of > "I64d" (but

Re: [PATCH] Fix check for pthreads.h pollution on Mingw64

2015-01-05 Thread Pádraig Brady
On 05/01/15 23:06, Eric Blake wrote: > On 12/15/2014 10:55 AM, Daniel P. Berrange wrote: >> I think we just need to ask Fedora 21 maintainers to update their GIT >> snapshot to a non-broken one. > > It doesn't hurt to tackle the problem from BOTH directions, so I'll > probably go ahead and push yo

Re: [PATCH] Fix check for pthreads.h pollution on Mingw64

2015-01-05 Thread Eric Blake
On 12/15/2014 10:55 AM, Daniel P. Berrange wrote: > On Mon, Dec 15, 2014 at 05:44:22PM +, Daniel P. Berrange wrote: >> A previous commit attempted to workaround pollution in the >> Mingw64 pthreads.h header file >> >> commit d5fec6c22f03c6a73d62260c9ce091c10c0a9cbd >> Author: Eric Blake >>

[PATCH] stdio: fix use of PRIdMAX on modern mingw

2015-01-05 Thread Eric Blake
Commit cf88e56ab broke the use of PRIdMAX and friends on modern mingw64 installations. Basically, when requesting _USE_MINGW_ANSI_STDIO, not only does mingw turn on support for %lld, it also rewrites to provide PRIdMAX as "lld" instead of "I64d" (but only when is also included). But if a user i

Re: Missing _BitScanReverse64()

2015-01-05 Thread Gisle Vanem
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. BTW do we have the same issue with __popcnt64 in count-one-bits.h? Seems so: __MACHINEX64(unsigned __int6

Re: Missing _BitScanReverse64()

2015-01-05 Thread Pádraig Brady
On 05/01/15 20:05, Gisle Vanem wrote: > I'm on Win-XP (32bit, MSVC v16) and get a link error on a > missing '__BitScanReverse64()' in test-count-leading-zeros.c:. > Here is the dis-asm: > > _count_leading_zeros_ll: > pushebp > mov ebp,esp > s

Missing _BitScanReverse64()

2015-01-05 Thread Gisle Vanem
I'm on Win-XP (32bit, MSVC v16) and get a link error on a missing '__BitScanReverse64()' in test-count-leading-zeros.c:. Here is the dis-asm: _count_leading_zeros_ll: pushebp mov ebp,esp sub esp,0x0008 X$72: mov