Use native CRC instructions on 64-bit LoongArch

John Naylor <john.naylor@postgresql.org>

Commit: 4d14ccd6af6e788a7b79ff3ed77bda5bc71d2edc
Author: John Naylor <john.naylor@postgresql.org>
Date: 2023-08-10T04:36:15Z
Releases: 17.0
Use native CRC instructions on 64-bit LoongArch

As with the Intel and Arm CRC instructions, compiler intrinsics for
them must be supported by the compiler. In contrast, no runtime check
is needed. Aligned memory access is faster, so use the Arm coding as
a model.

YANG Xudong

Discussion: https://postgr.es/m/b522a0c5-e3b2-99cc-6387-58134fb88cbe%40ymatrix.cn

Files

PathChange+/−
config/c-compiler.m4 modified +33 −0
configure modified +66 −8
configure.ac modified +29 −9
meson.build modified +24 −0
src/include/pg_config.h.in modified +3 −0
src/include/port/pg_crc32c.h modified +9 −0
src/port/meson.build modified +3 −0
src/port/pg_crc32c_loongarch.c added +73 −0

Discussion