aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-03-03 23:35:12 +0000
committerlloyd <[email protected]>2010-03-03 23:35:12 +0000
commit1cc63d937ccb566feaa6d4ea70c409e610544d77 (patch)
treee1eca258ec24447196c50aa781e89d5f95a1cc34 /src/utils
parent63e8d6e2a666600b61fed840af8cc92f3f1c1467 (diff)
Pass the args to SIMD_32 variant of rotate_left/rotate_right as const
reference. Otherwise Visual C++ dies because apparently the Win32 ABI doesn't know how to pass a __m128i as a function parameter. :/
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/simd_32/simd_32.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/utils/simd_32/simd_32.h b/src/utils/simd_32/simd_32.h
index 4bd983f5e..1cbec2310 100644
--- a/src/utils/simd_32/simd_32.h
+++ b/src/utils/simd_32/simd_32.h
@@ -29,16 +29,16 @@
namespace Botan {
-inline SIMD_32 rotate_left(SIMD_32 x, u32bit rot)
+inline SIMD_32 rotate_left(const SIMD_32& x, u32bit rot)
{
- x.rotate_left(rot);
- return x;
+ SIMD32 y = x;
+ y.rotate_left(rot);
+ return y;
}
-inline SIMD_32 rotate_right(SIMD_32 x, u32bit rot)
+inline SIMD_32 rotate_right(const SIMD_32& x, u32bit rot)
{
- x.rotate_right(rot);
- return x;
+ return rotate_left(x, 32 - rot);
}
}