summaryrefslogtreecommitdiff
path: root/3way.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3way.cpp')
-rw-r--r--3way.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/3way.cpp b/3way.cpp
index 60bd0e13..bd610536 100644
--- a/3way.cpp
+++ b/3way.cpp
@@ -36,14 +36,14 @@ static inline word32 reverseBits(word32 a)
a2 = t; \
}
-#define pi_gamma_pi(a0, a1, a2) \
-{ \
- word32 b0, b2; \
- b2 = rotlFixed(a2, 1U); \
- b0 = rotlFixed(a0, 22U); \
- a0 = rotlFixed(b0 ^ (a1|(~b2)), 1U); \
- a2 = rotlFixed(b2 ^ (b0|(~a1)), 22U);\
- a1 ^= (b2|(~b0)); \
+#define pi_gamma_pi(a0, a1, a2) \
+{ \
+ word32 b0, b2; \
+ b2 = rotlConstant<1>(a2); \
+ b0 = rotlConstant<22>(a0); \
+ a0 = rotlConstant<1>(b0 ^ (a1|(~b2))); \
+ a2 = rotlConstant<22>(b2 ^ (b0|(~a1))); \
+ a1 ^= (b2|(~b0)); \
}
// thanks to Paulo Barreto for this optimized theta()
@@ -51,7 +51,7 @@ static inline word32 reverseBits(word32 a)
{ \
word32 b0, b1, c; \
c = a0 ^ a1 ^ a2; \
- c = rotlFixed(c, 16U) ^ rotlFixed(c, 8U); \
+ c = rotlConstant<16>(c) ^ rotlConstant<8>(c); \
b0 = (a0 << 24) ^ (a2 >> 8) ^ (a1 << 8) ^ (a0 >> 24); \
b1 = (a1 << 24) ^ (a0 >> 8) ^ (a2 << 8) ^ (a1 >> 24); \
a0 ^= c ^ b0; \