summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Moinvaziri <nathan@nathanm.com>2025-12-31 19:50:10 -0800
committerHans Kristian Rosbach <hk-github@circlestorm.org>2026-01-07 07:46:23 +0100
commit51f6372bf8fe2c35b3d3a16e070aa12e0910a366 (patch)
tree76351197063b57aa16e840d5681850093af605f7
parentd7fc636840b6d6bf2c9b1e0bbbbb08b645659cfd (diff)
downloadProject-Tick-51f6372bf8fe2c35b3d3a16e070aa12e0910a366.tar.gz
Project-Tick-51f6372bf8fe2c35b3d3a16e070aa12e0910a366.zip
Use Z_FORCEINLINE for all adler32 or crc32 implementation functions
-rw-r--r--arch/arm/adler32_neon.c6
-rw-r--r--arch/loongarch/adler32_lasx.c2
-rw-r--r--arch/loongarch/adler32_lsx.c2
-rw-r--r--arch/power/adler32_power8.c2
-rw-r--r--arch/power/adler32_vmx.c2
-rw-r--r--arch/riscv/adler32_rvv.c2
-rw-r--r--arch/riscv/crc32_zbc.c3
-rw-r--r--arch/x86/adler32_avx2.c2
-rw-r--r--arch/x86/adler32_avx512.c2
-rw-r--r--arch/x86/adler32_ssse3.c2
-rw-r--r--arch/x86/chorba_sse41.c2
11 files changed, 13 insertions, 14 deletions
diff --git a/arch/arm/adler32_neon.c b/arch/arm/adler32_neon.c
index 74054c0c39..4943bb9ffb 100644
--- a/arch/arm/adler32_neon.c
+++ b/arch/arm/adler32_neon.c
@@ -20,7 +20,7 @@ static const uint16_t ALIGNED_(64) taps[64] = {
16, 15, 14, 13, 12, 11, 10, 9,
8, 7, 6, 5, 4, 3, 2, 1 };
-static Z_FORCEINLINE void NEON_accum32_copy(uint32_t *s, uint8_t *dst, const uint8_t *buf, size_t len) {
+Z_FORCEINLINE static void NEON_accum32_copy(uint32_t *s, uint8_t *dst, const uint8_t *buf, size_t len) {
uint32x4_t adacc = vdupq_n_u32(0);
uint32x4_t s2acc = vdupq_n_u32(0);
uint32x4_t s2acc_0 = vdupq_n_u32(0);
@@ -144,7 +144,7 @@ static Z_FORCEINLINE void NEON_accum32_copy(uint32_t *s, uint8_t *dst, const uin
s[1] = vget_lane_u32(as, 1);
}
-static Z_FORCEINLINE void NEON_accum32(uint32_t *s, const uint8_t *buf, size_t len) {
+Z_FORCEINLINE static void NEON_accum32(uint32_t *s, const uint8_t *buf, size_t len) {
uint32x4_t adacc = vdupq_n_u32(0);
uint32x4_t s2acc = vdupq_n_u32(0);
uint32x4_t s2acc_0 = vdupq_n_u32(0);
@@ -265,7 +265,7 @@ static void NEON_handle_tail(uint32_t *pair, const uint8_t *buf, size_t len) {
}
}
-static Z_FORCEINLINE uint32_t adler32_copy_impl(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len, const int COPY) {
+Z_FORCEINLINE static uint32_t adler32_copy_impl(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len, const int COPY) {
/* split Adler-32 into component sums */
uint32_t sum2 = (adler >> 16) & 0xffff;
adler &= 0xffff;
diff --git a/arch/loongarch/adler32_lasx.c b/arch/loongarch/adler32_lasx.c
index cf6d33f40f..c63930551c 100644
--- a/arch/loongarch/adler32_lasx.c
+++ b/arch/loongarch/adler32_lasx.c
@@ -34,7 +34,7 @@ static inline uint32_t partial_hsum256(__m256i x) {
extern uint32_t adler32_copy_lsx(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len);
extern uint32_t adler32_lsx(uint32_t adler, const uint8_t *src, size_t len);
-static inline uint32_t adler32_copy_impl(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len, const int COPY) {
+Z_FORCEINLINE static uint32_t adler32_copy_impl(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len, const int COPY) {
if (UNLIKELY(src == NULL)) return 1L;
if (UNLIKELY(len == 0)) return adler;
diff --git a/arch/loongarch/adler32_lsx.c b/arch/loongarch/adler32_lsx.c
index 5978523fb3..75b3b4550e 100644
--- a/arch/loongarch/adler32_lsx.c
+++ b/arch/loongarch/adler32_lsx.c
@@ -29,7 +29,7 @@ static inline uint32_t hsum(__m128i x) {
return __lsx_vpickve2gr_w(sum4, 0);
}
-static inline uint32_t adler32_copy_impl(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len, const int COPY) {
+Z_FORCEINLINE static uint32_t adler32_copy_impl(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len, const int COPY) {
if (UNLIKELY(src == NULL)) return 1L;
if (UNLIKELY(len == 0)) return adler;
diff --git a/arch/power/adler32_power8.c b/arch/power/adler32_power8.c
index bb6013318a..10338fcc8a 100644
--- a/arch/power/adler32_power8.c
+++ b/arch/power/adler32_power8.c
@@ -52,7 +52,7 @@ static inline vector unsigned int vec_sumsu(vector unsigned int __a, vector unsi
return __a;
}
-static inline uint32_t adler32_impl(uint32_t adler, const uint8_t *buf, size_t len) {
+Z_FORCEINLINE static uint32_t adler32_impl(uint32_t adler, const uint8_t *buf, size_t len) {
uint32_t s1 = adler & 0xffff;
uint32_t s2 = (adler >> 16) & 0xffff;
diff --git a/arch/power/adler32_vmx.c b/arch/power/adler32_vmx.c
index 0478d052d7..03a847430a 100644
--- a/arch/power/adler32_vmx.c
+++ b/arch/power/adler32_vmx.c
@@ -118,7 +118,7 @@ static void vmx_accum32(uint32_t *s, const uint8_t *buf, size_t len) {
vec_ste(s2acc, 0, s+1);
}
-static inline uint32_t adler32_impl(uint32_t adler, const uint8_t *buf, size_t len) {
+Z_FORCEINLINE static uint32_t adler32_impl(uint32_t adler, const uint8_t *buf, size_t len) {
uint32_t sum2;
uint32_t pair[16] ALIGNED_(16);
memset(&pair[2], 0, 14);
diff --git a/arch/riscv/adler32_rvv.c b/arch/riscv/adler32_rvv.c
index 41a754ce67..b9360ed72b 100644
--- a/arch/riscv/adler32_rvv.c
+++ b/arch/riscv/adler32_rvv.c
@@ -12,7 +12,7 @@
#include "zbuild.h"
#include "adler32_p.h"
-static inline uint32_t adler32_copy_impl(uint32_t adler, uint8_t* restrict dst, const uint8_t *src, size_t len, int COPY) {
+Z_FORCEINLINE static uint32_t adler32_copy_impl(uint32_t adler, uint8_t* restrict dst, const uint8_t *src, size_t len, int COPY) {
/* split Adler-32 into component sums */
uint32_t sum2 = (adler >> 16) & 0xffff;
adler &= 0xffff;
diff --git a/arch/riscv/crc32_zbc.c b/arch/riscv/crc32_zbc.c
index 71bd70a4e1..570c0a6643 100644
--- a/arch/riscv/crc32_zbc.c
+++ b/arch/riscv/crc32_zbc.c
@@ -31,8 +31,7 @@ static inline uint64_t clmulh(uint64_t a, uint64_t b) {
return res;
}
-static inline uint32_t crc32_clmul_impl(uint64_t crc, const unsigned char *buf,
- uint64_t len) {
+Z_FORCEINLINE static uint32_t crc32_clmul_impl(uint64_t crc, const unsigned char *buf, uint64_t len) {
const uint64_t *buf64 = (const uint64_t *)buf;
uint64_t low = buf64[0] ^ crc;
uint64_t high = buf64[1];
diff --git a/arch/x86/adler32_avx2.c b/arch/x86/adler32_avx2.c
index c714bbd49c..464e83df05 100644
--- a/arch/x86/adler32_avx2.c
+++ b/arch/x86/adler32_avx2.c
@@ -18,7 +18,7 @@
extern uint32_t adler32_copy_sse42(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len);
extern uint32_t adler32_ssse3(uint32_t adler, const uint8_t *src, size_t len);
-static inline uint32_t adler32_copy_impl(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len, const int COPY) {
+Z_FORCEINLINE static uint32_t adler32_copy_impl(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len, const int COPY) {
if (UNLIKELY(src == NULL)) return 1L;
if (UNLIKELY(len == 0)) return adler;
diff --git a/arch/x86/adler32_avx512.c b/arch/x86/adler32_avx512.c
index 5254f2dba6..8ebaf50b2c 100644
--- a/arch/x86/adler32_avx512.c
+++ b/arch/x86/adler32_avx512.c
@@ -15,7 +15,7 @@
#include "x86_intrins.h"
#include "adler32_avx512_p.h"
-static inline uint32_t adler32_copy_impl(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len, const int COPY) {
+Z_FORCEINLINE static uint32_t adler32_copy_impl(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len, const int COPY) {
if (UNLIKELY(src == NULL)) return 1L;
if (UNLIKELY(len == 0)) return adler;
diff --git a/arch/x86/adler32_ssse3.c b/arch/x86/adler32_ssse3.c
index 7c1dc84c9b..5c5a6c5f3c 100644
--- a/arch/x86/adler32_ssse3.c
+++ b/arch/x86/adler32_ssse3.c
@@ -14,7 +14,7 @@
#include <immintrin.h>
-static inline uint32_t adler32_impl(uint32_t adler, const uint8_t *buf, size_t len) {
+Z_FORCEINLINE static uint32_t adler32_impl(uint32_t adler, const uint8_t *buf, size_t len) {
uint32_t sum2;
/* split Adler-32 into component sums */
diff --git a/arch/x86/chorba_sse41.c b/arch/x86/chorba_sse41.c
index 65243bff3b..aa1c7a2775 100644
--- a/arch/x86/chorba_sse41.c
+++ b/arch/x86/chorba_sse41.c
@@ -52,7 +52,7 @@
out3 = _mm_xor_si128(in[4], xor3); \
} while (0)
-static Z_FORCEINLINE uint32_t crc32_chorba_32768_nondestructive_sse41(uint32_t crc, const uint64_t* buf, size_t len) {
+Z_FORCEINLINE static uint32_t crc32_chorba_32768_nondestructive_sse41(uint32_t crc, const uint64_t* buf, size_t len) {
const uint64_t* input = buf;
ALIGNED_(16) uint64_t bitbuffer[32768 / sizeof(uint64_t)];
__m128i *bitbuffer_v = (__m128i*)bitbuffer;