|
| 1 | +--- a/src/compat/siphash/siphash.c |
| 2 | ++++ b/src/compat/siphash/siphash.c |
| 3 | +@@ -77,11 +77,11 @@ u64 __siphash_aligned(const void *data, size_t len, const siphash_key_t *key) |
| 4 | + bytemask_from_count(left))); |
| 5 | + #else |
| 6 | + switch (left) { |
| 7 | +- case 7: b |= ((u64)end[6]) << 48; fallthrough; |
| 8 | +- case 6: b |= ((u64)end[5]) << 40; fallthrough; |
| 9 | +- case 5: b |= ((u64)end[4]) << 32; fallthrough; |
| 10 | ++ case 7: b |= ((u64)end[6]) << 48; |
| 11 | ++ case 6: b |= ((u64)end[5]) << 40; |
| 12 | ++ case 5: b |= ((u64)end[4]) << 32; |
| 13 | + case 4: b |= le32_to_cpup(data); break; |
| 14 | +- case 3: b |= ((u64)end[2]) << 16; fallthrough; |
| 15 | ++ case 3: b |= ((u64)end[2]) << 16; |
| 16 | + case 2: b |= le16_to_cpup(data); break; |
| 17 | + case 1: b |= end[0]; |
| 18 | + } |
| 19 | +@@ -109,11 +109,11 @@ u64 __siphash_unaligned(const void *data, size_t len, const siphash_key_t *key) |
| 20 | + bytemask_from_count(left))); |
| 21 | + #else |
| 22 | + switch (left) { |
| 23 | +- case 7: b |= ((u64)end[6]) << 48; fallthrough; |
| 24 | +- case 6: b |= ((u64)end[5]) << 40; fallthrough; |
| 25 | +- case 5: b |= ((u64)end[4]) << 32; fallthrough; |
| 26 | ++ case 7: b |= ((u64)end[6]) << 48; |
| 27 | ++ case 6: b |= ((u64)end[5]) << 40; |
| 28 | ++ case 5: b |= ((u64)end[4]) << 32; |
| 29 | + case 4: b |= get_unaligned_le32(end); break; |
| 30 | +- case 3: b |= ((u64)end[2]) << 16; fallthrough; |
| 31 | ++ case 3: b |= ((u64)end[2]) << 16; |
| 32 | + case 2: b |= get_unaligned_le16(end); break; |
| 33 | + case 1: b |= end[0]; |
| 34 | + } |
| 35 | +@@ -269,11 +269,11 @@ u32 __hsiphash_aligned(const void *data, size_t len, const hsiphash_key_t *key) |
| 36 | + bytemask_from_count(left))); |
| 37 | + #else |
| 38 | + switch (left) { |
| 39 | +- case 7: b |= ((u64)end[6]) << 48; fallthrough; |
| 40 | +- case 6: b |= ((u64)end[5]) << 40; fallthrough; |
| 41 | +- case 5: b |= ((u64)end[4]) << 32; fallthrough; |
| 42 | ++ case 7: b |= ((u64)end[6]) << 48; |
| 43 | ++ case 6: b |= ((u64)end[5]) << 40; |
| 44 | ++ case 5: b |= ((u64)end[4]) << 32; |
| 45 | + case 4: b |= le32_to_cpup(data); break; |
| 46 | +- case 3: b |= ((u64)end[2]) << 16; fallthrough; |
| 47 | ++ case 3: b |= ((u64)end[2]) << 16; |
| 48 | + case 2: b |= le16_to_cpup(data); break; |
| 49 | + case 1: b |= end[0]; |
| 50 | + } |
| 51 | +@@ -301,11 +301,11 @@ u32 __hsiphash_unaligned(const void *data, size_t len, |
| 52 | + bytemask_from_count(left))); |
| 53 | + #else |
| 54 | + switch (left) { |
| 55 | +- case 7: b |= ((u64)end[6]) << 48; fallthrough; |
| 56 | +- case 6: b |= ((u64)end[5]) << 40; fallthrough; |
| 57 | +- case 5: b |= ((u64)end[4]) << 32; fallthrough; |
| 58 | ++ case 7: b |= ((u64)end[6]) << 48; |
| 59 | ++ case 6: b |= ((u64)end[5]) << 40; |
| 60 | ++ case 5: b |= ((u64)end[4]) << 32; |
| 61 | + case 4: b |= get_unaligned_le32(end); break; |
| 62 | +- case 3: b |= ((u64)end[2]) << 16; fallthrough; |
| 63 | ++ case 3: b |= ((u64)end[2]) << 16; |
| 64 | + case 2: b |= get_unaligned_le16(end); break; |
| 65 | + case 1: b |= end[0]; |
| 66 | + } |
| 67 | +@@ -426,7 +426,7 @@ u32 __hsiphash_aligned(const void *data, size_t len, const hsiphash_key_t *key) |
| 68 | + v0 ^= m; |
| 69 | + } |
| 70 | + switch (left) { |
| 71 | +- case 3: b |= ((u32)end[2]) << 16; fallthrough; |
| 72 | ++ case 3: b |= ((u32)end[2]) << 16; |
| 73 | + case 2: b |= le16_to_cpup(data); break; |
| 74 | + case 1: b |= end[0]; |
| 75 | + } |
| 76 | +@@ -448,7 +448,7 @@ u32 __hsiphash_unaligned(const void *data, size_t len, |
| 77 | + v0 ^= m; |
| 78 | + } |
| 79 | + switch (left) { |
| 80 | +- case 3: b |= ((u32)end[2]) << 16; fallthrough; |
| 81 | ++ case 3: b |= ((u32)end[2]) << 16; |
| 82 | + case 2: b |= get_unaligned_le16(end); break; |
| 83 | + case 1: b |= end[0]; |
| 84 | + } |
0 commit comments