aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Krupcale <[email protected]>2020-08-23 23:15:46 -0400
committerMatthew Krupcale <[email protected]>2020-08-24 00:56:57 -0400
commita9a701c6229c696817feeb32e526072689c9a256 (patch)
treed887eac2560fba6c2fb17669314c4abf10fa8ab2
parent92c8047a15fe4a0e61982860d2c4854b74ed1e2c (diff)
SSE2 intrinsic: emulate _mm_shuffle_epi8 SSSE3 intrinsic rot8 with SSE2 intrinsics
Use a simple shift version for the 8-bit rotation. * c/blake3_sse2.c: emulate _mm_shuffle_epi8 rot8 using SSE2 intrinsics
-rw-r--r--c/blake3_sse2.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/c/blake3_sse2.c b/c/blake3_sse2.c
index d0158fc..de33d62 100644
--- a/c/blake3_sse2.c
+++ b/c/blake3_sse2.c
@@ -36,8 +36,7 @@ INLINE __m128i rot12(__m128i x) {
}
INLINE __m128i rot8(__m128i x) {
- return _mm_shuffle_epi8(
- x, _mm_set_epi8(12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1));
+ return xorv(_mm_srli_epi32(x, 8), _mm_slli_epi32(x, 32 - 8));
}
INLINE __m128i rot7(__m128i x) {