From cb20f6d9cd5221ad988ed45a700685c3791757f0 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 4 May 2026 10:34:04 +0200 Subject: [PATCH] SipHash: help the compiler a little bit --- .../siphash24/ref/shorthash_siphash_ref.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash_ref.h b/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash_ref.h index 3f9a38b5..d5f67a1d 100644 --- a/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash_ref.h +++ b/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash_ref.h @@ -6,17 +6,17 @@ #define SIPROUND \ do { \ v0 += v1; \ - v1 = ROTL64(v1, 13); \ - v1 ^= v0; \ - v0 = ROTL64(v0, 32); \ v2 += v3; \ + v1 = ROTL64(v1, 13); \ v3 = ROTL64(v3, 16); \ + v1 ^= v0; \ v3 ^= v2; \ + v0 = ROTL64(v0, 32); \ v0 += v3; \ - v3 = ROTL64(v3, 21); \ - v3 ^= v0; \ v2 += v1; \ + v3 = ROTL64(v3, 21); \ v1 = ROTL64(v1, 17); \ + v3 ^= v0; \ v1 ^= v2; \ v2 = ROTL64(v2, 32); \ } while (0)