blob: f3eac5ebc028029c483ae19df4dd0b3642c5b666 [file] [log] [blame]
Matteo Scandolo5c686162020-04-17 09:36:58 -07001// +build !go1.9
2
3package xxhash
4
5// TODO(caleb): After Go 1.10 comes out, remove this fallback code.
6
7func rol1(x uint64) uint64 { return (x << 1) | (x >> (64 - 1)) }
8func rol7(x uint64) uint64 { return (x << 7) | (x >> (64 - 7)) }
9func rol11(x uint64) uint64 { return (x << 11) | (x >> (64 - 11)) }
10func rol12(x uint64) uint64 { return (x << 12) | (x >> (64 - 12)) }
11func rol18(x uint64) uint64 { return (x << 18) | (x >> (64 - 18)) }
12func rol23(x uint64) uint64 { return (x << 23) | (x >> (64 - 23)) }
13func rol27(x uint64) uint64 { return (x << 27) | (x >> (64 - 27)) }
14func rol31(x uint64) uint64 { return (x << 31) | (x >> (64 - 31)) }