From 08fa9d81e7a82ea7b86d810650de12ae497640aa Mon Sep 17 00:00:00 2001 From: Alfred Klomp Date: Sat, 13 Jan 2024 14:18:12 +0100 Subject: [PATCH] avx2: apply BASE64_FORCE_INLINE macro --- lib/arch/avx2/dec_loop.c | 4 ++-- lib/arch/avx2/dec_reshuffle.c | 2 +- lib/arch/avx2/enc_loop.c | 6 +++--- lib/arch/avx2/enc_loop_asm.c | 2 +- lib/arch/avx2/enc_reshuffle.c | 2 +- lib/arch/avx2/enc_translate.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/arch/avx2/dec_loop.c b/lib/arch/avx2/dec_loop.c index f959fc4b..45ab16d0 100644 --- a/lib/arch/avx2/dec_loop.c +++ b/lib/arch/avx2/dec_loop.c @@ -1,4 +1,4 @@ -static inline int +BASE64_FORCE_INLINE int dec_loop_avx2_inner (const uint8_t **s, uint8_t **o, size_t *rounds) { const __m256i lut_lo = _mm256_setr_epi8( @@ -53,7 +53,7 @@ dec_loop_avx2_inner (const uint8_t **s, uint8_t **o, size_t *rounds) return 1; } -static inline void +BASE64_FORCE_INLINE void dec_loop_avx2 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) { if (*slen < 45) { diff --git a/lib/arch/avx2/dec_reshuffle.c b/lib/arch/avx2/dec_reshuffle.c index f3518098..463c7a1a 100644 --- a/lib/arch/avx2/dec_reshuffle.c +++ b/lib/arch/avx2/dec_reshuffle.c @@ -1,4 +1,4 @@ -static inline __m256i +BASE64_FORCE_INLINE __m256i dec_reshuffle (const __m256i in) { // in, lower lane, bits, upper case are most significant bits, lower diff --git a/lib/arch/avx2/enc_loop.c b/lib/arch/avx2/enc_loop.c index b9e2736f..cd8b5909 100644 --- a/lib/arch/avx2/enc_loop.c +++ b/lib/arch/avx2/enc_loop.c @@ -1,4 +1,4 @@ -static inline void +BASE64_FORCE_INLINE void enc_loop_avx2_inner_first (const uint8_t **s, uint8_t **o) { // First load is done at s - 0 to not get a segfault: @@ -17,7 +17,7 @@ enc_loop_avx2_inner_first (const uint8_t **s, uint8_t **o) *o += 32; } -static inline void +BASE64_FORCE_INLINE void enc_loop_avx2_inner (const uint8_t **s, uint8_t **o) { // Load input: @@ -32,7 +32,7 @@ enc_loop_avx2_inner (const uint8_t **s, uint8_t **o) *o += 32; } -static inline void +BASE64_FORCE_INLINE void enc_loop_avx2 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) { if (*slen < 32) { diff --git a/lib/arch/avx2/enc_loop_asm.c b/lib/arch/avx2/enc_loop_asm.c index eb775a1d..89f9faa3 100644 --- a/lib/arch/avx2/enc_loop_asm.c +++ b/lib/arch/avx2/enc_loop_asm.c @@ -119,7 +119,7 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Woverlength-strings" -static inline void +BASE64_FORCE_INLINE void enc_loop_avx2 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) { // For a clearer explanation of the algorithm used by this function, diff --git a/lib/arch/avx2/enc_reshuffle.c b/lib/arch/avx2/enc_reshuffle.c index ba166903..515b4bca 100644 --- a/lib/arch/avx2/enc_reshuffle.c +++ b/lib/arch/avx2/enc_reshuffle.c @@ -1,4 +1,4 @@ -static inline __m256i +BASE64_FORCE_INLINE __m256i enc_reshuffle (const __m256i input) { // Translation of the SSSE3 reshuffling algorithm to AVX2. This one diff --git a/lib/arch/avx2/enc_translate.c b/lib/arch/avx2/enc_translate.c index 46173cd1..4b47b09f 100644 --- a/lib/arch/avx2/enc_translate.c +++ b/lib/arch/avx2/enc_translate.c @@ -1,4 +1,4 @@ -static inline __m256i +BASE64_FORCE_INLINE __m256i enc_translate (const __m256i in) { // A lookup table containing the absolute offsets for all ranges: