Re: centralize CPU feature detection

John Naylor <johncnaylorls@gmail.com>

From: John Naylor <johncnaylorls@gmail.com>
To: Zsolt Parragi <zsolt.parragi@percona.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, root <tenistarkim@gmail.com>, Nathan Bossart <nathandbossart@gmail.com>
Date: 2026-02-23T15:32:50Z
Lists: pgsql-hackers

Attachments

On Fri, Feb 20, 2026 at 3:26 PM Zsolt Parragi <zsolt.parragi@percona.com> wrote:
>
> 1-3 looks good to me, other than the need for the proper commit messages.

I've committed 0001.

> There's a typo in " Are ZMM registeres enabled?" in 3.

Fixed. 0002 and 0003 are attached with draft commit messages. There
was also a cosmetic mistake in an enum member name, whose correction
was squashed in the wrong direction -- this has been fixed. I also
added the new typedef for pgindent and restored a lost comment for
pg_comp_crc32c_choose(). This seems committable, but will double-check
everything works correctly.

-- 
John Naylor
Amazon Web Services

Commits

  1. Remove extraneous PGDLLIMPORT

  2. Refactor detection of x86 ZMM registers

  3. Centralize detection of x86 CPU features

  4. Fix USE_SLICING_BY_8_CRC32C builds on x86

  5. Rename pg_crc32c_sse42_choose.c for general purpose