| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
static const struct { |
| 15 |
u8 bswap_mask[16]; |
| 16 |
u64 fold_across_2048_bits_consts[2]; |
| 17 |
u64 fold_across_1024_bits_consts[2]; |
| 18 |
u64 fold_across_512_bits_consts[2]; |
| 19 |
u64 fold_across_256_bits_consts[2]; |
| 20 |
u64 fold_across_128_bits_consts[2]; |
| 21 |
u8 shuf_table[48]; |
| 22 |
u64 barrett_reduction_consts[2]; |
| 23 |
} crc16_msb_0x8bb7_consts ____cacheline_aligned __maybe_unused = { |
| 24 |
.bswap_mask = {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}, |
| 25 |
.fold_across_2048_bits_consts = { |
| 26 |
0xdccf000000000000, |
| 27 |
0x4b0b000000000000, |
| 28 |
}, |
| 29 |
.fold_across_1024_bits_consts = { |
| 30 |
0x9d9d000000000000, |
| 31 |
0x7cf5000000000000, |
| 32 |
}, |
| 33 |
.fold_across_512_bits_consts = { |
| 34 |
0x044c000000000000, |
| 35 |
0xe658000000000000, |
| 36 |
}, |
| 37 |
.fold_across_256_bits_consts = { |
| 38 |
0x6ee3000000000000, |
| 39 |
0xe7b5000000000000, |
| 40 |
}, |
| 41 |
.fold_across_128_bits_consts = { |
| 42 |
0x2d56000000000000, |
| 43 |
0x06df000000000000, |
| 44 |
}, |
| 45 |
.shuf_table = { |
| 46 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 47 |
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
| 48 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 49 |
}, |
| 50 |
.barrett_reduction_consts = { |
| 51 |
0x8bb7000000000000, |
| 52 |
0xf65a57f81d33a48a, |
| 53 |
}, |
| 54 |
}; |
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
static const struct { |
| 62 |
u64 fold_across_2048_bits_consts[2]; |
| 63 |
u64 fold_across_1024_bits_consts[2]; |
| 64 |
u64 fold_across_512_bits_consts[2]; |
| 65 |
u64 fold_across_256_bits_consts[2]; |
| 66 |
u64 fold_across_128_bits_consts[2]; |
| 67 |
u8 shuf_table[48]; |
| 68 |
u64 barrett_reduction_consts[2]; |
| 69 |
} crc32_lsb_0xedb88320_consts ____cacheline_aligned __maybe_unused = { |
| 70 |
.fold_across_2048_bits_consts = { |
| 71 |
0x00000000ce3371cb, |
| 72 |
0x00000000e95c1271, |
| 73 |
}, |
| 74 |
.fold_across_1024_bits_consts = { |
| 75 |
0x0000000033fff533, |
| 76 |
0x00000000910eeec1, |
| 77 |
}, |
| 78 |
.fold_across_512_bits_consts = { |
| 79 |
0x000000008f352d95, |
| 80 |
0x000000001d9513d7, |
| 81 |
}, |
| 82 |
.fold_across_256_bits_consts = { |
| 83 |
0x00000000f1da05aa, |
| 84 |
0x0000000081256527, |
| 85 |
}, |
| 86 |
.fold_across_128_bits_consts = { |
| 87 |
0x00000000ae689191, |
| 88 |
0x00000000ccaa009e, |
| 89 |
}, |
| 90 |
.shuf_table = { |
| 91 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 92 |
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
| 93 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 94 |
}, |
| 95 |
.barrett_reduction_consts = { |
| 96 |
0xb4e5b025f7011641, |
| 97 |
0x00000001db710640, |
| 98 |
}, |
| 99 |
}; |
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
static const struct { |
| 107 |
u64 fold_across_2048_bits_consts[2]; |
| 108 |
u64 fold_across_1024_bits_consts[2]; |
| 109 |
u64 fold_across_512_bits_consts[2]; |
| 110 |
u64 fold_across_256_bits_consts[2]; |
| 111 |
u64 fold_across_128_bits_consts[2]; |
| 112 |
u8 shuf_table[48]; |
| 113 |
u64 barrett_reduction_consts[2]; |
| 114 |
} crc32_lsb_0x82f63b78_consts ____cacheline_aligned __maybe_unused = { |
| 115 |
.fold_across_2048_bits_consts = { |
| 116 |
0x00000000dcb17aa4, |
| 117 |
0x00000000b9e02b86, |
| 118 |
}, |
| 119 |
.fold_across_1024_bits_consts = { |
| 120 |
0x000000006992cea2, |
| 121 |
0x000000000d3b6092, |
| 122 |
}, |
| 123 |
.fold_across_512_bits_consts = { |
| 124 |
0x00000000740eef02, |
| 125 |
0x000000009e4addf8, |
| 126 |
}, |
| 127 |
.fold_across_256_bits_consts = { |
| 128 |
0x000000003da6d0cb, |
| 129 |
0x00000000ba4fc28e, |
| 130 |
}, |
| 131 |
.fold_across_128_bits_consts = { |
| 132 |
0x00000000f20c0dfe, |
| 133 |
0x00000000493c7d27, |
| 134 |
}, |
| 135 |
.shuf_table = { |
| 136 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 137 |
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
| 138 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 139 |
}, |
| 140 |
.barrett_reduction_consts = { |
| 141 |
0x4869ec38dea713f1, |
| 142 |
0x0000000105ec76f0, |
| 143 |
}, |
| 144 |
}; |
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
static const struct { |
| 154 |
u8 bswap_mask[16]; |
| 155 |
u64 fold_across_2048_bits_consts[2]; |
| 156 |
u64 fold_across_1024_bits_consts[2]; |
| 157 |
u64 fold_across_512_bits_consts[2]; |
| 158 |
u64 fold_across_256_bits_consts[2]; |
| 159 |
u64 fold_across_128_bits_consts[2]; |
| 160 |
u8 shuf_table[48]; |
| 161 |
u64 barrett_reduction_consts[2]; |
| 162 |
} crc64_msb_0x42f0e1eba9ea3693_consts ____cacheline_aligned __maybe_unused = { |
| 163 |
.bswap_mask = {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}, |
| 164 |
.fold_across_2048_bits_consts = { |
| 165 |
0x7f52691a60ddc70d, |
| 166 |
0x7036b0389f6a0c82, |
| 167 |
}, |
| 168 |
.fold_across_1024_bits_consts = { |
| 169 |
0x05cf79dea9ac37d6, |
| 170 |
0x001067e571d7d5c2, |
| 171 |
}, |
| 172 |
.fold_across_512_bits_consts = { |
| 173 |
0x5f6843ca540df020, |
| 174 |
0xddf4b6981205b83f, |
| 175 |
}, |
| 176 |
.fold_across_256_bits_consts = { |
| 177 |
0x571bee0a227ef92b, |
| 178 |
0x44bef2a201b5200c, |
| 179 |
}, |
| 180 |
.fold_across_128_bits_consts = { |
| 181 |
0x05f5c3c7eb52fab6, |
| 182 |
0x4eb938a7d257740e, |
| 183 |
}, |
| 184 |
.shuf_table = { |
| 185 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 186 |
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
| 187 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 188 |
}, |
| 189 |
.barrett_reduction_consts = { |
| 190 |
0x42f0e1eba9ea3693, |
| 191 |
0x578d29d06cc4f872, |
| 192 |
}, |
| 193 |
}; |
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
static const struct { |
| 203 |
u64 fold_across_2048_bits_consts[2]; |
| 204 |
u64 fold_across_1024_bits_consts[2]; |
| 205 |
u64 fold_across_512_bits_consts[2]; |
| 206 |
u64 fold_across_256_bits_consts[2]; |
| 207 |
u64 fold_across_128_bits_consts[2]; |
| 208 |
u8 shuf_table[48]; |
| 209 |
u64 barrett_reduction_consts[2]; |
| 210 |
} crc64_lsb_0x9a6c9329ac4bc9b5_consts ____cacheline_aligned __maybe_unused = { |
| 211 |
.fold_across_2048_bits_consts = { |
| 212 |
0x37ccd3e14069cabc, |
| 213 |
0xa043808c0f782663, |
| 214 |
}, |
| 215 |
.fold_across_1024_bits_consts = { |
| 216 |
0xa1ca681e733f9c40, |
| 217 |
0x5f852fb61e8d92dc, |
| 218 |
}, |
| 219 |
.fold_across_512_bits_consts = { |
| 220 |
0x0c32cdb31e18a84a, |
| 221 |
0x62242240ace5045a, |
| 222 |
}, |
| 223 |
.fold_across_256_bits_consts = { |
| 224 |
0xb0bc2e589204f500, |
| 225 |
0xe1e0bb9d45d7a44c, |
| 226 |
}, |
| 227 |
.fold_across_128_bits_consts = { |
| 228 |
0xeadc41fd2ba3d420, |
| 229 |
0x21e9761e252621ac, |
| 230 |
}, |
| 231 |
.shuf_table = { |
| 232 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 233 |
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
| 234 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 235 |
}, |
| 236 |
.barrett_reduction_consts = { |
| 237 |
0x27ecfa329aef9f77, |
| 238 |
0x34d926535897936a, |
| 239 |
}, |
| 240 |
}; |