diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-10-29 23:14:31 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-10-29 23:14:31 -0400 |
| commit | 9ebb039a81f5ea06e97d84ef7ee447da9dfca204 (patch) | |
| tree | dc229247feb19ddec117e3c680dd1c13a40dbdd1 /stdlib/siphash-internals.h | |
| parent | 3e019df9f429caef4b05947cc70652634ebb2467 (diff) | |
Fix up some GCC compiler flag options for LTO and inlining
Diffstat (limited to 'stdlib/siphash-internals.h')
| -rw-r--r-- | stdlib/siphash-internals.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/stdlib/siphash-internals.h b/stdlib/siphash-internals.h index d1906be4..b2b31e13 100644 --- a/stdlib/siphash-internals.h +++ b/stdlib/siphash-internals.h @@ -68,7 +68,7 @@ typedef struct siphash siphash; HALF_ROUND(v0,v1,v2,v3,13,16); \ HALF_ROUND(v2,v1,v0,v3,17,21); -static inline void siphashinit (siphash *sh, size_t src_sz) { +static INLINE void siphashinit (siphash *sh, size_t src_sz) { const uint64_t k0 = TOMO_HASH_KEY[0]; const uint64_t k1 = TOMO_HASH_KEY[1]; sh->b = (uint64_t)src_sz << 56; @@ -77,14 +77,13 @@ static inline void siphashinit (siphash *sh, size_t src_sz) { sh->v2 = k0 ^ 0x6c7967656e657261ULL; sh->v3 = k1 ^ 0x7465646279746573ULL; } -static inline void siphashadd64bits (siphash *sh, const uint64_t in) { +static INLINE void siphashadd64bits (siphash *sh, const uint64_t in) { const uint64_t mi = in; sh->v3 ^= mi; DOUBLE_ROUND(sh->v0,sh->v1,sh->v2,sh->v3); sh->v0 ^= mi; } -#pragma GCC diagnostic ignored "-Winline" -static inline uint64_t siphashfinish_last_part (siphash *sh, uint64_t t) { +static INLINE uint64_t siphashfinish_last_part (siphash *sh, uint64_t t) { sh->b |= t; sh->v3 ^= sh->b; DOUBLE_ROUND(sh->v0,sh->v1,sh->v2,sh->v3); @@ -102,7 +101,7 @@ union SipHash64_union { uint32_t u32; uint8_t u8[8]; }; -static inline uint64_t siphashfinish (siphash *sh, const uint8_t *src, size_t src_sz) { +static INLINE uint64_t siphashfinish (siphash *sh, const uint8_t *src, size_t src_sz) { union SipHash64_union t = { 0 }; switch (src_sz) { /* Falls through */ |
