From: John Naylor <john.naylor@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add MSVC support for pg_leftmost_one_pos32() and friends
Date: Mon, 20 Feb 2023 08:00:51 +0000
Message-ID: <E1pU16R-0023US-5e@gemulon.postgresql.org> (raw)
Add MSVC support for pg_leftmost_one_pos32() and friends
To allow testing for general support for fast bitscan intrinsics,
add symbols HAVE_BITSCAN_REVERSE and HAVE_BITSCAN_FORWARD.
Also do related cleanup in AllocSetFreeIndex(): Previously, we
tested for HAVE__BUILTIN_CLZ and copied the relevant internals of
pg_leftmost_one_pos32(), with a special fallback that does less
work than the general fallback for that function. Now that we have
a more general test, we just call pg_leftmost_one_pos32() directly
for platforms with intrinsic support. On gcc at least, there is no
difference in the binary for non-assert builds.
Discussion: https://www.postgresql.org/message-id/CAFBsxsEPc%2BFnX_0vmmQ5DHv60sk4rL_RZJ%2BMD6ei%3D76L0kFMvA%40ma...
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/67731974644ce77129d282434065c3f0be04be92
Modified Files
--------------
src/backend/utils/mmgr/aset.c | 6 ++--
src/include/port/pg_bitutils.h | 75 +++++++++++++++++++++++++++++++++++++-----
2 files changed, 70 insertions(+), 11 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: john.naylor@postgresql.org
Subject: Re: pgsql: Add MSVC support for pg_leftmost_one_pos32() and friends
In-Reply-To: <E1pU16R-0023US-5e@gemulon.postgresql.org>
References: <E1pU16R-0023US-5e@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox