diff options
| author | Matthew Krupcale <[email protected]> | 2020-08-23 21:51:55 -0400 |
|---|---|---|
| committer | Matthew Krupcale <[email protected]> | 2020-08-24 00:56:46 -0400 |
| commit | 92c8047a15fe4a0e61982860d2c4854b74ed1e2c (patch) | |
| tree | a4438efe539803e604d4d4f23d31f985cdfebb9e | |
| parent | 40a4a2b6b016e999d6dae2b0eb67f08aad6150bf (diff) | |
SSE2 intrinsic: emulate _mm_shuffle_epi8 SSSE3 intrinsic rot16 with SSE2 intrinsics
Use two 16-bit shuffles: one for the low 64-bits and one for the high 64-bits.
* c/blake3_sse2.c: emulate _mm_shuffle_epi8 rot16 using SSE2 intrinsics
| -rw-r--r-- | c/blake3_sse2.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/c/blake3_sse2.c b/c/blake3_sse2.c index 35936dc..d0158fc 100644 --- a/c/blake3_sse2.c +++ b/c/blake3_sse2.c @@ -28,8 +28,7 @@ INLINE __m128i set4(uint32_t a, uint32_t b, uint32_t c, uint32_t d) { } INLINE __m128i rot16(__m128i x) { - return _mm_shuffle_epi8( - x, _mm_set_epi8(13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2)); + return _mm_shufflehi_epi16(_mm_shufflelo_epi16(x, 0xB1), 0xB1); } INLINE __m128i rot12(__m128i x) { |
