The `vector` keyword requires -fzvector which is not available on all
GCC versions (e.g. EL10). Use __attribute__((vector_size(16))) typedefs
instead, matching the existing style in crc32_vx.c.
#include "vx_intrins.h"
-typedef unsigned char uv16qi __attribute__((vector_size(16)));
-typedef unsigned int uv4si __attribute__((vector_size(16)));
-typedef unsigned long long uv2di __attribute__((vector_size(16)));
-
static uint32_t crc32_le_vgfm_16(uint32_t crc, const uint8_t *buf, size_t len) {
/*
* The CRC-32 constant block contains reduction constants to fold and
#include "vx_intrins.h"
static inline void slide_hash_chain(Pos *table, uint32_t entries, uint16_t wsize) {
- const vector unsigned short vmx_wsize = vec_splats(wsize);
+ const uv8hi vmx_wsize = vec_splats(wsize);
Pos *p = table;
do {
- vector unsigned short value, result;
+ uv8hi value, result;
value = vec_xl(0, p);
result = vec_sub(value, vec_min(value, vmx_wsize));
#include <vecintrin.h>
+typedef unsigned char uv16qi __attribute__((vector_size(16)));
+typedef unsigned short uv8hi __attribute__((vector_size(16)));
+typedef unsigned int uv4si __attribute__((vector_size(16)));
+typedef unsigned long long uv2di __attribute__((vector_size(16)));
+
#ifndef vec_sub
#define vec_sub(a, b) ((a) - (b))
#endif