Re: vectorized CRC on ARM64

Tomas Vondra <tomas@vondra.me>

From: Tomas Vondra <tomas@vondra.me>
To: John Naylor <johncnaylorls@gmail.com>, Nathan Bossart <nathandbossart@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-04T18:36:53Z
Lists: pgsql-hackers
Hi,

I happened to do some testing on rpi5 with a 32-bit user space, and when
building with this commit I get these warnings from clang:

config.status: linking src/makefiles/Makefile.linux to src/Makefile.port
pg_crc32c_armv8_choose.c:112:1: warning: unused function
'pg_pmull_available' [-Wunused-function]
  112 | pg_pmull_available(void)
      | ^~~~~~~~~~~~~~~~~~
1 warning generated.
pg_crc32c_armv8_choose.c:112:1: warning: unused function
'pg_pmull_available' [-Wunused-function]
  112 | pg_pmull_available(void)
      | ^~~~~~~~~~~~~~~~~~
1 warning generated.
pg_crc32c_armv8_choose.c:112:1: warning: unused function
'pg_pmull_available' [-Wunused-function]
  112 | pg_pmull_available(void)
      | ^~~~~~~~~~~~~~~~~~
1 warning generated.

I suppose the pg_pmull_available() needs to be if-defed with
USE_PMULL_CRC32C_WITH_RUNTIME_CHECK. That removes the warning for me, at
least.


regards

-- 
Tomas Vondra




Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Use C11 alignas instead of pg_attribute_aligned

  2. Add missing guard for __builtin_constant_p

  3. Exit early from pg_comp_crc32c_pmull for small inputs

  4. Fix unused function warning on Arm platforms

  5. Compute CRC32C on ARM using the Crypto Extension where available