Re: centralize CPU feature detection

Zsolt Parragi <zsolt.parragi@percona.com>

From: Zsolt Parragi <zsolt.parragi@percona.com>
To: John Naylor <johncnaylorls@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, root <tenistarkim@gmail.com>, Nathan Bossart <nathandbossart@gmail.com>
Date: 2026-02-25T13:09:21Z
Lists: pgsql-hackers
Both look good to me.

This isn't part of the patch, and it seems harmless, but while
reviewing the CRC functions, I noticed that pg_crc32c.h  is
inconsistent with its dllimport markers, pg_comp_crc32c has 3
different declarations, and only 1 of them is marked PGDLLIMPORT.



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