Re: vectorized CRC on ARM64
John Naylor <johncnaylorls@gmail.com>
From: John Naylor <johncnaylorls@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-06T02:38:45Z
Lists: pgsql-hackers
On Sat, Apr 4, 2026 at 8:52 PM John Naylor <johncnaylorls@gmail.com> wrote: > Let's see what the buildfarm thinks. hoatzin is failing with: [1481/2135] "link" @src/backend/postgres.exe.rsp FAILED: src/backend/postgres.exe src/backend/postgres.pdb "link" @src/backend/postgres.exe.rsp Creating library src\\backend\\postgres.lib utils_hash_pg_crc.c.obj : error LNK2001: unresolved external symbol __builtin_constant_p That should have been pg_integer_constant_p to work on MSVC since length in bytes is an integer. That symbol is new in the PG19 cycle and I didn't know about it until now. I've pushed a fix using that, and appropriate guards. The earlier use of __builtin_constant_p in the x86 case didn't happen to cause any failures on MSVC for some reason. That path needs a guard as well, but since that's backpatchable I handle it later. It's unlikely anyone passing special CFLAGS is using a non-mainstream compiler, but that's still a potential trap waiting for someone. -- John Naylor Amazon Web Services
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Use C11 alignas instead of pg_attribute_aligned
- 182f6944d3d0 19 (unreleased) landed
- 8061bfd15abe master landed
-
Add missing guard for __builtin_constant_p
- 936d8974c3bc 18.4 landed
- 676626426285 19 (unreleased) landed
-
Exit early from pg_comp_crc32c_pmull for small inputs
- 948ef7cdc499 19 (unreleased) landed
-
Fix unused function warning on Arm platforms
- 2849fe4c9785 19 (unreleased) landed
-
Compute CRC32C on ARM using the Crypto Extension where available
- fbc57f2bc2ee 19 (unreleased) landed