Re: centralize CPU feature detection
John Naylor <johncnaylorls@gmail.com>
From: John Naylor <johncnaylorls@gmail.com>
To: Zsolt Parragi <zsolt.parragi@percona.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-27T13:38:36Z
Lists: pgsql-hackers
On Wed, Feb 25, 2026 at 8:09 PM Zsolt Parragi <zsolt.parragi@percona.com> wrote: > > Both look good to me. Pushed 0002 after making sure AVX-512 detection still worked, thanks for the review! I think 0003 needs a link to the Intel manual for the XCR symbol values, and I'll push shortly after I add that. > 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. Yeah, I think that crept in during development to keep Windows CI building with a not-for-commit test module. I'll remove it soon. -- John Naylor Amazon Web Services
Commits
-
Remove extraneous PGDLLIMPORT
- ec5981c3816e 19 (unreleased) landed
-
Refactor detection of x86 ZMM registers
- 51bb4a58ed23 19 (unreleased) landed
-
Centralize detection of x86 CPU features
- 16743db061e4 19 (unreleased) landed
-
Fix USE_SLICING_BY_8_CRC32C builds on x86
- 3322f01a11b7 19 (unreleased) landed
-
Rename pg_crc32c_sse42_choose.c for general purpose
- b9278871f991 19 (unreleased) landed