41 #define INIT_CRC32C(crc) ((crc) = 0xFFFFFFFF)
42 #define EQ_CRC32C(c1, c2) ((c1) == (c2))
44 #if defined(USE_SSE42_CRC32C)
46 #define COMP_CRC32C(crc, data, len) \
47 ((crc) = pg_comp_crc32c_sse42((crc), (data), (len)))
48 #define FIN_CRC32C(crc) ((crc) ^= 0xFFFFFFFF)
52 #elif defined(USE_ARMV8_CRC32C)
55 #define COMP_CRC32C(crc, data, len) \
56 ((crc) = pg_comp_crc32c_armv8((crc), (data), (len)))
57 #define FIN_CRC32C(crc) ((crc) ^= 0xFFFFFFFF)
61 #elif defined(USE_LOONGARCH_CRC32C)
64 #define COMP_CRC32C(crc, data, len) \
65 ((crc) = pg_comp_crc32c_loongarch((crc), (data), (len)))
66 #define FIN_CRC32C(crc) ((crc) ^= 0xFFFFFFFF)
70 #elif defined(USE_SSE42_CRC32C_WITH_RUNTIME_CHECK) || defined(USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK)
76 #define COMP_CRC32C(crc, data, len) \
77 ((crc) = pg_comp_crc32c((crc), (data), (len)))
78 #define FIN_CRC32C(crc) ((crc) ^= 0xFFFFFFFF)
83 #ifdef USE_SSE42_CRC32C_WITH_RUNTIME_CHECK
86 #ifdef USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK
98 #define COMP_CRC32C(crc, data, len) \
99 ((crc) = pg_comp_crc32c_sb8((crc), (data), (len)))
100 #ifdef WORDS_BIGENDIAN
101 #define FIN_CRC32C(crc) ((crc) = pg_bswap32(crc) ^ 0xFFFFFFFF)
103 #define FIN_CRC32C(crc) ((crc) ^= 0xFFFFFFFF)
pg_crc32c pg_comp_crc32c_sb8(pg_crc32c crc, const void *data, size_t len)
pg_crc32c pg_comp_crc32c_armv8(pg_crc32c crc, const void *data, size_t len)
pg_crc32c(* pg_comp_crc32c)(pg_crc32c crc, const void *data, size_t len)
pg_crc32c pg_comp_crc32c_loongarch(pg_crc32c crc, const void *data, size_t len)