Lines Matching +full:1 +full:- +full:v0

2 // Accelerated CRC-T10DIF using arm64 NEON and Crypto Extensions instructions
14 // Implement fast CRC-T10DIF computation with SSE and PCLMULQDQ instructions
62 // /white-papers/fast-crc-computation-generic-polynomials-pclmulqdq-paper.pdf
69 .arch armv8-a+crypto
136 ext t4.8b, ad.8b, ad.8b, #1 // A1
253 pmull \rd\().1q, \rn\().1d, \rm\().1d
255 pmull2 \rd\().1q, \rn\().2d, \rm\().2d
275 CPU_LE( rev64 v0.16b, v0.16b )
283 CPU_LE( ext v0.16b, v0.16b, v0.16b, #8 )
295 eor v0.16b, v0.16b, v8.16b
305 // While >= 128 data bytes remain (not counting v0-v7), fold the 128
306 // bytes v0-v7 into them, storing the result back into v0-v7.
308 fold_32_bytes \p, v0, v1
316 // Now fold the 112 bytes in v0-v6 into the 16 bytes in v7.
322 fold_16_bytes \p, v0, v4
325 fold_16_bytes \p, v3, v7, 1
328 fold_16_bytes \p, v5, v7, 1
336 adds len, len, #(128-16)
346 CPU_LE( rev64 v0.16b, v0.16b )
347 CPU_LE( ext v0.16b, v0.16b, v0.16b, #8 )
348 eor v7.16b, v7.16b, v0.16b
359 // Reduce the last '16 + len' bytes where 1 <= len <= 15 and the first
365 // v0 = last 16 original data bytes
367 ldr q0, [buf, #-16]
368 CPU_LE( rev64 v0.16b, v0.16b )
369 CPU_LE( ext v0.16b, v0.16b, v0.16b, #8 )
371 // v1 = high order part of second chunk: v7 left-shifted by 'len' bytes.
377 // v3 = first chunk: v7 right-shifted by '16-len' bytes.
382 // Convert to 8-bit masks: 'len' 0x00 bytes, then '16-len' 0xff bytes.
385 // v2 = second chunk: 'len' bytes from v0 (low-order bytes),
386 // then '16-len' bytes from v1 (high-order bytes).
387 bsl v2.16b, v1.16b, v0.16b
390 __pmull_\p v0, v3, fold_consts
392 eor v7.16b, v7.16b, v0.16b
396 // Reduce the 128-bit value M(x), stored in v7, to the final 16-bit CRC.
405 // x^64. This produces a 128-bit value congruent to x^64 * M(x) and
407 ext v0.16b, v2.16b, v7.16b, #8
409 eor v0.16b, v0.16b, v7.16b // + low bits * x^64
411 // Fold the high 32 bits into the low 96 bits. This produces a 96-bit
413 ext v1.16b, v0.16b, v2.16b, #12 // extract high 32 bits
414 mov v0.s[3], v2.s[0] // zero high 32 bits
416 eor v0.16b, v0.16b, v1.16b // + low bits
423 __pmull_\p v1, v0, fold_consts, 2 // high 32 bits * floor(x^48 / G(x))
426 ushr v0.2d, v0.2d, #48
427 eor v0.16b, v0.16b, v1.16b // + low 16 nonzero bits
428 // Final CRC value (x^16 * M(x)) mod G(x) is in low 16 bits of v0.
430 umov w0, v0.h[0]
447 movi v0.16b, #0
448 mov v0.h[7], init_crc
449 eor v7.16b, v7.16b, v0.16b
451 // Load the fold-across-16-bytes constants.
469 frame_push 1
487 // G(x) = x^16 + x^15 + x^11 + x^9 + x^8 + x^7 + x^5 + x^4 + x^2 + x^1 + x^0
498 .quad 0x000000000000a010 // x^(1*128) mod G(x)
499 .quad 0x0000000000001faa // x^(1*128+64) mod G(x)
507 // For 1 <= len <= 15, the 16-byte vector beginning at &byteshift_table[16 -
509 // ..., 0x80} XOR the index vector to shift right by '16 - len' bytes.