Re: call popcount32/64 directly on non-x86 platforms - Mailing list pgsql-hackers

From John Naylor
Subject Re: call popcount32/64 directly on non-x86 platforms
Date
Msg-id CAFBsxsFAgUmgSoq-wdPQdnxwvauHjRYvbvqTmku+KShAko11dQ@mail.gmail.com
Whole thread Raw
In response to Re: call popcount32/64 directly on non-x86 platforms  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers

On Thu, Aug 12, 2021 at 9:33 AM David Rowley <dgrowleyml@gmail.com> wrote:

> Something there that might cause confusion is we do a configure check
> to see if popcntq works and define HAVE_X86_64_POPCNTQ if it does.
> I'm still a bit confused at why we bother doing that. Surely it just
> means that if the build machine does not have popcntq that we'll
> always use pg_popcount64_slow, regardless if the machine that's
> actually running the code has popcntq.

Yeah, it's a bit strange, a configure check makes more sense if we have a way to specify we can build with a direct call (like x86-64-v2), but we don't right now. Maybe short-term we could always do the runtime check on x86-64.

--
John Naylor
EDB: http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Shared memory size computation oversight?
Next
From: Julien Rouhaud
Date:
Subject: Re: Shared memory size computation oversight?