@@ -264,7 +264,8 @@ static unsigned crc32_avx512(unsigned crc, const char *buf, size_t size,
264
264
c4 = xor3_512 (c4, _mm512_clmulepi64_epi128 (l1, b384, 0x10 ),
265
265
extract512_128<3 >(l1));
266
266
267
- __m256i c2 = _mm512_castsi512_si256 (_mm512_shuffle_i64x2 (c4, c4, 0b01001110 ));
267
+ __m256i c2 =
268
+ _mm512_castsi512_si256 (_mm512_shuffle_i64x2 (c4, c4, 0b01001110 ));
268
269
c2 = xor256 (c2, _mm512_castsi512_si256 (c4));
269
270
crc_out = xor128 (_mm256_extracti64x2_epi64 (c2, 1 ),
270
271
_mm256_castsi256_si128 (c2));
@@ -289,7 +290,8 @@ static unsigned crc32_avx512(unsigned crc, const char *buf, size_t size,
289
290
xor3_512 (_mm512_clmulepi64_epi128 (lo, b384, 1 ),
290
291
_mm512_clmulepi64_epi128 (lo, b384, 0x10 ),
291
292
extract512_128<3 >(lo));
292
- crc512 = xor512 (crc512, _mm512_shuffle_i64x2 (crc512, crc512, 0b01001110 ));
293
+ crc512 =
294
+ xor512 (crc512, _mm512_shuffle_i64x2 (crc512, crc512, 0b01001110 ));
293
295
const __m256i crc256 = _mm512_castsi512_si256 (crc512);
294
296
crc_out = xor128 (_mm256_extracti64x2_epi64 (crc256, 1 ),
295
297
_mm256_castsi256_si128 (crc256));
@@ -318,7 +320,7 @@ static unsigned crc32_avx512(unsigned crc, const char *buf, size_t size,
318
320
size += 16 ;
319
321
if (size) {
320
322
get_last_two_xmms:
321
- const __m128i crc2 = crc_out, d = load128 (buf + (size - 16 ) );
323
+ const __m128i crc2 = crc_out, d = load128 (buf + ssize_t (size) - 16 );
322
324
__m128i S = load128 (reinterpret_cast <const char *>(shuffle128) + size);
323
325
crc_out = _mm_shuffle_epi8 (crc_out, S);
324
326
S = xor128 (S, _mm_set1_epi32 (0x80808080 ));
0 commit comments