diff options
author | Jeffrey Walton <noloader@gmail.com> | 2021-05-25 23:06:50 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2021-05-25 23:06:50 -0400 |
commit | b2571d47c6d316bf8e59dbda64daeeaafc395d01 (patch) | |
tree | 2ddab665909a17a914960d59fd814206974c7538 /crc_simd.cpp | |
parent | 2ed2e19e8e2f926dbea974c08ec9692536f7b24d (diff) | |
download | cryptopp-git-b2571d47c6d316bf8e59dbda64daeeaafc395d01.tar.gz |
Add CRC32Wx4 and CRC32CWx4 for 4 blocks at a time
Diffstat (limited to 'crc_simd.cpp')
-rw-r--r-- | crc_simd.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/crc_simd.cpp b/crc_simd.cpp index 1bbc8757..0355e9be 100644 --- a/crc_simd.cpp +++ b/crc_simd.cpp @@ -121,12 +121,7 @@ void CRC32_Update_ARMV8(const byte *s, size_t n, word32& c) c = CRC32B(c, *s);
for(; n >= 16; s+=16, n-=16)
- {
- c = CRC32W(c, *(const word32 *)(void*)(s+ 0));
- c = CRC32W(c, *(const word32 *)(void*)(s+ 4));
- c = CRC32W(c, *(const word32 *)(void*)(s+ 8));
- c = CRC32W(c, *(const word32 *)(void*)(s+12));
- }
+ c = CRC32Wx4(c, (const word32 *)(void*)s);
for(; n >= 4; s+=4, n-=4)
c = CRC32W(c, *(const word32 *)(void*)s);
@@ -141,12 +136,7 @@ void CRC32C_Update_ARMV8(const byte *s, size_t n, word32& c) c = CRC32CB(c, *s);
for(; n >= 16; s+=16, n-=16)
- {
- c = CRC32CW(c, *(const word32 *)(void*)(s+ 0));
- c = CRC32CW(c, *(const word32 *)(void*)(s+ 4));
- c = CRC32CW(c, *(const word32 *)(void*)(s+ 8));
- c = CRC32CW(c, *(const word32 *)(void*)(s+12));
- }
+ c = CRC32CWx4(c, (const word32 *)(void*)s);
for(; n >= 4; s+=4, n-=4)
c = CRC32CW(c, *(const word32 *)(void*)s);
|