From 7038dad280eb5dcd622bf54336207b683388e8cc Mon Sep 17 00:00:00 2001 From: sdlyyxy Date: Sun, 25 Jun 2023 11:16:02 +0800 Subject: [PATCH] NEON rot7/rot12 use shl+sri --- c/blake3_neon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c/blake3_neon.c b/c/blake3_neon.c index ec38cdb5..1d4559e4 100644 --- a/c/blake3_neon.c +++ b/c/blake3_neon.c @@ -40,7 +40,7 @@ INLINE uint32x4_t rot16_128(uint32x4_t x) { } INLINE uint32x4_t rot12_128(uint32x4_t x) { - return vorrq_u32(vshrq_n_u32(x, 12), vshlq_n_u32(x, 32 - 12)); + return vsriq_n_u32(vshlq_n_u32(x, 32-12), x, 12); } INLINE uint32x4_t rot8_128(uint32x4_t x) { @@ -55,7 +55,7 @@ INLINE uint32x4_t rot8_128(uint32x4_t x) { } INLINE uint32x4_t rot7_128(uint32x4_t x) { - return vorrq_u32(vshrq_n_u32(x, 7), vshlq_n_u32(x, 32 - 7)); + return vsriq_n_u32(vshlq_n_u32(x, 32-7), x, 7); } // TODO: compress_neon