aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/block
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-08-14 05:17:18 -0400
committerJack Lloyd <[email protected]>2017-08-14 05:17:18 -0400
commit38775f8927747c414046632dd03a436b192c95a1 (patch)
tree4808ccc2a22912f1ff69b6784e180d9572fda051 /src/lib/block
parent8804eeece5af90b728e337c7e0877549ea74eec9 (diff)
Pass by reference for MSVC x86
It complains it cannot pass the __m128i without loss of alignment. (Why, I have no idea.)
Diffstat (limited to 'src/lib/block')
-rw-r--r--src/lib/block/shacal2/shacal2_simd/shacal2_simd.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/block/shacal2/shacal2_simd/shacal2_simd.cpp b/src/lib/block/shacal2/shacal2_simd/shacal2_simd.cpp
index 349fe5722..a4324c8fb 100644
--- a/src/lib/block/shacal2/shacal2_simd/shacal2_simd.cpp
+++ b/src/lib/block/shacal2/shacal2_simd/shacal2_simd.cpp
@@ -12,18 +12,20 @@ namespace Botan {
namespace {
-inline void SHACAL2_Fwd(SIMD_32 A, SIMD_32 B, SIMD_32 C, SIMD_32& D,
- SIMD_32 E, SIMD_32 F, SIMD_32 G, SIMD_32& H,
- uint32_t RK)
+inline
+void SHACAL2_Fwd(const SIMD_32& A, const SIMD_32& B, const SIMD_32& C, SIMD_32& D,
+ const SIMD_32& E, const SIMD_32& F, const SIMD_32& G, SIMD_32& H,
+ uint32_t RK)
{
H += E.rho(6,11,25) + ((E & F) ^ (~E & G)) + SIMD_32::splat(RK);
D += H;
H += A.rho(2,13,22) + ((A & B) | ((A | B) & C));
}
-inline void SHACAL2_Rev(SIMD_32 A, SIMD_32 B, SIMD_32 C, SIMD_32& D,
- SIMD_32 E, SIMD_32 F, SIMD_32 G, SIMD_32& H,
- uint32_t RK)
+inline
+void SHACAL2_Rev(const SIMD_32& A, const SIMD_32& B, const SIMD_32& C, SIMD_32& D,
+ const SIMD_32& E, const SIMD_32& F, const SIMD_32& G, SIMD_32& H,
+ uint32_t RK)
{
H -= A.rho(2,13,22) + ((A & B) | ((A | B) & C));
D -= H;