aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
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);
}
}