Lines Matching +full:1 +full:- +full:255

3  * cleaned up code to current version of sparse and added the slicing-by-8
4 * algorithm to the closely similar existing slicing-by-4 algorithm.
9 * subsequently included in the kernel, thus was re-licensed under the
56 /* implements slicing-by-4 or slicing-by-8 algorithm */
61 # define DO_CRC(x) crc = t0[(crc ^ (x)) & 255] ^ (crc >> 8)
62 # define DO_CRC4 (t3[(q) & 255] ^ t2[(q >> 8) & 255] ^ \
63 t1[(q >> 16) & 255] ^ t0[(q >> 24) & 255])
64 # define DO_CRC8 (t7[(q) & 255] ^ t6[(q >> 8) & 255] ^ \
65 t5[(q >> 16) & 255] ^ t4[(q >> 24) & 255])
67 # define DO_CRC(x) crc = t0[((crc >> 24) ^ (x)) & 255] ^ (crc << 8)
68 # define DO_CRC4 (t0[(q) & 255] ^ t1[(q >> 8) & 255] ^ \
69 t2[(q >> 16) & 255] ^ t3[(q >> 24) & 255])
70 # define DO_CRC8 (t4[(q) & 255] ^ t5[(q >> 8) & 255] ^ \
71 t6[(q >> 16) & 255] ^ t7[(q >> 24) & 255])
78 const u32 *t0=tab[0], *t1=tab[1], *t2=tab[2], *t3=tab[3];
88 } while ((--len) && ((long)buf)&3);
101 --b;
104 for (--b; len; --len) {
118 u8 *p = (u8 *)(b + 1) - 1;
125 } while (--len);
137 * crc32_le_generic() - Calculate bitwise little-endian Ethernet AUTODIN II
143 * @tab: little-endian Ethernet table
150 #if CRC_LE_BITS == 1
152 while (len--) {
155 crc = (crc >> 1) ^ ((crc & 1) ? polynomial : 0);
158 while (len--) {
166 while (len--) {
173 while (len--) {
175 crc = (crc >> 8) ^ tab[0][crc & 255];
185 #if CRC_LE_BITS == 1
214 * This follows the "little-endian" CRC convention that the lsbit
219 u32 product = x & 1 ? y : 0;
223 product = (product >> 1) ^ (product & 1 ? modulus : 0);
224 x >>= 1;
225 product ^= x & 1 ? y : 0;
232 * crc32_generic_shift - Append @len 0 bytes to crc, in logarithmic time
233 * @crc: The original little-endian CRC (i.e. lsbit is x^31 coefficient)
251 crc = (crc >> 1) ^ (crc & 1 ? polynomial : 0);
259 if (len & 1)
262 len >>= 1;
266 /* Square power, advancing to x^(2^(i+1)) */
286 * crc32_be_generic() - Calculate bitwise big-endian Ethernet AUTODIN II CRC32
291 * @tab: big-endian Ethernet table
298 #if CRC_BE_BITS == 1
300 while (len--) {
304 (crc << 1) ^ ((crc & 0x80000000) ? polynomial :
308 while (len--) {
316 while (len--) {
322 while (len--) {
334 #if CRC_BE_BITS == 1