Lines Matching +full:16 +full:g

116 	 * Pairwise long polynomial multiplication of two 16-bit values
135 * 2 (w0*x2 ^ w1*x1) << 16 ^ | (y0*z2 ^ y1*z1) << 16 ^
148 * and after performing 8x8->16 bit long polynomial multiplication of
150 * we obtain the following four vectors of 16-bit elements:
253 // XOR the first 16 data *bits* with the initial CRC value.
275 // Now fold the 112 bytes in q0-q6 into the 16 bytes in q7.
286 // Fold across 16 bytes.
291 // Then subtract 16 to simplify the termination condition of the
293 adds len, len, #(128-16)
295 // While >= 16 data bytes remain (not counting q7), fold the 16 bytes q7
304 subs len, len, #16
308 // Add 16 to get the correct number of data bytes remaining in 0...15
309 // (not counting q7), following the previous extra subtraction by 16.
310 adds len, len, #16
314 // Reduce the last '16 + len' bytes where 1 <= len <= 15 and the first
315 // 16 bytes are in q7 and the rest are the remaining data in 'buf'. To
318 // chunk of 16 bytes, then fold the first chunk into the second.
320 // q0 = last 16 original data bytes
322 sub buf, buf, #16
328 mov_l r1, .Lbyteshift_table + 16
334 // q3 = first chunk: q7 right-shifted by '16-len' bytes.
340 // Convert to 8-bit masks: 'len' 0x00 bytes, then '16-len' 0xff bytes.
344 // then '16-len' bytes from q1 (high-order bytes).
353 // Checksumming a buffer of length 16...255 bytes
357 // Load the first 16 data bytes.
362 // XOR the first 16 data *bits* with the initial CRC value.
367 // Load the fold-across-16-bytes constants.
370 cmp len, #16
371 beq .Lreduce_final_16_bytes\@ // len == 16
373 addlt len, len, #16
383 // Assumes len >= 16.
388 // Reduce the 128-bit value M(x), stored in q7, to the final 16-bit CRC.
390 // Load 'x^48 * (x^48 mod G(x))' and 'x^48 * (x^80 mod G(x))'.
396 vmull.p64 q0, q7h, FOLD_CONST_H // high bits * x^48 * (x^80 mod G(x))
404 vmull.p64 q1, q1l, FOLD_CONST_L // high 32 bits * x^48 * (x^48 mod G(x))
407 // Load G(x) and floor(x^48 / G(x)).
411 vmull.p64 q1, q0h, FOLD_CONST_H // high 32 bits * floor(x^48 / G(x))
413 vmull.p64 q1, q1l, FOLD_CONST_L // *= G(x)
415 veor.8 q0l, q0l, q1l // + low 16 nonzero bits
416 // Final CRC value (x^16 * M(x)) mod G(x) is in low 16 bits of q0.
438 // G(x) = x^16 + x^15 + x^11 + x^9 + x^8 + x^7 + x^5 + x^4 + x^2 + x^1 + x^0
440 .quad 0x0000000000006123 // x^(8*128) mod G(x)
441 .quad 0x0000000000002295 // x^(8*128+64) mod G(x)
443 .quad 0x0000000000001069 // x^(4*128) mod G(x)
444 .quad 0x000000000000dd31 // x^(4*128+64) mod G(x)
446 .quad 0x000000000000857d // x^(2*128) mod G(x)
447 .quad 0x0000000000007acc // x^(2*128+64) mod G(x)
449 .quad 0x000000000000a010 // x^(1*128) mod G(x)
450 .quad 0x0000000000001faa // x^(1*128+64) mod G(x)
452 .quad 0x1368000000000000 // x^48 * (x^48 mod G(x))
453 .quad 0x2d56000000000000 // x^48 * (x^80 mod G(x))
455 .quad 0x0000000000018bb7 // G(x)
456 .quad 0x00000001f65a57f8 // floor(x^48 / G(x))
458 // For 1 <= len <= 15, the 16-byte vector beginning at &byteshift_table[16 -
460 // ..., 0x80} XOR the index vector to shift right by '16 - len' bytes.