OLD | NEW |
(Empty) | |
| 1 #if defined(__x86_64__) |
| 2 .text |
| 3 |
| 4 |
| 5 |
| 6 |
| 7 .type _bsaes_encrypt8,@function |
| 8 .align 64 |
| 9 _bsaes_encrypt8: |
| 10 leaq .LBS0(%rip),%r11 |
| 11 |
| 12 movdqa (%rax),%xmm8 |
| 13 leaq 16(%rax),%rax |
| 14 movdqa 80(%r11),%xmm7 |
| 15 pxor %xmm8,%xmm15 |
| 16 pxor %xmm8,%xmm0 |
| 17 pxor %xmm8,%xmm1 |
| 18 pxor %xmm8,%xmm2 |
| 19 .byte 102,68,15,56,0,255 |
| 20 .byte 102,15,56,0,199 |
| 21 pxor %xmm8,%xmm3 |
| 22 pxor %xmm8,%xmm4 |
| 23 .byte 102,15,56,0,207 |
| 24 .byte 102,15,56,0,215 |
| 25 pxor %xmm8,%xmm5 |
| 26 pxor %xmm8,%xmm6 |
| 27 .byte 102,15,56,0,223 |
| 28 .byte 102,15,56,0,231 |
| 29 .byte 102,15,56,0,239 |
| 30 .byte 102,15,56,0,247 |
| 31 _bsaes_encrypt8_bitslice: |
| 32 movdqa 0(%r11),%xmm7 |
| 33 movdqa 16(%r11),%xmm8 |
| 34 movdqa %xmm5,%xmm9 |
| 35 psrlq $1,%xmm5 |
| 36 movdqa %xmm3,%xmm10 |
| 37 psrlq $1,%xmm3 |
| 38 pxor %xmm6,%xmm5 |
| 39 pxor %xmm4,%xmm3 |
| 40 pand %xmm7,%xmm5 |
| 41 pand %xmm7,%xmm3 |
| 42 pxor %xmm5,%xmm6 |
| 43 psllq $1,%xmm5 |
| 44 pxor %xmm3,%xmm4 |
| 45 psllq $1,%xmm3 |
| 46 pxor %xmm9,%xmm5 |
| 47 pxor %xmm10,%xmm3 |
| 48 movdqa %xmm1,%xmm9 |
| 49 psrlq $1,%xmm1 |
| 50 movdqa %xmm15,%xmm10 |
| 51 psrlq $1,%xmm15 |
| 52 pxor %xmm2,%xmm1 |
| 53 pxor %xmm0,%xmm15 |
| 54 pand %xmm7,%xmm1 |
| 55 pand %xmm7,%xmm15 |
| 56 pxor %xmm1,%xmm2 |
| 57 psllq $1,%xmm1 |
| 58 pxor %xmm15,%xmm0 |
| 59 psllq $1,%xmm15 |
| 60 pxor %xmm9,%xmm1 |
| 61 pxor %xmm10,%xmm15 |
| 62 movdqa 32(%r11),%xmm7 |
| 63 movdqa %xmm4,%xmm9 |
| 64 psrlq $2,%xmm4 |
| 65 movdqa %xmm3,%xmm10 |
| 66 psrlq $2,%xmm3 |
| 67 pxor %xmm6,%xmm4 |
| 68 pxor %xmm5,%xmm3 |
| 69 pand %xmm8,%xmm4 |
| 70 pand %xmm8,%xmm3 |
| 71 pxor %xmm4,%xmm6 |
| 72 psllq $2,%xmm4 |
| 73 pxor %xmm3,%xmm5 |
| 74 psllq $2,%xmm3 |
| 75 pxor %xmm9,%xmm4 |
| 76 pxor %xmm10,%xmm3 |
| 77 movdqa %xmm0,%xmm9 |
| 78 psrlq $2,%xmm0 |
| 79 movdqa %xmm15,%xmm10 |
| 80 psrlq $2,%xmm15 |
| 81 pxor %xmm2,%xmm0 |
| 82 pxor %xmm1,%xmm15 |
| 83 pand %xmm8,%xmm0 |
| 84 pand %xmm8,%xmm15 |
| 85 pxor %xmm0,%xmm2 |
| 86 psllq $2,%xmm0 |
| 87 pxor %xmm15,%xmm1 |
| 88 psllq $2,%xmm15 |
| 89 pxor %xmm9,%xmm0 |
| 90 pxor %xmm10,%xmm15 |
| 91 movdqa %xmm2,%xmm9 |
| 92 psrlq $4,%xmm2 |
| 93 movdqa %xmm1,%xmm10 |
| 94 psrlq $4,%xmm1 |
| 95 pxor %xmm6,%xmm2 |
| 96 pxor %xmm5,%xmm1 |
| 97 pand %xmm7,%xmm2 |
| 98 pand %xmm7,%xmm1 |
| 99 pxor %xmm2,%xmm6 |
| 100 psllq $4,%xmm2 |
| 101 pxor %xmm1,%xmm5 |
| 102 psllq $4,%xmm1 |
| 103 pxor %xmm9,%xmm2 |
| 104 pxor %xmm10,%xmm1 |
| 105 movdqa %xmm0,%xmm9 |
| 106 psrlq $4,%xmm0 |
| 107 movdqa %xmm15,%xmm10 |
| 108 psrlq $4,%xmm15 |
| 109 pxor %xmm4,%xmm0 |
| 110 pxor %xmm3,%xmm15 |
| 111 pand %xmm7,%xmm0 |
| 112 pand %xmm7,%xmm15 |
| 113 pxor %xmm0,%xmm4 |
| 114 psllq $4,%xmm0 |
| 115 pxor %xmm15,%xmm3 |
| 116 psllq $4,%xmm15 |
| 117 pxor %xmm9,%xmm0 |
| 118 pxor %xmm10,%xmm15 |
| 119 decl %r10d |
| 120 jmp .Lenc_sbox |
| 121 .align 16 |
| 122 .Lenc_loop: |
| 123 pxor 0(%rax),%xmm15 |
| 124 pxor 16(%rax),%xmm0 |
| 125 pxor 32(%rax),%xmm1 |
| 126 pxor 48(%rax),%xmm2 |
| 127 .byte 102,68,15,56,0,255 |
| 128 .byte 102,15,56,0,199 |
| 129 pxor 64(%rax),%xmm3 |
| 130 pxor 80(%rax),%xmm4 |
| 131 .byte 102,15,56,0,207 |
| 132 .byte 102,15,56,0,215 |
| 133 pxor 96(%rax),%xmm5 |
| 134 pxor 112(%rax),%xmm6 |
| 135 .byte 102,15,56,0,223 |
| 136 .byte 102,15,56,0,231 |
| 137 .byte 102,15,56,0,239 |
| 138 .byte 102,15,56,0,247 |
| 139 leaq 128(%rax),%rax |
| 140 .Lenc_sbox: |
| 141 pxor %xmm5,%xmm4 |
| 142 pxor %xmm0,%xmm1 |
| 143 pxor %xmm15,%xmm2 |
| 144 pxor %xmm1,%xmm5 |
| 145 pxor %xmm15,%xmm4 |
| 146 |
| 147 pxor %xmm2,%xmm5 |
| 148 pxor %xmm6,%xmm2 |
| 149 pxor %xmm4,%xmm6 |
| 150 pxor %xmm3,%xmm2 |
| 151 pxor %xmm4,%xmm3 |
| 152 pxor %xmm0,%xmm2 |
| 153 |
| 154 pxor %xmm6,%xmm1 |
| 155 pxor %xmm4,%xmm0 |
| 156 movdqa %xmm6,%xmm10 |
| 157 movdqa %xmm0,%xmm9 |
| 158 movdqa %xmm4,%xmm8 |
| 159 movdqa %xmm1,%xmm12 |
| 160 movdqa %xmm5,%xmm11 |
| 161 |
| 162 pxor %xmm3,%xmm10 |
| 163 pxor %xmm1,%xmm9 |
| 164 pxor %xmm2,%xmm8 |
| 165 movdqa %xmm10,%xmm13 |
| 166 pxor %xmm3,%xmm12 |
| 167 movdqa %xmm9,%xmm7 |
| 168 pxor %xmm15,%xmm11 |
| 169 movdqa %xmm10,%xmm14 |
| 170 |
| 171 por %xmm8,%xmm9 |
| 172 por %xmm11,%xmm10 |
| 173 pxor %xmm7,%xmm14 |
| 174 pand %xmm11,%xmm13 |
| 175 pxor %xmm8,%xmm11 |
| 176 pand %xmm8,%xmm7 |
| 177 pand %xmm11,%xmm14 |
| 178 movdqa %xmm2,%xmm11 |
| 179 pxor %xmm15,%xmm11 |
| 180 pand %xmm11,%xmm12 |
| 181 pxor %xmm12,%xmm10 |
| 182 pxor %xmm12,%xmm9 |
| 183 movdqa %xmm6,%xmm12 |
| 184 movdqa %xmm4,%xmm11 |
| 185 pxor %xmm0,%xmm12 |
| 186 pxor %xmm5,%xmm11 |
| 187 movdqa %xmm12,%xmm8 |
| 188 pand %xmm11,%xmm12 |
| 189 por %xmm11,%xmm8 |
| 190 pxor %xmm12,%xmm7 |
| 191 pxor %xmm14,%xmm10 |
| 192 pxor %xmm13,%xmm9 |
| 193 pxor %xmm14,%xmm8 |
| 194 movdqa %xmm1,%xmm11 |
| 195 pxor %xmm13,%xmm7 |
| 196 movdqa %xmm3,%xmm12 |
| 197 pxor %xmm13,%xmm8 |
| 198 movdqa %xmm0,%xmm13 |
| 199 pand %xmm2,%xmm11 |
| 200 movdqa %xmm6,%xmm14 |
| 201 pand %xmm15,%xmm12 |
| 202 pand %xmm4,%xmm13 |
| 203 por %xmm5,%xmm14 |
| 204 pxor %xmm11,%xmm10 |
| 205 pxor %xmm12,%xmm9 |
| 206 pxor %xmm13,%xmm8 |
| 207 pxor %xmm14,%xmm7 |
| 208 |
| 209 |
| 210 |
| 211 |
| 212 |
| 213 movdqa %xmm10,%xmm11 |
| 214 pand %xmm8,%xmm10 |
| 215 pxor %xmm9,%xmm11 |
| 216 |
| 217 movdqa %xmm7,%xmm13 |
| 218 movdqa %xmm11,%xmm14 |
| 219 pxor %xmm10,%xmm13 |
| 220 pand %xmm13,%xmm14 |
| 221 |
| 222 movdqa %xmm8,%xmm12 |
| 223 pxor %xmm9,%xmm14 |
| 224 pxor %xmm7,%xmm12 |
| 225 |
| 226 pxor %xmm9,%xmm10 |
| 227 |
| 228 pand %xmm10,%xmm12 |
| 229 |
| 230 movdqa %xmm13,%xmm9 |
| 231 pxor %xmm7,%xmm12 |
| 232 |
| 233 pxor %xmm12,%xmm9 |
| 234 pxor %xmm12,%xmm8 |
| 235 |
| 236 pand %xmm7,%xmm9 |
| 237 |
| 238 pxor %xmm9,%xmm13 |
| 239 pxor %xmm9,%xmm8 |
| 240 |
| 241 pand %xmm14,%xmm13 |
| 242 |
| 243 pxor %xmm11,%xmm13 |
| 244 movdqa %xmm5,%xmm11 |
| 245 movdqa %xmm4,%xmm7 |
| 246 movdqa %xmm14,%xmm9 |
| 247 pxor %xmm13,%xmm9 |
| 248 pand %xmm5,%xmm9 |
| 249 pxor %xmm4,%xmm5 |
| 250 pand %xmm14,%xmm4 |
| 251 pand %xmm13,%xmm5 |
| 252 pxor %xmm4,%xmm5 |
| 253 pxor %xmm9,%xmm4 |
| 254 pxor %xmm15,%xmm11 |
| 255 pxor %xmm2,%xmm7 |
| 256 pxor %xmm12,%xmm14 |
| 257 pxor %xmm8,%xmm13 |
| 258 movdqa %xmm14,%xmm10 |
| 259 movdqa %xmm12,%xmm9 |
| 260 pxor %xmm13,%xmm10 |
| 261 pxor %xmm8,%xmm9 |
| 262 pand %xmm11,%xmm10 |
| 263 pand %xmm15,%xmm9 |
| 264 pxor %xmm7,%xmm11 |
| 265 pxor %xmm2,%xmm15 |
| 266 pand %xmm14,%xmm7 |
| 267 pand %xmm12,%xmm2 |
| 268 pand %xmm13,%xmm11 |
| 269 pand %xmm8,%xmm15 |
| 270 pxor %xmm11,%xmm7 |
| 271 pxor %xmm2,%xmm15 |
| 272 pxor %xmm10,%xmm11 |
| 273 pxor %xmm9,%xmm2 |
| 274 pxor %xmm11,%xmm5 |
| 275 pxor %xmm11,%xmm15 |
| 276 pxor %xmm7,%xmm4 |
| 277 pxor %xmm7,%xmm2 |
| 278 |
| 279 movdqa %xmm6,%xmm11 |
| 280 movdqa %xmm0,%xmm7 |
| 281 pxor %xmm3,%xmm11 |
| 282 pxor %xmm1,%xmm7 |
| 283 movdqa %xmm14,%xmm10 |
| 284 movdqa %xmm12,%xmm9 |
| 285 pxor %xmm13,%xmm10 |
| 286 pxor %xmm8,%xmm9 |
| 287 pand %xmm11,%xmm10 |
| 288 pand %xmm3,%xmm9 |
| 289 pxor %xmm7,%xmm11 |
| 290 pxor %xmm1,%xmm3 |
| 291 pand %xmm14,%xmm7 |
| 292 pand %xmm12,%xmm1 |
| 293 pand %xmm13,%xmm11 |
| 294 pand %xmm8,%xmm3 |
| 295 pxor %xmm11,%xmm7 |
| 296 pxor %xmm1,%xmm3 |
| 297 pxor %xmm10,%xmm11 |
| 298 pxor %xmm9,%xmm1 |
| 299 pxor %xmm12,%xmm14 |
| 300 pxor %xmm8,%xmm13 |
| 301 movdqa %xmm14,%xmm10 |
| 302 pxor %xmm13,%xmm10 |
| 303 pand %xmm6,%xmm10 |
| 304 pxor %xmm0,%xmm6 |
| 305 pand %xmm14,%xmm0 |
| 306 pand %xmm13,%xmm6 |
| 307 pxor %xmm0,%xmm6 |
| 308 pxor %xmm10,%xmm0 |
| 309 pxor %xmm11,%xmm6 |
| 310 pxor %xmm11,%xmm3 |
| 311 pxor %xmm7,%xmm0 |
| 312 pxor %xmm7,%xmm1 |
| 313 pxor %xmm15,%xmm6 |
| 314 pxor %xmm5,%xmm0 |
| 315 pxor %xmm6,%xmm3 |
| 316 pxor %xmm15,%xmm5 |
| 317 pxor %xmm0,%xmm15 |
| 318 |
| 319 pxor %xmm4,%xmm0 |
| 320 pxor %xmm1,%xmm4 |
| 321 pxor %xmm2,%xmm1 |
| 322 pxor %xmm4,%xmm2 |
| 323 pxor %xmm4,%xmm3 |
| 324 |
| 325 pxor %xmm2,%xmm5 |
| 326 decl %r10d |
| 327 jl .Lenc_done |
| 328 pshufd $147,%xmm15,%xmm7 |
| 329 pshufd $147,%xmm0,%xmm8 |
| 330 pxor %xmm7,%xmm15 |
| 331 pshufd $147,%xmm3,%xmm9 |
| 332 pxor %xmm8,%xmm0 |
| 333 pshufd $147,%xmm5,%xmm10 |
| 334 pxor %xmm9,%xmm3 |
| 335 pshufd $147,%xmm2,%xmm11 |
| 336 pxor %xmm10,%xmm5 |
| 337 pshufd $147,%xmm6,%xmm12 |
| 338 pxor %xmm11,%xmm2 |
| 339 pshufd $147,%xmm1,%xmm13 |
| 340 pxor %xmm12,%xmm6 |
| 341 pshufd $147,%xmm4,%xmm14 |
| 342 pxor %xmm13,%xmm1 |
| 343 pxor %xmm14,%xmm4 |
| 344 |
| 345 pxor %xmm15,%xmm8 |
| 346 pxor %xmm4,%xmm7 |
| 347 pxor %xmm4,%xmm8 |
| 348 pshufd $78,%xmm15,%xmm15 |
| 349 pxor %xmm0,%xmm9 |
| 350 pshufd $78,%xmm0,%xmm0 |
| 351 pxor %xmm2,%xmm12 |
| 352 pxor %xmm7,%xmm15 |
| 353 pxor %xmm6,%xmm13 |
| 354 pxor %xmm8,%xmm0 |
| 355 pxor %xmm5,%xmm11 |
| 356 pshufd $78,%xmm2,%xmm7 |
| 357 pxor %xmm1,%xmm14 |
| 358 pshufd $78,%xmm6,%xmm8 |
| 359 pxor %xmm3,%xmm10 |
| 360 pshufd $78,%xmm5,%xmm2 |
| 361 pxor %xmm4,%xmm10 |
| 362 pshufd $78,%xmm4,%xmm6 |
| 363 pxor %xmm4,%xmm11 |
| 364 pshufd $78,%xmm1,%xmm5 |
| 365 pxor %xmm11,%xmm7 |
| 366 pshufd $78,%xmm3,%xmm1 |
| 367 pxor %xmm12,%xmm8 |
| 368 pxor %xmm10,%xmm2 |
| 369 pxor %xmm14,%xmm6 |
| 370 pxor %xmm13,%xmm5 |
| 371 movdqa %xmm7,%xmm3 |
| 372 pxor %xmm9,%xmm1 |
| 373 movdqa %xmm8,%xmm4 |
| 374 movdqa 48(%r11),%xmm7 |
| 375 jnz .Lenc_loop |
| 376 movdqa 64(%r11),%xmm7 |
| 377 jmp .Lenc_loop |
| 378 .align 16 |
| 379 .Lenc_done: |
| 380 movdqa 0(%r11),%xmm7 |
| 381 movdqa 16(%r11),%xmm8 |
| 382 movdqa %xmm1,%xmm9 |
| 383 psrlq $1,%xmm1 |
| 384 movdqa %xmm2,%xmm10 |
| 385 psrlq $1,%xmm2 |
| 386 pxor %xmm4,%xmm1 |
| 387 pxor %xmm6,%xmm2 |
| 388 pand %xmm7,%xmm1 |
| 389 pand %xmm7,%xmm2 |
| 390 pxor %xmm1,%xmm4 |
| 391 psllq $1,%xmm1 |
| 392 pxor %xmm2,%xmm6 |
| 393 psllq $1,%xmm2 |
| 394 pxor %xmm9,%xmm1 |
| 395 pxor %xmm10,%xmm2 |
| 396 movdqa %xmm3,%xmm9 |
| 397 psrlq $1,%xmm3 |
| 398 movdqa %xmm15,%xmm10 |
| 399 psrlq $1,%xmm15 |
| 400 pxor %xmm5,%xmm3 |
| 401 pxor %xmm0,%xmm15 |
| 402 pand %xmm7,%xmm3 |
| 403 pand %xmm7,%xmm15 |
| 404 pxor %xmm3,%xmm5 |
| 405 psllq $1,%xmm3 |
| 406 pxor %xmm15,%xmm0 |
| 407 psllq $1,%xmm15 |
| 408 pxor %xmm9,%xmm3 |
| 409 pxor %xmm10,%xmm15 |
| 410 movdqa 32(%r11),%xmm7 |
| 411 movdqa %xmm6,%xmm9 |
| 412 psrlq $2,%xmm6 |
| 413 movdqa %xmm2,%xmm10 |
| 414 psrlq $2,%xmm2 |
| 415 pxor %xmm4,%xmm6 |
| 416 pxor %xmm1,%xmm2 |
| 417 pand %xmm8,%xmm6 |
| 418 pand %xmm8,%xmm2 |
| 419 pxor %xmm6,%xmm4 |
| 420 psllq $2,%xmm6 |
| 421 pxor %xmm2,%xmm1 |
| 422 psllq $2,%xmm2 |
| 423 pxor %xmm9,%xmm6 |
| 424 pxor %xmm10,%xmm2 |
| 425 movdqa %xmm0,%xmm9 |
| 426 psrlq $2,%xmm0 |
| 427 movdqa %xmm15,%xmm10 |
| 428 psrlq $2,%xmm15 |
| 429 pxor %xmm5,%xmm0 |
| 430 pxor %xmm3,%xmm15 |
| 431 pand %xmm8,%xmm0 |
| 432 pand %xmm8,%xmm15 |
| 433 pxor %xmm0,%xmm5 |
| 434 psllq $2,%xmm0 |
| 435 pxor %xmm15,%xmm3 |
| 436 psllq $2,%xmm15 |
| 437 pxor %xmm9,%xmm0 |
| 438 pxor %xmm10,%xmm15 |
| 439 movdqa %xmm5,%xmm9 |
| 440 psrlq $4,%xmm5 |
| 441 movdqa %xmm3,%xmm10 |
| 442 psrlq $4,%xmm3 |
| 443 pxor %xmm4,%xmm5 |
| 444 pxor %xmm1,%xmm3 |
| 445 pand %xmm7,%xmm5 |
| 446 pand %xmm7,%xmm3 |
| 447 pxor %xmm5,%xmm4 |
| 448 psllq $4,%xmm5 |
| 449 pxor %xmm3,%xmm1 |
| 450 psllq $4,%xmm3 |
| 451 pxor %xmm9,%xmm5 |
| 452 pxor %xmm10,%xmm3 |
| 453 movdqa %xmm0,%xmm9 |
| 454 psrlq $4,%xmm0 |
| 455 movdqa %xmm15,%xmm10 |
| 456 psrlq $4,%xmm15 |
| 457 pxor %xmm6,%xmm0 |
| 458 pxor %xmm2,%xmm15 |
| 459 pand %xmm7,%xmm0 |
| 460 pand %xmm7,%xmm15 |
| 461 pxor %xmm0,%xmm6 |
| 462 psllq $4,%xmm0 |
| 463 pxor %xmm15,%xmm2 |
| 464 psllq $4,%xmm15 |
| 465 pxor %xmm9,%xmm0 |
| 466 pxor %xmm10,%xmm15 |
| 467 movdqa (%rax),%xmm7 |
| 468 pxor %xmm7,%xmm3 |
| 469 pxor %xmm7,%xmm5 |
| 470 pxor %xmm7,%xmm2 |
| 471 pxor %xmm7,%xmm6 |
| 472 pxor %xmm7,%xmm1 |
| 473 pxor %xmm7,%xmm4 |
| 474 pxor %xmm7,%xmm15 |
| 475 pxor %xmm7,%xmm0 |
| 476 .byte 0xf3,0xc3 |
| 477 .size _bsaes_encrypt8,.-_bsaes_encrypt8 |
| 478 |
| 479 .type _bsaes_decrypt8,@function |
| 480 .align 64 |
| 481 _bsaes_decrypt8: |
| 482 leaq .LBS0(%rip),%r11 |
| 483 |
| 484 movdqa (%rax),%xmm8 |
| 485 leaq 16(%rax),%rax |
| 486 movdqa -48(%r11),%xmm7 |
| 487 pxor %xmm8,%xmm15 |
| 488 pxor %xmm8,%xmm0 |
| 489 pxor %xmm8,%xmm1 |
| 490 pxor %xmm8,%xmm2 |
| 491 .byte 102,68,15,56,0,255 |
| 492 .byte 102,15,56,0,199 |
| 493 pxor %xmm8,%xmm3 |
| 494 pxor %xmm8,%xmm4 |
| 495 .byte 102,15,56,0,207 |
| 496 .byte 102,15,56,0,215 |
| 497 pxor %xmm8,%xmm5 |
| 498 pxor %xmm8,%xmm6 |
| 499 .byte 102,15,56,0,223 |
| 500 .byte 102,15,56,0,231 |
| 501 .byte 102,15,56,0,239 |
| 502 .byte 102,15,56,0,247 |
| 503 movdqa 0(%r11),%xmm7 |
| 504 movdqa 16(%r11),%xmm8 |
| 505 movdqa %xmm5,%xmm9 |
| 506 psrlq $1,%xmm5 |
| 507 movdqa %xmm3,%xmm10 |
| 508 psrlq $1,%xmm3 |
| 509 pxor %xmm6,%xmm5 |
| 510 pxor %xmm4,%xmm3 |
| 511 pand %xmm7,%xmm5 |
| 512 pand %xmm7,%xmm3 |
| 513 pxor %xmm5,%xmm6 |
| 514 psllq $1,%xmm5 |
| 515 pxor %xmm3,%xmm4 |
| 516 psllq $1,%xmm3 |
| 517 pxor %xmm9,%xmm5 |
| 518 pxor %xmm10,%xmm3 |
| 519 movdqa %xmm1,%xmm9 |
| 520 psrlq $1,%xmm1 |
| 521 movdqa %xmm15,%xmm10 |
| 522 psrlq $1,%xmm15 |
| 523 pxor %xmm2,%xmm1 |
| 524 pxor %xmm0,%xmm15 |
| 525 pand %xmm7,%xmm1 |
| 526 pand %xmm7,%xmm15 |
| 527 pxor %xmm1,%xmm2 |
| 528 psllq $1,%xmm1 |
| 529 pxor %xmm15,%xmm0 |
| 530 psllq $1,%xmm15 |
| 531 pxor %xmm9,%xmm1 |
| 532 pxor %xmm10,%xmm15 |
| 533 movdqa 32(%r11),%xmm7 |
| 534 movdqa %xmm4,%xmm9 |
| 535 psrlq $2,%xmm4 |
| 536 movdqa %xmm3,%xmm10 |
| 537 psrlq $2,%xmm3 |
| 538 pxor %xmm6,%xmm4 |
| 539 pxor %xmm5,%xmm3 |
| 540 pand %xmm8,%xmm4 |
| 541 pand %xmm8,%xmm3 |
| 542 pxor %xmm4,%xmm6 |
| 543 psllq $2,%xmm4 |
| 544 pxor %xmm3,%xmm5 |
| 545 psllq $2,%xmm3 |
| 546 pxor %xmm9,%xmm4 |
| 547 pxor %xmm10,%xmm3 |
| 548 movdqa %xmm0,%xmm9 |
| 549 psrlq $2,%xmm0 |
| 550 movdqa %xmm15,%xmm10 |
| 551 psrlq $2,%xmm15 |
| 552 pxor %xmm2,%xmm0 |
| 553 pxor %xmm1,%xmm15 |
| 554 pand %xmm8,%xmm0 |
| 555 pand %xmm8,%xmm15 |
| 556 pxor %xmm0,%xmm2 |
| 557 psllq $2,%xmm0 |
| 558 pxor %xmm15,%xmm1 |
| 559 psllq $2,%xmm15 |
| 560 pxor %xmm9,%xmm0 |
| 561 pxor %xmm10,%xmm15 |
| 562 movdqa %xmm2,%xmm9 |
| 563 psrlq $4,%xmm2 |
| 564 movdqa %xmm1,%xmm10 |
| 565 psrlq $4,%xmm1 |
| 566 pxor %xmm6,%xmm2 |
| 567 pxor %xmm5,%xmm1 |
| 568 pand %xmm7,%xmm2 |
| 569 pand %xmm7,%xmm1 |
| 570 pxor %xmm2,%xmm6 |
| 571 psllq $4,%xmm2 |
| 572 pxor %xmm1,%xmm5 |
| 573 psllq $4,%xmm1 |
| 574 pxor %xmm9,%xmm2 |
| 575 pxor %xmm10,%xmm1 |
| 576 movdqa %xmm0,%xmm9 |
| 577 psrlq $4,%xmm0 |
| 578 movdqa %xmm15,%xmm10 |
| 579 psrlq $4,%xmm15 |
| 580 pxor %xmm4,%xmm0 |
| 581 pxor %xmm3,%xmm15 |
| 582 pand %xmm7,%xmm0 |
| 583 pand %xmm7,%xmm15 |
| 584 pxor %xmm0,%xmm4 |
| 585 psllq $4,%xmm0 |
| 586 pxor %xmm15,%xmm3 |
| 587 psllq $4,%xmm15 |
| 588 pxor %xmm9,%xmm0 |
| 589 pxor %xmm10,%xmm15 |
| 590 decl %r10d |
| 591 jmp .Ldec_sbox |
| 592 .align 16 |
| 593 .Ldec_loop: |
| 594 pxor 0(%rax),%xmm15 |
| 595 pxor 16(%rax),%xmm0 |
| 596 pxor 32(%rax),%xmm1 |
| 597 pxor 48(%rax),%xmm2 |
| 598 .byte 102,68,15,56,0,255 |
| 599 .byte 102,15,56,0,199 |
| 600 pxor 64(%rax),%xmm3 |
| 601 pxor 80(%rax),%xmm4 |
| 602 .byte 102,15,56,0,207 |
| 603 .byte 102,15,56,0,215 |
| 604 pxor 96(%rax),%xmm5 |
| 605 pxor 112(%rax),%xmm6 |
| 606 .byte 102,15,56,0,223 |
| 607 .byte 102,15,56,0,231 |
| 608 .byte 102,15,56,0,239 |
| 609 .byte 102,15,56,0,247 |
| 610 leaq 128(%rax),%rax |
| 611 .Ldec_sbox: |
| 612 pxor %xmm3,%xmm2 |
| 613 |
| 614 pxor %xmm6,%xmm3 |
| 615 pxor %xmm6,%xmm1 |
| 616 pxor %xmm3,%xmm5 |
| 617 pxor %xmm5,%xmm6 |
| 618 pxor %xmm6,%xmm0 |
| 619 |
| 620 pxor %xmm0,%xmm15 |
| 621 pxor %xmm4,%xmm1 |
| 622 pxor %xmm15,%xmm2 |
| 623 pxor %xmm15,%xmm4 |
| 624 pxor %xmm2,%xmm0 |
| 625 movdqa %xmm2,%xmm10 |
| 626 movdqa %xmm6,%xmm9 |
| 627 movdqa %xmm0,%xmm8 |
| 628 movdqa %xmm3,%xmm12 |
| 629 movdqa %xmm4,%xmm11 |
| 630 |
| 631 pxor %xmm15,%xmm10 |
| 632 pxor %xmm3,%xmm9 |
| 633 pxor %xmm5,%xmm8 |
| 634 movdqa %xmm10,%xmm13 |
| 635 pxor %xmm15,%xmm12 |
| 636 movdqa %xmm9,%xmm7 |
| 637 pxor %xmm1,%xmm11 |
| 638 movdqa %xmm10,%xmm14 |
| 639 |
| 640 por %xmm8,%xmm9 |
| 641 por %xmm11,%xmm10 |
| 642 pxor %xmm7,%xmm14 |
| 643 pand %xmm11,%xmm13 |
| 644 pxor %xmm8,%xmm11 |
| 645 pand %xmm8,%xmm7 |
| 646 pand %xmm11,%xmm14 |
| 647 movdqa %xmm5,%xmm11 |
| 648 pxor %xmm1,%xmm11 |
| 649 pand %xmm11,%xmm12 |
| 650 pxor %xmm12,%xmm10 |
| 651 pxor %xmm12,%xmm9 |
| 652 movdqa %xmm2,%xmm12 |
| 653 movdqa %xmm0,%xmm11 |
| 654 pxor %xmm6,%xmm12 |
| 655 pxor %xmm4,%xmm11 |
| 656 movdqa %xmm12,%xmm8 |
| 657 pand %xmm11,%xmm12 |
| 658 por %xmm11,%xmm8 |
| 659 pxor %xmm12,%xmm7 |
| 660 pxor %xmm14,%xmm10 |
| 661 pxor %xmm13,%xmm9 |
| 662 pxor %xmm14,%xmm8 |
| 663 movdqa %xmm3,%xmm11 |
| 664 pxor %xmm13,%xmm7 |
| 665 movdqa %xmm15,%xmm12 |
| 666 pxor %xmm13,%xmm8 |
| 667 movdqa %xmm6,%xmm13 |
| 668 pand %xmm5,%xmm11 |
| 669 movdqa %xmm2,%xmm14 |
| 670 pand %xmm1,%xmm12 |
| 671 pand %xmm0,%xmm13 |
| 672 por %xmm4,%xmm14 |
| 673 pxor %xmm11,%xmm10 |
| 674 pxor %xmm12,%xmm9 |
| 675 pxor %xmm13,%xmm8 |
| 676 pxor %xmm14,%xmm7 |
| 677 |
| 678 |
| 679 |
| 680 |
| 681 |
| 682 movdqa %xmm10,%xmm11 |
| 683 pand %xmm8,%xmm10 |
| 684 pxor %xmm9,%xmm11 |
| 685 |
| 686 movdqa %xmm7,%xmm13 |
| 687 movdqa %xmm11,%xmm14 |
| 688 pxor %xmm10,%xmm13 |
| 689 pand %xmm13,%xmm14 |
| 690 |
| 691 movdqa %xmm8,%xmm12 |
| 692 pxor %xmm9,%xmm14 |
| 693 pxor %xmm7,%xmm12 |
| 694 |
| 695 pxor %xmm9,%xmm10 |
| 696 |
| 697 pand %xmm10,%xmm12 |
| 698 |
| 699 movdqa %xmm13,%xmm9 |
| 700 pxor %xmm7,%xmm12 |
| 701 |
| 702 pxor %xmm12,%xmm9 |
| 703 pxor %xmm12,%xmm8 |
| 704 |
| 705 pand %xmm7,%xmm9 |
| 706 |
| 707 pxor %xmm9,%xmm13 |
| 708 pxor %xmm9,%xmm8 |
| 709 |
| 710 pand %xmm14,%xmm13 |
| 711 |
| 712 pxor %xmm11,%xmm13 |
| 713 movdqa %xmm4,%xmm11 |
| 714 movdqa %xmm0,%xmm7 |
| 715 movdqa %xmm14,%xmm9 |
| 716 pxor %xmm13,%xmm9 |
| 717 pand %xmm4,%xmm9 |
| 718 pxor %xmm0,%xmm4 |
| 719 pand %xmm14,%xmm0 |
| 720 pand %xmm13,%xmm4 |
| 721 pxor %xmm0,%xmm4 |
| 722 pxor %xmm9,%xmm0 |
| 723 pxor %xmm1,%xmm11 |
| 724 pxor %xmm5,%xmm7 |
| 725 pxor %xmm12,%xmm14 |
| 726 pxor %xmm8,%xmm13 |
| 727 movdqa %xmm14,%xmm10 |
| 728 movdqa %xmm12,%xmm9 |
| 729 pxor %xmm13,%xmm10 |
| 730 pxor %xmm8,%xmm9 |
| 731 pand %xmm11,%xmm10 |
| 732 pand %xmm1,%xmm9 |
| 733 pxor %xmm7,%xmm11 |
| 734 pxor %xmm5,%xmm1 |
| 735 pand %xmm14,%xmm7 |
| 736 pand %xmm12,%xmm5 |
| 737 pand %xmm13,%xmm11 |
| 738 pand %xmm8,%xmm1 |
| 739 pxor %xmm11,%xmm7 |
| 740 pxor %xmm5,%xmm1 |
| 741 pxor %xmm10,%xmm11 |
| 742 pxor %xmm9,%xmm5 |
| 743 pxor %xmm11,%xmm4 |
| 744 pxor %xmm11,%xmm1 |
| 745 pxor %xmm7,%xmm0 |
| 746 pxor %xmm7,%xmm5 |
| 747 |
| 748 movdqa %xmm2,%xmm11 |
| 749 movdqa %xmm6,%xmm7 |
| 750 pxor %xmm15,%xmm11 |
| 751 pxor %xmm3,%xmm7 |
| 752 movdqa %xmm14,%xmm10 |
| 753 movdqa %xmm12,%xmm9 |
| 754 pxor %xmm13,%xmm10 |
| 755 pxor %xmm8,%xmm9 |
| 756 pand %xmm11,%xmm10 |
| 757 pand %xmm15,%xmm9 |
| 758 pxor %xmm7,%xmm11 |
| 759 pxor %xmm3,%xmm15 |
| 760 pand %xmm14,%xmm7 |
| 761 pand %xmm12,%xmm3 |
| 762 pand %xmm13,%xmm11 |
| 763 pand %xmm8,%xmm15 |
| 764 pxor %xmm11,%xmm7 |
| 765 pxor %xmm3,%xmm15 |
| 766 pxor %xmm10,%xmm11 |
| 767 pxor %xmm9,%xmm3 |
| 768 pxor %xmm12,%xmm14 |
| 769 pxor %xmm8,%xmm13 |
| 770 movdqa %xmm14,%xmm10 |
| 771 pxor %xmm13,%xmm10 |
| 772 pand %xmm2,%xmm10 |
| 773 pxor %xmm6,%xmm2 |
| 774 pand %xmm14,%xmm6 |
| 775 pand %xmm13,%xmm2 |
| 776 pxor %xmm6,%xmm2 |
| 777 pxor %xmm10,%xmm6 |
| 778 pxor %xmm11,%xmm2 |
| 779 pxor %xmm11,%xmm15 |
| 780 pxor %xmm7,%xmm6 |
| 781 pxor %xmm7,%xmm3 |
| 782 pxor %xmm6,%xmm0 |
| 783 pxor %xmm4,%xmm5 |
| 784 |
| 785 pxor %xmm0,%xmm3 |
| 786 pxor %xmm6,%xmm1 |
| 787 pxor %xmm6,%xmm4 |
| 788 pxor %xmm1,%xmm3 |
| 789 pxor %xmm15,%xmm6 |
| 790 pxor %xmm4,%xmm3 |
| 791 pxor %xmm5,%xmm2 |
| 792 pxor %xmm0,%xmm5 |
| 793 pxor %xmm3,%xmm2 |
| 794 |
| 795 pxor %xmm15,%xmm3 |
| 796 pxor %xmm2,%xmm6 |
| 797 decl %r10d |
| 798 jl .Ldec_done |
| 799 |
| 800 pshufd $78,%xmm15,%xmm7 |
| 801 pshufd $78,%xmm2,%xmm13 |
| 802 pxor %xmm15,%xmm7 |
| 803 pshufd $78,%xmm4,%xmm14 |
| 804 pxor %xmm2,%xmm13 |
| 805 pshufd $78,%xmm0,%xmm8 |
| 806 pxor %xmm4,%xmm14 |
| 807 pshufd $78,%xmm5,%xmm9 |
| 808 pxor %xmm0,%xmm8 |
| 809 pshufd $78,%xmm3,%xmm10 |
| 810 pxor %xmm5,%xmm9 |
| 811 pxor %xmm13,%xmm15 |
| 812 pxor %xmm13,%xmm0 |
| 813 pshufd $78,%xmm1,%xmm11 |
| 814 pxor %xmm3,%xmm10 |
| 815 pxor %xmm7,%xmm5 |
| 816 pxor %xmm8,%xmm3 |
| 817 pshufd $78,%xmm6,%xmm12 |
| 818 pxor %xmm1,%xmm11 |
| 819 pxor %xmm14,%xmm0 |
| 820 pxor %xmm9,%xmm1 |
| 821 pxor %xmm6,%xmm12 |
| 822 |
| 823 pxor %xmm14,%xmm5 |
| 824 pxor %xmm13,%xmm3 |
| 825 pxor %xmm13,%xmm1 |
| 826 pxor %xmm10,%xmm6 |
| 827 pxor %xmm11,%xmm2 |
| 828 pxor %xmm14,%xmm1 |
| 829 pxor %xmm14,%xmm6 |
| 830 pxor %xmm12,%xmm4 |
| 831 pshufd $147,%xmm15,%xmm7 |
| 832 pshufd $147,%xmm0,%xmm8 |
| 833 pxor %xmm7,%xmm15 |
| 834 pshufd $147,%xmm5,%xmm9 |
| 835 pxor %xmm8,%xmm0 |
| 836 pshufd $147,%xmm3,%xmm10 |
| 837 pxor %xmm9,%xmm5 |
| 838 pshufd $147,%xmm1,%xmm11 |
| 839 pxor %xmm10,%xmm3 |
| 840 pshufd $147,%xmm6,%xmm12 |
| 841 pxor %xmm11,%xmm1 |
| 842 pshufd $147,%xmm2,%xmm13 |
| 843 pxor %xmm12,%xmm6 |
| 844 pshufd $147,%xmm4,%xmm14 |
| 845 pxor %xmm13,%xmm2 |
| 846 pxor %xmm14,%xmm4 |
| 847 |
| 848 pxor %xmm15,%xmm8 |
| 849 pxor %xmm4,%xmm7 |
| 850 pxor %xmm4,%xmm8 |
| 851 pshufd $78,%xmm15,%xmm15 |
| 852 pxor %xmm0,%xmm9 |
| 853 pshufd $78,%xmm0,%xmm0 |
| 854 pxor %xmm1,%xmm12 |
| 855 pxor %xmm7,%xmm15 |
| 856 pxor %xmm6,%xmm13 |
| 857 pxor %xmm8,%xmm0 |
| 858 pxor %xmm3,%xmm11 |
| 859 pshufd $78,%xmm1,%xmm7 |
| 860 pxor %xmm2,%xmm14 |
| 861 pshufd $78,%xmm6,%xmm8 |
| 862 pxor %xmm5,%xmm10 |
| 863 pshufd $78,%xmm3,%xmm1 |
| 864 pxor %xmm4,%xmm10 |
| 865 pshufd $78,%xmm4,%xmm6 |
| 866 pxor %xmm4,%xmm11 |
| 867 pshufd $78,%xmm2,%xmm3 |
| 868 pxor %xmm11,%xmm7 |
| 869 pshufd $78,%xmm5,%xmm2 |
| 870 pxor %xmm12,%xmm8 |
| 871 pxor %xmm1,%xmm10 |
| 872 pxor %xmm14,%xmm6 |
| 873 pxor %xmm3,%xmm13 |
| 874 movdqa %xmm7,%xmm3 |
| 875 pxor %xmm9,%xmm2 |
| 876 movdqa %xmm13,%xmm5 |
| 877 movdqa %xmm8,%xmm4 |
| 878 movdqa %xmm2,%xmm1 |
| 879 movdqa %xmm10,%xmm2 |
| 880 movdqa -16(%r11),%xmm7 |
| 881 jnz .Ldec_loop |
| 882 movdqa -32(%r11),%xmm7 |
| 883 jmp .Ldec_loop |
| 884 .align 16 |
| 885 .Ldec_done: |
| 886 movdqa 0(%r11),%xmm7 |
| 887 movdqa 16(%r11),%xmm8 |
| 888 movdqa %xmm2,%xmm9 |
| 889 psrlq $1,%xmm2 |
| 890 movdqa %xmm1,%xmm10 |
| 891 psrlq $1,%xmm1 |
| 892 pxor %xmm4,%xmm2 |
| 893 pxor %xmm6,%xmm1 |
| 894 pand %xmm7,%xmm2 |
| 895 pand %xmm7,%xmm1 |
| 896 pxor %xmm2,%xmm4 |
| 897 psllq $1,%xmm2 |
| 898 pxor %xmm1,%xmm6 |
| 899 psllq $1,%xmm1 |
| 900 pxor %xmm9,%xmm2 |
| 901 pxor %xmm10,%xmm1 |
| 902 movdqa %xmm5,%xmm9 |
| 903 psrlq $1,%xmm5 |
| 904 movdqa %xmm15,%xmm10 |
| 905 psrlq $1,%xmm15 |
| 906 pxor %xmm3,%xmm5 |
| 907 pxor %xmm0,%xmm15 |
| 908 pand %xmm7,%xmm5 |
| 909 pand %xmm7,%xmm15 |
| 910 pxor %xmm5,%xmm3 |
| 911 psllq $1,%xmm5 |
| 912 pxor %xmm15,%xmm0 |
| 913 psllq $1,%xmm15 |
| 914 pxor %xmm9,%xmm5 |
| 915 pxor %xmm10,%xmm15 |
| 916 movdqa 32(%r11),%xmm7 |
| 917 movdqa %xmm6,%xmm9 |
| 918 psrlq $2,%xmm6 |
| 919 movdqa %xmm1,%xmm10 |
| 920 psrlq $2,%xmm1 |
| 921 pxor %xmm4,%xmm6 |
| 922 pxor %xmm2,%xmm1 |
| 923 pand %xmm8,%xmm6 |
| 924 pand %xmm8,%xmm1 |
| 925 pxor %xmm6,%xmm4 |
| 926 psllq $2,%xmm6 |
| 927 pxor %xmm1,%xmm2 |
| 928 psllq $2,%xmm1 |
| 929 pxor %xmm9,%xmm6 |
| 930 pxor %xmm10,%xmm1 |
| 931 movdqa %xmm0,%xmm9 |
| 932 psrlq $2,%xmm0 |
| 933 movdqa %xmm15,%xmm10 |
| 934 psrlq $2,%xmm15 |
| 935 pxor %xmm3,%xmm0 |
| 936 pxor %xmm5,%xmm15 |
| 937 pand %xmm8,%xmm0 |
| 938 pand %xmm8,%xmm15 |
| 939 pxor %xmm0,%xmm3 |
| 940 psllq $2,%xmm0 |
| 941 pxor %xmm15,%xmm5 |
| 942 psllq $2,%xmm15 |
| 943 pxor %xmm9,%xmm0 |
| 944 pxor %xmm10,%xmm15 |
| 945 movdqa %xmm3,%xmm9 |
| 946 psrlq $4,%xmm3 |
| 947 movdqa %xmm5,%xmm10 |
| 948 psrlq $4,%xmm5 |
| 949 pxor %xmm4,%xmm3 |
| 950 pxor %xmm2,%xmm5 |
| 951 pand %xmm7,%xmm3 |
| 952 pand %xmm7,%xmm5 |
| 953 pxor %xmm3,%xmm4 |
| 954 psllq $4,%xmm3 |
| 955 pxor %xmm5,%xmm2 |
| 956 psllq $4,%xmm5 |
| 957 pxor %xmm9,%xmm3 |
| 958 pxor %xmm10,%xmm5 |
| 959 movdqa %xmm0,%xmm9 |
| 960 psrlq $4,%xmm0 |
| 961 movdqa %xmm15,%xmm10 |
| 962 psrlq $4,%xmm15 |
| 963 pxor %xmm6,%xmm0 |
| 964 pxor %xmm1,%xmm15 |
| 965 pand %xmm7,%xmm0 |
| 966 pand %xmm7,%xmm15 |
| 967 pxor %xmm0,%xmm6 |
| 968 psllq $4,%xmm0 |
| 969 pxor %xmm15,%xmm1 |
| 970 psllq $4,%xmm15 |
| 971 pxor %xmm9,%xmm0 |
| 972 pxor %xmm10,%xmm15 |
| 973 movdqa (%rax),%xmm7 |
| 974 pxor %xmm7,%xmm5 |
| 975 pxor %xmm7,%xmm3 |
| 976 pxor %xmm7,%xmm1 |
| 977 pxor %xmm7,%xmm6 |
| 978 pxor %xmm7,%xmm2 |
| 979 pxor %xmm7,%xmm4 |
| 980 pxor %xmm7,%xmm15 |
| 981 pxor %xmm7,%xmm0 |
| 982 .byte 0xf3,0xc3 |
| 983 .size _bsaes_decrypt8,.-_bsaes_decrypt8 |
| 984 .type _bsaes_key_convert,@function |
| 985 .align 16 |
| 986 _bsaes_key_convert: |
| 987 leaq .Lmasks(%rip),%r11 |
| 988 movdqu (%rcx),%xmm7 |
| 989 leaq 16(%rcx),%rcx |
| 990 movdqa 0(%r11),%xmm0 |
| 991 movdqa 16(%r11),%xmm1 |
| 992 movdqa 32(%r11),%xmm2 |
| 993 movdqa 48(%r11),%xmm3 |
| 994 movdqa 64(%r11),%xmm4 |
| 995 pcmpeqd %xmm5,%xmm5 |
| 996 |
| 997 movdqu (%rcx),%xmm6 |
| 998 movdqa %xmm7,(%rax) |
| 999 leaq 16(%rax),%rax |
| 1000 decl %r10d |
| 1001 jmp .Lkey_loop |
| 1002 .align 16 |
| 1003 .Lkey_loop: |
| 1004 .byte 102,15,56,0,244 |
| 1005 |
| 1006 movdqa %xmm0,%xmm8 |
| 1007 movdqa %xmm1,%xmm9 |
| 1008 |
| 1009 pand %xmm6,%xmm8 |
| 1010 pand %xmm6,%xmm9 |
| 1011 movdqa %xmm2,%xmm10 |
| 1012 pcmpeqb %xmm0,%xmm8 |
| 1013 psllq $4,%xmm0 |
| 1014 movdqa %xmm3,%xmm11 |
| 1015 pcmpeqb %xmm1,%xmm9 |
| 1016 psllq $4,%xmm1 |
| 1017 |
| 1018 pand %xmm6,%xmm10 |
| 1019 pand %xmm6,%xmm11 |
| 1020 movdqa %xmm0,%xmm12 |
| 1021 pcmpeqb %xmm2,%xmm10 |
| 1022 psllq $4,%xmm2 |
| 1023 movdqa %xmm1,%xmm13 |
| 1024 pcmpeqb %xmm3,%xmm11 |
| 1025 psllq $4,%xmm3 |
| 1026 |
| 1027 movdqa %xmm2,%xmm14 |
| 1028 movdqa %xmm3,%xmm15 |
| 1029 pxor %xmm5,%xmm8 |
| 1030 pxor %xmm5,%xmm9 |
| 1031 |
| 1032 pand %xmm6,%xmm12 |
| 1033 pand %xmm6,%xmm13 |
| 1034 movdqa %xmm8,0(%rax) |
| 1035 pcmpeqb %xmm0,%xmm12 |
| 1036 psrlq $4,%xmm0 |
| 1037 movdqa %xmm9,16(%rax) |
| 1038 pcmpeqb %xmm1,%xmm13 |
| 1039 psrlq $4,%xmm1 |
| 1040 leaq 16(%rcx),%rcx |
| 1041 |
| 1042 pand %xmm6,%xmm14 |
| 1043 pand %xmm6,%xmm15 |
| 1044 movdqa %xmm10,32(%rax) |
| 1045 pcmpeqb %xmm2,%xmm14 |
| 1046 psrlq $4,%xmm2 |
| 1047 movdqa %xmm11,48(%rax) |
| 1048 pcmpeqb %xmm3,%xmm15 |
| 1049 psrlq $4,%xmm3 |
| 1050 movdqu (%rcx),%xmm6 |
| 1051 |
| 1052 pxor %xmm5,%xmm13 |
| 1053 pxor %xmm5,%xmm14 |
| 1054 movdqa %xmm12,64(%rax) |
| 1055 movdqa %xmm13,80(%rax) |
| 1056 movdqa %xmm14,96(%rax) |
| 1057 movdqa %xmm15,112(%rax) |
| 1058 leaq 128(%rax),%rax |
| 1059 decl %r10d |
| 1060 jnz .Lkey_loop |
| 1061 |
| 1062 movdqa 80(%r11),%xmm7 |
| 1063 |
| 1064 .byte 0xf3,0xc3 |
| 1065 .size _bsaes_key_convert,.-_bsaes_key_convert |
| 1066 |
| 1067 .globl bsaes_cbc_encrypt |
| 1068 .type bsaes_cbc_encrypt,@function |
| 1069 .align 16 |
| 1070 bsaes_cbc_encrypt: |
| 1071 cmpl $0,%r9d |
| 1072 jne asm_AES_cbc_encrypt |
| 1073 cmpq $128,%rdx |
| 1074 jb asm_AES_cbc_encrypt |
| 1075 |
| 1076 movq %rsp,%rax |
| 1077 .Lcbc_dec_prologue: |
| 1078 pushq %rbp |
| 1079 pushq %rbx |
| 1080 pushq %r12 |
| 1081 pushq %r13 |
| 1082 pushq %r14 |
| 1083 pushq %r15 |
| 1084 leaq -72(%rsp),%rsp |
| 1085 movq %rsp,%rbp |
| 1086 movl 240(%rcx),%eax |
| 1087 movq %rdi,%r12 |
| 1088 movq %rsi,%r13 |
| 1089 movq %rdx,%r14 |
| 1090 movq %rcx,%r15 |
| 1091 movq %r8,%rbx |
| 1092 shrq $4,%r14 |
| 1093 |
| 1094 movl %eax,%edx |
| 1095 shlq $7,%rax |
| 1096 subq $96,%rax |
| 1097 subq %rax,%rsp |
| 1098 |
| 1099 movq %rsp,%rax |
| 1100 movq %r15,%rcx |
| 1101 movl %edx,%r10d |
| 1102 call _bsaes_key_convert |
| 1103 pxor (%rsp),%xmm7 |
| 1104 movdqa %xmm6,(%rax) |
| 1105 movdqa %xmm7,(%rsp) |
| 1106 |
| 1107 movdqu (%rbx),%xmm14 |
| 1108 subq $8,%r14 |
| 1109 .Lcbc_dec_loop: |
| 1110 movdqu 0(%r12),%xmm15 |
| 1111 movdqu 16(%r12),%xmm0 |
| 1112 movdqu 32(%r12),%xmm1 |
| 1113 movdqu 48(%r12),%xmm2 |
| 1114 movdqu 64(%r12),%xmm3 |
| 1115 movdqu 80(%r12),%xmm4 |
| 1116 movq %rsp,%rax |
| 1117 movdqu 96(%r12),%xmm5 |
| 1118 movl %edx,%r10d |
| 1119 movdqu 112(%r12),%xmm6 |
| 1120 movdqa %xmm14,32(%rbp) |
| 1121 |
| 1122 call _bsaes_decrypt8 |
| 1123 |
| 1124 pxor 32(%rbp),%xmm15 |
| 1125 movdqu 0(%r12),%xmm7 |
| 1126 movdqu 16(%r12),%xmm8 |
| 1127 pxor %xmm7,%xmm0 |
| 1128 movdqu 32(%r12),%xmm9 |
| 1129 pxor %xmm8,%xmm5 |
| 1130 movdqu 48(%r12),%xmm10 |
| 1131 pxor %xmm9,%xmm3 |
| 1132 movdqu 64(%r12),%xmm11 |
| 1133 pxor %xmm10,%xmm1 |
| 1134 movdqu 80(%r12),%xmm12 |
| 1135 pxor %xmm11,%xmm6 |
| 1136 movdqu 96(%r12),%xmm13 |
| 1137 pxor %xmm12,%xmm2 |
| 1138 movdqu 112(%r12),%xmm14 |
| 1139 pxor %xmm13,%xmm4 |
| 1140 movdqu %xmm15,0(%r13) |
| 1141 leaq 128(%r12),%r12 |
| 1142 movdqu %xmm0,16(%r13) |
| 1143 movdqu %xmm5,32(%r13) |
| 1144 movdqu %xmm3,48(%r13) |
| 1145 movdqu %xmm1,64(%r13) |
| 1146 movdqu %xmm6,80(%r13) |
| 1147 movdqu %xmm2,96(%r13) |
| 1148 movdqu %xmm4,112(%r13) |
| 1149 leaq 128(%r13),%r13 |
| 1150 subq $8,%r14 |
| 1151 jnc .Lcbc_dec_loop |
| 1152 |
| 1153 addq $8,%r14 |
| 1154 jz .Lcbc_dec_done |
| 1155 |
| 1156 movdqu 0(%r12),%xmm15 |
| 1157 movq %rsp,%rax |
| 1158 movl %edx,%r10d |
| 1159 cmpq $2,%r14 |
| 1160 jb .Lcbc_dec_one |
| 1161 movdqu 16(%r12),%xmm0 |
| 1162 je .Lcbc_dec_two |
| 1163 movdqu 32(%r12),%xmm1 |
| 1164 cmpq $4,%r14 |
| 1165 jb .Lcbc_dec_three |
| 1166 movdqu 48(%r12),%xmm2 |
| 1167 je .Lcbc_dec_four |
| 1168 movdqu 64(%r12),%xmm3 |
| 1169 cmpq $6,%r14 |
| 1170 jb .Lcbc_dec_five |
| 1171 movdqu 80(%r12),%xmm4 |
| 1172 je .Lcbc_dec_six |
| 1173 movdqu 96(%r12),%xmm5 |
| 1174 movdqa %xmm14,32(%rbp) |
| 1175 call _bsaes_decrypt8 |
| 1176 pxor 32(%rbp),%xmm15 |
| 1177 movdqu 0(%r12),%xmm7 |
| 1178 movdqu 16(%r12),%xmm8 |
| 1179 pxor %xmm7,%xmm0 |
| 1180 movdqu 32(%r12),%xmm9 |
| 1181 pxor %xmm8,%xmm5 |
| 1182 movdqu 48(%r12),%xmm10 |
| 1183 pxor %xmm9,%xmm3 |
| 1184 movdqu 64(%r12),%xmm11 |
| 1185 pxor %xmm10,%xmm1 |
| 1186 movdqu 80(%r12),%xmm12 |
| 1187 pxor %xmm11,%xmm6 |
| 1188 movdqu 96(%r12),%xmm14 |
| 1189 pxor %xmm12,%xmm2 |
| 1190 movdqu %xmm15,0(%r13) |
| 1191 movdqu %xmm0,16(%r13) |
| 1192 movdqu %xmm5,32(%r13) |
| 1193 movdqu %xmm3,48(%r13) |
| 1194 movdqu %xmm1,64(%r13) |
| 1195 movdqu %xmm6,80(%r13) |
| 1196 movdqu %xmm2,96(%r13) |
| 1197 jmp .Lcbc_dec_done |
| 1198 .align 16 |
| 1199 .Lcbc_dec_six: |
| 1200 movdqa %xmm14,32(%rbp) |
| 1201 call _bsaes_decrypt8 |
| 1202 pxor 32(%rbp),%xmm15 |
| 1203 movdqu 0(%r12),%xmm7 |
| 1204 movdqu 16(%r12),%xmm8 |
| 1205 pxor %xmm7,%xmm0 |
| 1206 movdqu 32(%r12),%xmm9 |
| 1207 pxor %xmm8,%xmm5 |
| 1208 movdqu 48(%r12),%xmm10 |
| 1209 pxor %xmm9,%xmm3 |
| 1210 movdqu 64(%r12),%xmm11 |
| 1211 pxor %xmm10,%xmm1 |
| 1212 movdqu 80(%r12),%xmm14 |
| 1213 pxor %xmm11,%xmm6 |
| 1214 movdqu %xmm15,0(%r13) |
| 1215 movdqu %xmm0,16(%r13) |
| 1216 movdqu %xmm5,32(%r13) |
| 1217 movdqu %xmm3,48(%r13) |
| 1218 movdqu %xmm1,64(%r13) |
| 1219 movdqu %xmm6,80(%r13) |
| 1220 jmp .Lcbc_dec_done |
| 1221 .align 16 |
| 1222 .Lcbc_dec_five: |
| 1223 movdqa %xmm14,32(%rbp) |
| 1224 call _bsaes_decrypt8 |
| 1225 pxor 32(%rbp),%xmm15 |
| 1226 movdqu 0(%r12),%xmm7 |
| 1227 movdqu 16(%r12),%xmm8 |
| 1228 pxor %xmm7,%xmm0 |
| 1229 movdqu 32(%r12),%xmm9 |
| 1230 pxor %xmm8,%xmm5 |
| 1231 movdqu 48(%r12),%xmm10 |
| 1232 pxor %xmm9,%xmm3 |
| 1233 movdqu 64(%r12),%xmm14 |
| 1234 pxor %xmm10,%xmm1 |
| 1235 movdqu %xmm15,0(%r13) |
| 1236 movdqu %xmm0,16(%r13) |
| 1237 movdqu %xmm5,32(%r13) |
| 1238 movdqu %xmm3,48(%r13) |
| 1239 movdqu %xmm1,64(%r13) |
| 1240 jmp .Lcbc_dec_done |
| 1241 .align 16 |
| 1242 .Lcbc_dec_four: |
| 1243 movdqa %xmm14,32(%rbp) |
| 1244 call _bsaes_decrypt8 |
| 1245 pxor 32(%rbp),%xmm15 |
| 1246 movdqu 0(%r12),%xmm7 |
| 1247 movdqu 16(%r12),%xmm8 |
| 1248 pxor %xmm7,%xmm0 |
| 1249 movdqu 32(%r12),%xmm9 |
| 1250 pxor %xmm8,%xmm5 |
| 1251 movdqu 48(%r12),%xmm14 |
| 1252 pxor %xmm9,%xmm3 |
| 1253 movdqu %xmm15,0(%r13) |
| 1254 movdqu %xmm0,16(%r13) |
| 1255 movdqu %xmm5,32(%r13) |
| 1256 movdqu %xmm3,48(%r13) |
| 1257 jmp .Lcbc_dec_done |
| 1258 .align 16 |
| 1259 .Lcbc_dec_three: |
| 1260 movdqa %xmm14,32(%rbp) |
| 1261 call _bsaes_decrypt8 |
| 1262 pxor 32(%rbp),%xmm15 |
| 1263 movdqu 0(%r12),%xmm7 |
| 1264 movdqu 16(%r12),%xmm8 |
| 1265 pxor %xmm7,%xmm0 |
| 1266 movdqu 32(%r12),%xmm14 |
| 1267 pxor %xmm8,%xmm5 |
| 1268 movdqu %xmm15,0(%r13) |
| 1269 movdqu %xmm0,16(%r13) |
| 1270 movdqu %xmm5,32(%r13) |
| 1271 jmp .Lcbc_dec_done |
| 1272 .align 16 |
| 1273 .Lcbc_dec_two: |
| 1274 movdqa %xmm14,32(%rbp) |
| 1275 call _bsaes_decrypt8 |
| 1276 pxor 32(%rbp),%xmm15 |
| 1277 movdqu 0(%r12),%xmm7 |
| 1278 movdqu 16(%r12),%xmm14 |
| 1279 pxor %xmm7,%xmm0 |
| 1280 movdqu %xmm15,0(%r13) |
| 1281 movdqu %xmm0,16(%r13) |
| 1282 jmp .Lcbc_dec_done |
| 1283 .align 16 |
| 1284 .Lcbc_dec_one: |
| 1285 leaq (%r12),%rdi |
| 1286 leaq 32(%rbp),%rsi |
| 1287 leaq (%r15),%rdx |
| 1288 call asm_AES_decrypt |
| 1289 pxor 32(%rbp),%xmm14 |
| 1290 movdqu %xmm14,(%r13) |
| 1291 movdqa %xmm15,%xmm14 |
| 1292 |
| 1293 .Lcbc_dec_done: |
| 1294 movdqu %xmm14,(%rbx) |
| 1295 leaq (%rsp),%rax |
| 1296 pxor %xmm0,%xmm0 |
| 1297 .Lcbc_dec_bzero: |
| 1298 movdqa %xmm0,0(%rax) |
| 1299 movdqa %xmm0,16(%rax) |
| 1300 leaq 32(%rax),%rax |
| 1301 cmpq %rax,%rbp |
| 1302 ja .Lcbc_dec_bzero |
| 1303 |
| 1304 leaq (%rbp),%rsp |
| 1305 movq 72(%rsp),%r15 |
| 1306 movq 80(%rsp),%r14 |
| 1307 movq 88(%rsp),%r13 |
| 1308 movq 96(%rsp),%r12 |
| 1309 movq 104(%rsp),%rbx |
| 1310 movq 112(%rsp),%rax |
| 1311 leaq 120(%rsp),%rsp |
| 1312 movq %rax,%rbp |
| 1313 .Lcbc_dec_epilogue: |
| 1314 .byte 0xf3,0xc3 |
| 1315 .size bsaes_cbc_encrypt,.-bsaes_cbc_encrypt |
| 1316 |
| 1317 .globl bsaes_ctr32_encrypt_blocks |
| 1318 .type bsaes_ctr32_encrypt_blocks,@function |
| 1319 .align 16 |
| 1320 bsaes_ctr32_encrypt_blocks: |
| 1321 movq %rsp,%rax |
| 1322 .Lctr_enc_prologue: |
| 1323 pushq %rbp |
| 1324 pushq %rbx |
| 1325 pushq %r12 |
| 1326 pushq %r13 |
| 1327 pushq %r14 |
| 1328 pushq %r15 |
| 1329 leaq -72(%rsp),%rsp |
| 1330 movq %rsp,%rbp |
| 1331 movdqu (%r8),%xmm0 |
| 1332 movl 240(%rcx),%eax |
| 1333 movq %rdi,%r12 |
| 1334 movq %rsi,%r13 |
| 1335 movq %rdx,%r14 |
| 1336 movq %rcx,%r15 |
| 1337 movdqa %xmm0,32(%rbp) |
| 1338 cmpq $8,%rdx |
| 1339 jb .Lctr_enc_short |
| 1340 |
| 1341 movl %eax,%ebx |
| 1342 shlq $7,%rax |
| 1343 subq $96,%rax |
| 1344 subq %rax,%rsp |
| 1345 |
| 1346 movq %rsp,%rax |
| 1347 movq %r15,%rcx |
| 1348 movl %ebx,%r10d |
| 1349 call _bsaes_key_convert |
| 1350 pxor %xmm6,%xmm7 |
| 1351 movdqa %xmm7,(%rax) |
| 1352 |
| 1353 movdqa (%rsp),%xmm8 |
| 1354 leaq .LADD1(%rip),%r11 |
| 1355 movdqa 32(%rbp),%xmm15 |
| 1356 movdqa -32(%r11),%xmm7 |
| 1357 .byte 102,68,15,56,0,199 |
| 1358 .byte 102,68,15,56,0,255 |
| 1359 movdqa %xmm8,(%rsp) |
| 1360 jmp .Lctr_enc_loop |
| 1361 .align 16 |
| 1362 .Lctr_enc_loop: |
| 1363 movdqa %xmm15,32(%rbp) |
| 1364 movdqa %xmm15,%xmm0 |
| 1365 movdqa %xmm15,%xmm1 |
| 1366 paddd 0(%r11),%xmm0 |
| 1367 movdqa %xmm15,%xmm2 |
| 1368 paddd 16(%r11),%xmm1 |
| 1369 movdqa %xmm15,%xmm3 |
| 1370 paddd 32(%r11),%xmm2 |
| 1371 movdqa %xmm15,%xmm4 |
| 1372 paddd 48(%r11),%xmm3 |
| 1373 movdqa %xmm15,%xmm5 |
| 1374 paddd 64(%r11),%xmm4 |
| 1375 movdqa %xmm15,%xmm6 |
| 1376 paddd 80(%r11),%xmm5 |
| 1377 paddd 96(%r11),%xmm6 |
| 1378 |
| 1379 |
| 1380 |
| 1381 movdqa (%rsp),%xmm8 |
| 1382 leaq 16(%rsp),%rax |
| 1383 movdqa -16(%r11),%xmm7 |
| 1384 pxor %xmm8,%xmm15 |
| 1385 pxor %xmm8,%xmm0 |
| 1386 pxor %xmm8,%xmm1 |
| 1387 pxor %xmm8,%xmm2 |
| 1388 .byte 102,68,15,56,0,255 |
| 1389 .byte 102,15,56,0,199 |
| 1390 pxor %xmm8,%xmm3 |
| 1391 pxor %xmm8,%xmm4 |
| 1392 .byte 102,15,56,0,207 |
| 1393 .byte 102,15,56,0,215 |
| 1394 pxor %xmm8,%xmm5 |
| 1395 pxor %xmm8,%xmm6 |
| 1396 .byte 102,15,56,0,223 |
| 1397 .byte 102,15,56,0,231 |
| 1398 .byte 102,15,56,0,239 |
| 1399 .byte 102,15,56,0,247 |
| 1400 leaq .LBS0(%rip),%r11 |
| 1401 movl %ebx,%r10d |
| 1402 |
| 1403 call _bsaes_encrypt8_bitslice |
| 1404 |
| 1405 subq $8,%r14 |
| 1406 jc .Lctr_enc_loop_done |
| 1407 |
| 1408 movdqu 0(%r12),%xmm7 |
| 1409 movdqu 16(%r12),%xmm8 |
| 1410 movdqu 32(%r12),%xmm9 |
| 1411 movdqu 48(%r12),%xmm10 |
| 1412 movdqu 64(%r12),%xmm11 |
| 1413 movdqu 80(%r12),%xmm12 |
| 1414 movdqu 96(%r12),%xmm13 |
| 1415 movdqu 112(%r12),%xmm14 |
| 1416 leaq 128(%r12),%r12 |
| 1417 pxor %xmm15,%xmm7 |
| 1418 movdqa 32(%rbp),%xmm15 |
| 1419 pxor %xmm8,%xmm0 |
| 1420 movdqu %xmm7,0(%r13) |
| 1421 pxor %xmm9,%xmm3 |
| 1422 movdqu %xmm0,16(%r13) |
| 1423 pxor %xmm10,%xmm5 |
| 1424 movdqu %xmm3,32(%r13) |
| 1425 pxor %xmm11,%xmm2 |
| 1426 movdqu %xmm5,48(%r13) |
| 1427 pxor %xmm12,%xmm6 |
| 1428 movdqu %xmm2,64(%r13) |
| 1429 pxor %xmm13,%xmm1 |
| 1430 movdqu %xmm6,80(%r13) |
| 1431 pxor %xmm14,%xmm4 |
| 1432 movdqu %xmm1,96(%r13) |
| 1433 leaq .LADD1(%rip),%r11 |
| 1434 movdqu %xmm4,112(%r13) |
| 1435 leaq 128(%r13),%r13 |
| 1436 paddd 112(%r11),%xmm15 |
| 1437 jnz .Lctr_enc_loop |
| 1438 |
| 1439 jmp .Lctr_enc_done |
| 1440 .align 16 |
| 1441 .Lctr_enc_loop_done: |
| 1442 addq $8,%r14 |
| 1443 movdqu 0(%r12),%xmm7 |
| 1444 pxor %xmm7,%xmm15 |
| 1445 movdqu %xmm15,0(%r13) |
| 1446 cmpq $2,%r14 |
| 1447 jb .Lctr_enc_done |
| 1448 movdqu 16(%r12),%xmm8 |
| 1449 pxor %xmm8,%xmm0 |
| 1450 movdqu %xmm0,16(%r13) |
| 1451 je .Lctr_enc_done |
| 1452 movdqu 32(%r12),%xmm9 |
| 1453 pxor %xmm9,%xmm3 |
| 1454 movdqu %xmm3,32(%r13) |
| 1455 cmpq $4,%r14 |
| 1456 jb .Lctr_enc_done |
| 1457 movdqu 48(%r12),%xmm10 |
| 1458 pxor %xmm10,%xmm5 |
| 1459 movdqu %xmm5,48(%r13) |
| 1460 je .Lctr_enc_done |
| 1461 movdqu 64(%r12),%xmm11 |
| 1462 pxor %xmm11,%xmm2 |
| 1463 movdqu %xmm2,64(%r13) |
| 1464 cmpq $6,%r14 |
| 1465 jb .Lctr_enc_done |
| 1466 movdqu 80(%r12),%xmm12 |
| 1467 pxor %xmm12,%xmm6 |
| 1468 movdqu %xmm6,80(%r13) |
| 1469 je .Lctr_enc_done |
| 1470 movdqu 96(%r12),%xmm13 |
| 1471 pxor %xmm13,%xmm1 |
| 1472 movdqu %xmm1,96(%r13) |
| 1473 jmp .Lctr_enc_done |
| 1474 |
| 1475 .align 16 |
| 1476 .Lctr_enc_short: |
| 1477 leaq 32(%rbp),%rdi |
| 1478 leaq 48(%rbp),%rsi |
| 1479 leaq (%r15),%rdx |
| 1480 call asm_AES_encrypt |
| 1481 movdqu (%r12),%xmm0 |
| 1482 leaq 16(%r12),%r12 |
| 1483 movl 44(%rbp),%eax |
| 1484 bswapl %eax |
| 1485 pxor 48(%rbp),%xmm0 |
| 1486 incl %eax |
| 1487 movdqu %xmm0,(%r13) |
| 1488 bswapl %eax |
| 1489 leaq 16(%r13),%r13 |
| 1490 movl %eax,44(%rsp) |
| 1491 decq %r14 |
| 1492 jnz .Lctr_enc_short |
| 1493 |
| 1494 .Lctr_enc_done: |
| 1495 leaq (%rsp),%rax |
| 1496 pxor %xmm0,%xmm0 |
| 1497 .Lctr_enc_bzero: |
| 1498 movdqa %xmm0,0(%rax) |
| 1499 movdqa %xmm0,16(%rax) |
| 1500 leaq 32(%rax),%rax |
| 1501 cmpq %rax,%rbp |
| 1502 ja .Lctr_enc_bzero |
| 1503 |
| 1504 leaq (%rbp),%rsp |
| 1505 movq 72(%rsp),%r15 |
| 1506 movq 80(%rsp),%r14 |
| 1507 movq 88(%rsp),%r13 |
| 1508 movq 96(%rsp),%r12 |
| 1509 movq 104(%rsp),%rbx |
| 1510 movq 112(%rsp),%rax |
| 1511 leaq 120(%rsp),%rsp |
| 1512 movq %rax,%rbp |
| 1513 .Lctr_enc_epilogue: |
| 1514 .byte 0xf3,0xc3 |
| 1515 .size bsaes_ctr32_encrypt_blocks,.-bsaes_ctr32_encrypt_blocks |
| 1516 .globl bsaes_xts_encrypt |
| 1517 .type bsaes_xts_encrypt,@function |
| 1518 .align 16 |
| 1519 bsaes_xts_encrypt: |
| 1520 movq %rsp,%rax |
| 1521 .Lxts_enc_prologue: |
| 1522 pushq %rbp |
| 1523 pushq %rbx |
| 1524 pushq %r12 |
| 1525 pushq %r13 |
| 1526 pushq %r14 |
| 1527 pushq %r15 |
| 1528 leaq -72(%rsp),%rsp |
| 1529 movq %rsp,%rbp |
| 1530 movq %rdi,%r12 |
| 1531 movq %rsi,%r13 |
| 1532 movq %rdx,%r14 |
| 1533 movq %rcx,%r15 |
| 1534 |
| 1535 leaq (%r9),%rdi |
| 1536 leaq 32(%rbp),%rsi |
| 1537 leaq (%r8),%rdx |
| 1538 call asm_AES_encrypt |
| 1539 |
| 1540 movl 240(%r15),%eax |
| 1541 movq %r14,%rbx |
| 1542 |
| 1543 movl %eax,%edx |
| 1544 shlq $7,%rax |
| 1545 subq $96,%rax |
| 1546 subq %rax,%rsp |
| 1547 |
| 1548 movq %rsp,%rax |
| 1549 movq %r15,%rcx |
| 1550 movl %edx,%r10d |
| 1551 call _bsaes_key_convert |
| 1552 pxor %xmm6,%xmm7 |
| 1553 movdqa %xmm7,(%rax) |
| 1554 |
| 1555 andq $-16,%r14 |
| 1556 subq $128,%rsp |
| 1557 movdqa 32(%rbp),%xmm6 |
| 1558 |
| 1559 pxor %xmm14,%xmm14 |
| 1560 movdqa .Lxts_magic(%rip),%xmm12 |
| 1561 pcmpgtd %xmm6,%xmm14 |
| 1562 |
| 1563 subq $128,%r14 |
| 1564 jc .Lxts_enc_short |
| 1565 jmp .Lxts_enc_loop |
| 1566 |
| 1567 .align 16 |
| 1568 .Lxts_enc_loop: |
| 1569 pshufd $19,%xmm14,%xmm13 |
| 1570 pxor %xmm14,%xmm14 |
| 1571 movdqa %xmm6,%xmm15 |
| 1572 movdqa %xmm6,0(%rsp) |
| 1573 paddq %xmm6,%xmm6 |
| 1574 pand %xmm12,%xmm13 |
| 1575 pcmpgtd %xmm6,%xmm14 |
| 1576 pxor %xmm13,%xmm6 |
| 1577 pshufd $19,%xmm14,%xmm13 |
| 1578 pxor %xmm14,%xmm14 |
| 1579 movdqa %xmm6,%xmm0 |
| 1580 movdqa %xmm6,16(%rsp) |
| 1581 paddq %xmm6,%xmm6 |
| 1582 pand %xmm12,%xmm13 |
| 1583 pcmpgtd %xmm6,%xmm14 |
| 1584 pxor %xmm13,%xmm6 |
| 1585 movdqu 0(%r12),%xmm7 |
| 1586 pshufd $19,%xmm14,%xmm13 |
| 1587 pxor %xmm14,%xmm14 |
| 1588 movdqa %xmm6,%xmm1 |
| 1589 movdqa %xmm6,32(%rsp) |
| 1590 paddq %xmm6,%xmm6 |
| 1591 pand %xmm12,%xmm13 |
| 1592 pcmpgtd %xmm6,%xmm14 |
| 1593 pxor %xmm13,%xmm6 |
| 1594 movdqu 16(%r12),%xmm8 |
| 1595 pxor %xmm7,%xmm15 |
| 1596 pshufd $19,%xmm14,%xmm13 |
| 1597 pxor %xmm14,%xmm14 |
| 1598 movdqa %xmm6,%xmm2 |
| 1599 movdqa %xmm6,48(%rsp) |
| 1600 paddq %xmm6,%xmm6 |
| 1601 pand %xmm12,%xmm13 |
| 1602 pcmpgtd %xmm6,%xmm14 |
| 1603 pxor %xmm13,%xmm6 |
| 1604 movdqu 32(%r12),%xmm9 |
| 1605 pxor %xmm8,%xmm0 |
| 1606 pshufd $19,%xmm14,%xmm13 |
| 1607 pxor %xmm14,%xmm14 |
| 1608 movdqa %xmm6,%xmm3 |
| 1609 movdqa %xmm6,64(%rsp) |
| 1610 paddq %xmm6,%xmm6 |
| 1611 pand %xmm12,%xmm13 |
| 1612 pcmpgtd %xmm6,%xmm14 |
| 1613 pxor %xmm13,%xmm6 |
| 1614 movdqu 48(%r12),%xmm10 |
| 1615 pxor %xmm9,%xmm1 |
| 1616 pshufd $19,%xmm14,%xmm13 |
| 1617 pxor %xmm14,%xmm14 |
| 1618 movdqa %xmm6,%xmm4 |
| 1619 movdqa %xmm6,80(%rsp) |
| 1620 paddq %xmm6,%xmm6 |
| 1621 pand %xmm12,%xmm13 |
| 1622 pcmpgtd %xmm6,%xmm14 |
| 1623 pxor %xmm13,%xmm6 |
| 1624 movdqu 64(%r12),%xmm11 |
| 1625 pxor %xmm10,%xmm2 |
| 1626 pshufd $19,%xmm14,%xmm13 |
| 1627 pxor %xmm14,%xmm14 |
| 1628 movdqa %xmm6,%xmm5 |
| 1629 movdqa %xmm6,96(%rsp) |
| 1630 paddq %xmm6,%xmm6 |
| 1631 pand %xmm12,%xmm13 |
| 1632 pcmpgtd %xmm6,%xmm14 |
| 1633 pxor %xmm13,%xmm6 |
| 1634 movdqu 80(%r12),%xmm12 |
| 1635 pxor %xmm11,%xmm3 |
| 1636 movdqu 96(%r12),%xmm13 |
| 1637 pxor %xmm12,%xmm4 |
| 1638 movdqu 112(%r12),%xmm14 |
| 1639 leaq 128(%r12),%r12 |
| 1640 movdqa %xmm6,112(%rsp) |
| 1641 pxor %xmm13,%xmm5 |
| 1642 leaq 128(%rsp),%rax |
| 1643 pxor %xmm14,%xmm6 |
| 1644 movl %edx,%r10d |
| 1645 |
| 1646 call _bsaes_encrypt8 |
| 1647 |
| 1648 pxor 0(%rsp),%xmm15 |
| 1649 pxor 16(%rsp),%xmm0 |
| 1650 movdqu %xmm15,0(%r13) |
| 1651 pxor 32(%rsp),%xmm3 |
| 1652 movdqu %xmm0,16(%r13) |
| 1653 pxor 48(%rsp),%xmm5 |
| 1654 movdqu %xmm3,32(%r13) |
| 1655 pxor 64(%rsp),%xmm2 |
| 1656 movdqu %xmm5,48(%r13) |
| 1657 pxor 80(%rsp),%xmm6 |
| 1658 movdqu %xmm2,64(%r13) |
| 1659 pxor 96(%rsp),%xmm1 |
| 1660 movdqu %xmm6,80(%r13) |
| 1661 pxor 112(%rsp),%xmm4 |
| 1662 movdqu %xmm1,96(%r13) |
| 1663 movdqu %xmm4,112(%r13) |
| 1664 leaq 128(%r13),%r13 |
| 1665 |
| 1666 movdqa 112(%rsp),%xmm6 |
| 1667 pxor %xmm14,%xmm14 |
| 1668 movdqa .Lxts_magic(%rip),%xmm12 |
| 1669 pcmpgtd %xmm6,%xmm14 |
| 1670 pshufd $19,%xmm14,%xmm13 |
| 1671 pxor %xmm14,%xmm14 |
| 1672 paddq %xmm6,%xmm6 |
| 1673 pand %xmm12,%xmm13 |
| 1674 pcmpgtd %xmm6,%xmm14 |
| 1675 pxor %xmm13,%xmm6 |
| 1676 |
| 1677 subq $128,%r14 |
| 1678 jnc .Lxts_enc_loop |
| 1679 |
| 1680 .Lxts_enc_short: |
| 1681 addq $128,%r14 |
| 1682 jz .Lxts_enc_done |
| 1683 pshufd $19,%xmm14,%xmm13 |
| 1684 pxor %xmm14,%xmm14 |
| 1685 movdqa %xmm6,%xmm15 |
| 1686 movdqa %xmm6,0(%rsp) |
| 1687 paddq %xmm6,%xmm6 |
| 1688 pand %xmm12,%xmm13 |
| 1689 pcmpgtd %xmm6,%xmm14 |
| 1690 pxor %xmm13,%xmm6 |
| 1691 pshufd $19,%xmm14,%xmm13 |
| 1692 pxor %xmm14,%xmm14 |
| 1693 movdqa %xmm6,%xmm0 |
| 1694 movdqa %xmm6,16(%rsp) |
| 1695 paddq %xmm6,%xmm6 |
| 1696 pand %xmm12,%xmm13 |
| 1697 pcmpgtd %xmm6,%xmm14 |
| 1698 pxor %xmm13,%xmm6 |
| 1699 movdqu 0(%r12),%xmm7 |
| 1700 cmpq $16,%r14 |
| 1701 je .Lxts_enc_1 |
| 1702 pshufd $19,%xmm14,%xmm13 |
| 1703 pxor %xmm14,%xmm14 |
| 1704 movdqa %xmm6,%xmm1 |
| 1705 movdqa %xmm6,32(%rsp) |
| 1706 paddq %xmm6,%xmm6 |
| 1707 pand %xmm12,%xmm13 |
| 1708 pcmpgtd %xmm6,%xmm14 |
| 1709 pxor %xmm13,%xmm6 |
| 1710 movdqu 16(%r12),%xmm8 |
| 1711 cmpq $32,%r14 |
| 1712 je .Lxts_enc_2 |
| 1713 pxor %xmm7,%xmm15 |
| 1714 pshufd $19,%xmm14,%xmm13 |
| 1715 pxor %xmm14,%xmm14 |
| 1716 movdqa %xmm6,%xmm2 |
| 1717 movdqa %xmm6,48(%rsp) |
| 1718 paddq %xmm6,%xmm6 |
| 1719 pand %xmm12,%xmm13 |
| 1720 pcmpgtd %xmm6,%xmm14 |
| 1721 pxor %xmm13,%xmm6 |
| 1722 movdqu 32(%r12),%xmm9 |
| 1723 cmpq $48,%r14 |
| 1724 je .Lxts_enc_3 |
| 1725 pxor %xmm8,%xmm0 |
| 1726 pshufd $19,%xmm14,%xmm13 |
| 1727 pxor %xmm14,%xmm14 |
| 1728 movdqa %xmm6,%xmm3 |
| 1729 movdqa %xmm6,64(%rsp) |
| 1730 paddq %xmm6,%xmm6 |
| 1731 pand %xmm12,%xmm13 |
| 1732 pcmpgtd %xmm6,%xmm14 |
| 1733 pxor %xmm13,%xmm6 |
| 1734 movdqu 48(%r12),%xmm10 |
| 1735 cmpq $64,%r14 |
| 1736 je .Lxts_enc_4 |
| 1737 pxor %xmm9,%xmm1 |
| 1738 pshufd $19,%xmm14,%xmm13 |
| 1739 pxor %xmm14,%xmm14 |
| 1740 movdqa %xmm6,%xmm4 |
| 1741 movdqa %xmm6,80(%rsp) |
| 1742 paddq %xmm6,%xmm6 |
| 1743 pand %xmm12,%xmm13 |
| 1744 pcmpgtd %xmm6,%xmm14 |
| 1745 pxor %xmm13,%xmm6 |
| 1746 movdqu 64(%r12),%xmm11 |
| 1747 cmpq $80,%r14 |
| 1748 je .Lxts_enc_5 |
| 1749 pxor %xmm10,%xmm2 |
| 1750 pshufd $19,%xmm14,%xmm13 |
| 1751 pxor %xmm14,%xmm14 |
| 1752 movdqa %xmm6,%xmm5 |
| 1753 movdqa %xmm6,96(%rsp) |
| 1754 paddq %xmm6,%xmm6 |
| 1755 pand %xmm12,%xmm13 |
| 1756 pcmpgtd %xmm6,%xmm14 |
| 1757 pxor %xmm13,%xmm6 |
| 1758 movdqu 80(%r12),%xmm12 |
| 1759 cmpq $96,%r14 |
| 1760 je .Lxts_enc_6 |
| 1761 pxor %xmm11,%xmm3 |
| 1762 movdqu 96(%r12),%xmm13 |
| 1763 pxor %xmm12,%xmm4 |
| 1764 movdqa %xmm6,112(%rsp) |
| 1765 leaq 112(%r12),%r12 |
| 1766 pxor %xmm13,%xmm5 |
| 1767 leaq 128(%rsp),%rax |
| 1768 movl %edx,%r10d |
| 1769 |
| 1770 call _bsaes_encrypt8 |
| 1771 |
| 1772 pxor 0(%rsp),%xmm15 |
| 1773 pxor 16(%rsp),%xmm0 |
| 1774 movdqu %xmm15,0(%r13) |
| 1775 pxor 32(%rsp),%xmm3 |
| 1776 movdqu %xmm0,16(%r13) |
| 1777 pxor 48(%rsp),%xmm5 |
| 1778 movdqu %xmm3,32(%r13) |
| 1779 pxor 64(%rsp),%xmm2 |
| 1780 movdqu %xmm5,48(%r13) |
| 1781 pxor 80(%rsp),%xmm6 |
| 1782 movdqu %xmm2,64(%r13) |
| 1783 pxor 96(%rsp),%xmm1 |
| 1784 movdqu %xmm6,80(%r13) |
| 1785 movdqu %xmm1,96(%r13) |
| 1786 leaq 112(%r13),%r13 |
| 1787 |
| 1788 movdqa 112(%rsp),%xmm6 |
| 1789 jmp .Lxts_enc_done |
| 1790 .align 16 |
| 1791 .Lxts_enc_6: |
| 1792 pxor %xmm11,%xmm3 |
| 1793 leaq 96(%r12),%r12 |
| 1794 pxor %xmm12,%xmm4 |
| 1795 leaq 128(%rsp),%rax |
| 1796 movl %edx,%r10d |
| 1797 |
| 1798 call _bsaes_encrypt8 |
| 1799 |
| 1800 pxor 0(%rsp),%xmm15 |
| 1801 pxor 16(%rsp),%xmm0 |
| 1802 movdqu %xmm15,0(%r13) |
| 1803 pxor 32(%rsp),%xmm3 |
| 1804 movdqu %xmm0,16(%r13) |
| 1805 pxor 48(%rsp),%xmm5 |
| 1806 movdqu %xmm3,32(%r13) |
| 1807 pxor 64(%rsp),%xmm2 |
| 1808 movdqu %xmm5,48(%r13) |
| 1809 pxor 80(%rsp),%xmm6 |
| 1810 movdqu %xmm2,64(%r13) |
| 1811 movdqu %xmm6,80(%r13) |
| 1812 leaq 96(%r13),%r13 |
| 1813 |
| 1814 movdqa 96(%rsp),%xmm6 |
| 1815 jmp .Lxts_enc_done |
| 1816 .align 16 |
| 1817 .Lxts_enc_5: |
| 1818 pxor %xmm10,%xmm2 |
| 1819 leaq 80(%r12),%r12 |
| 1820 pxor %xmm11,%xmm3 |
| 1821 leaq 128(%rsp),%rax |
| 1822 movl %edx,%r10d |
| 1823 |
| 1824 call _bsaes_encrypt8 |
| 1825 |
| 1826 pxor 0(%rsp),%xmm15 |
| 1827 pxor 16(%rsp),%xmm0 |
| 1828 movdqu %xmm15,0(%r13) |
| 1829 pxor 32(%rsp),%xmm3 |
| 1830 movdqu %xmm0,16(%r13) |
| 1831 pxor 48(%rsp),%xmm5 |
| 1832 movdqu %xmm3,32(%r13) |
| 1833 pxor 64(%rsp),%xmm2 |
| 1834 movdqu %xmm5,48(%r13) |
| 1835 movdqu %xmm2,64(%r13) |
| 1836 leaq 80(%r13),%r13 |
| 1837 |
| 1838 movdqa 80(%rsp),%xmm6 |
| 1839 jmp .Lxts_enc_done |
| 1840 .align 16 |
| 1841 .Lxts_enc_4: |
| 1842 pxor %xmm9,%xmm1 |
| 1843 leaq 64(%r12),%r12 |
| 1844 pxor %xmm10,%xmm2 |
| 1845 leaq 128(%rsp),%rax |
| 1846 movl %edx,%r10d |
| 1847 |
| 1848 call _bsaes_encrypt8 |
| 1849 |
| 1850 pxor 0(%rsp),%xmm15 |
| 1851 pxor 16(%rsp),%xmm0 |
| 1852 movdqu %xmm15,0(%r13) |
| 1853 pxor 32(%rsp),%xmm3 |
| 1854 movdqu %xmm0,16(%r13) |
| 1855 pxor 48(%rsp),%xmm5 |
| 1856 movdqu %xmm3,32(%r13) |
| 1857 movdqu %xmm5,48(%r13) |
| 1858 leaq 64(%r13),%r13 |
| 1859 |
| 1860 movdqa 64(%rsp),%xmm6 |
| 1861 jmp .Lxts_enc_done |
| 1862 .align 16 |
| 1863 .Lxts_enc_3: |
| 1864 pxor %xmm8,%xmm0 |
| 1865 leaq 48(%r12),%r12 |
| 1866 pxor %xmm9,%xmm1 |
| 1867 leaq 128(%rsp),%rax |
| 1868 movl %edx,%r10d |
| 1869 |
| 1870 call _bsaes_encrypt8 |
| 1871 |
| 1872 pxor 0(%rsp),%xmm15 |
| 1873 pxor 16(%rsp),%xmm0 |
| 1874 movdqu %xmm15,0(%r13) |
| 1875 pxor 32(%rsp),%xmm3 |
| 1876 movdqu %xmm0,16(%r13) |
| 1877 movdqu %xmm3,32(%r13) |
| 1878 leaq 48(%r13),%r13 |
| 1879 |
| 1880 movdqa 48(%rsp),%xmm6 |
| 1881 jmp .Lxts_enc_done |
| 1882 .align 16 |
| 1883 .Lxts_enc_2: |
| 1884 pxor %xmm7,%xmm15 |
| 1885 leaq 32(%r12),%r12 |
| 1886 pxor %xmm8,%xmm0 |
| 1887 leaq 128(%rsp),%rax |
| 1888 movl %edx,%r10d |
| 1889 |
| 1890 call _bsaes_encrypt8 |
| 1891 |
| 1892 pxor 0(%rsp),%xmm15 |
| 1893 pxor 16(%rsp),%xmm0 |
| 1894 movdqu %xmm15,0(%r13) |
| 1895 movdqu %xmm0,16(%r13) |
| 1896 leaq 32(%r13),%r13 |
| 1897 |
| 1898 movdqa 32(%rsp),%xmm6 |
| 1899 jmp .Lxts_enc_done |
| 1900 .align 16 |
| 1901 .Lxts_enc_1: |
| 1902 pxor %xmm15,%xmm7 |
| 1903 leaq 16(%r12),%r12 |
| 1904 movdqa %xmm7,32(%rbp) |
| 1905 leaq 32(%rbp),%rdi |
| 1906 leaq 32(%rbp),%rsi |
| 1907 leaq (%r15),%rdx |
| 1908 call asm_AES_encrypt |
| 1909 pxor 32(%rbp),%xmm15 |
| 1910 |
| 1911 |
| 1912 |
| 1913 |
| 1914 |
| 1915 movdqu %xmm15,0(%r13) |
| 1916 leaq 16(%r13),%r13 |
| 1917 |
| 1918 movdqa 16(%rsp),%xmm6 |
| 1919 |
| 1920 .Lxts_enc_done: |
| 1921 andl $15,%ebx |
| 1922 jz .Lxts_enc_ret |
| 1923 movq %r13,%rdx |
| 1924 |
| 1925 .Lxts_enc_steal: |
| 1926 movzbl (%r12),%eax |
| 1927 movzbl -16(%rdx),%ecx |
| 1928 leaq 1(%r12),%r12 |
| 1929 movb %al,-16(%rdx) |
| 1930 movb %cl,0(%rdx) |
| 1931 leaq 1(%rdx),%rdx |
| 1932 subl $1,%ebx |
| 1933 jnz .Lxts_enc_steal |
| 1934 |
| 1935 movdqu -16(%r13),%xmm15 |
| 1936 leaq 32(%rbp),%rdi |
| 1937 pxor %xmm6,%xmm15 |
| 1938 leaq 32(%rbp),%rsi |
| 1939 movdqa %xmm15,32(%rbp) |
| 1940 leaq (%r15),%rdx |
| 1941 call asm_AES_encrypt |
| 1942 pxor 32(%rbp),%xmm6 |
| 1943 movdqu %xmm6,-16(%r13) |
| 1944 |
| 1945 .Lxts_enc_ret: |
| 1946 leaq (%rsp),%rax |
| 1947 pxor %xmm0,%xmm0 |
| 1948 .Lxts_enc_bzero: |
| 1949 movdqa %xmm0,0(%rax) |
| 1950 movdqa %xmm0,16(%rax) |
| 1951 leaq 32(%rax),%rax |
| 1952 cmpq %rax,%rbp |
| 1953 ja .Lxts_enc_bzero |
| 1954 |
| 1955 leaq (%rbp),%rsp |
| 1956 movq 72(%rsp),%r15 |
| 1957 movq 80(%rsp),%r14 |
| 1958 movq 88(%rsp),%r13 |
| 1959 movq 96(%rsp),%r12 |
| 1960 movq 104(%rsp),%rbx |
| 1961 movq 112(%rsp),%rax |
| 1962 leaq 120(%rsp),%rsp |
| 1963 movq %rax,%rbp |
| 1964 .Lxts_enc_epilogue: |
| 1965 .byte 0xf3,0xc3 |
| 1966 .size bsaes_xts_encrypt,.-bsaes_xts_encrypt |
| 1967 |
| 1968 .globl bsaes_xts_decrypt |
| 1969 .type bsaes_xts_decrypt,@function |
| 1970 .align 16 |
| 1971 bsaes_xts_decrypt: |
| 1972 movq %rsp,%rax |
| 1973 .Lxts_dec_prologue: |
| 1974 pushq %rbp |
| 1975 pushq %rbx |
| 1976 pushq %r12 |
| 1977 pushq %r13 |
| 1978 pushq %r14 |
| 1979 pushq %r15 |
| 1980 leaq -72(%rsp),%rsp |
| 1981 movq %rsp,%rbp |
| 1982 movq %rdi,%r12 |
| 1983 movq %rsi,%r13 |
| 1984 movq %rdx,%r14 |
| 1985 movq %rcx,%r15 |
| 1986 |
| 1987 leaq (%r9),%rdi |
| 1988 leaq 32(%rbp),%rsi |
| 1989 leaq (%r8),%rdx |
| 1990 call asm_AES_encrypt |
| 1991 |
| 1992 movl 240(%r15),%eax |
| 1993 movq %r14,%rbx |
| 1994 |
| 1995 movl %eax,%edx |
| 1996 shlq $7,%rax |
| 1997 subq $96,%rax |
| 1998 subq %rax,%rsp |
| 1999 |
| 2000 movq %rsp,%rax |
| 2001 movq %r15,%rcx |
| 2002 movl %edx,%r10d |
| 2003 call _bsaes_key_convert |
| 2004 pxor (%rsp),%xmm7 |
| 2005 movdqa %xmm6,(%rax) |
| 2006 movdqa %xmm7,(%rsp) |
| 2007 |
| 2008 xorl %eax,%eax |
| 2009 andq $-16,%r14 |
| 2010 testl $15,%ebx |
| 2011 setnz %al |
| 2012 shlq $4,%rax |
| 2013 subq %rax,%r14 |
| 2014 |
| 2015 subq $128,%rsp |
| 2016 movdqa 32(%rbp),%xmm6 |
| 2017 |
| 2018 pxor %xmm14,%xmm14 |
| 2019 movdqa .Lxts_magic(%rip),%xmm12 |
| 2020 pcmpgtd %xmm6,%xmm14 |
| 2021 |
| 2022 subq $128,%r14 |
| 2023 jc .Lxts_dec_short |
| 2024 jmp .Lxts_dec_loop |
| 2025 |
| 2026 .align 16 |
| 2027 .Lxts_dec_loop: |
| 2028 pshufd $19,%xmm14,%xmm13 |
| 2029 pxor %xmm14,%xmm14 |
| 2030 movdqa %xmm6,%xmm15 |
| 2031 movdqa %xmm6,0(%rsp) |
| 2032 paddq %xmm6,%xmm6 |
| 2033 pand %xmm12,%xmm13 |
| 2034 pcmpgtd %xmm6,%xmm14 |
| 2035 pxor %xmm13,%xmm6 |
| 2036 pshufd $19,%xmm14,%xmm13 |
| 2037 pxor %xmm14,%xmm14 |
| 2038 movdqa %xmm6,%xmm0 |
| 2039 movdqa %xmm6,16(%rsp) |
| 2040 paddq %xmm6,%xmm6 |
| 2041 pand %xmm12,%xmm13 |
| 2042 pcmpgtd %xmm6,%xmm14 |
| 2043 pxor %xmm13,%xmm6 |
| 2044 movdqu 0(%r12),%xmm7 |
| 2045 pshufd $19,%xmm14,%xmm13 |
| 2046 pxor %xmm14,%xmm14 |
| 2047 movdqa %xmm6,%xmm1 |
| 2048 movdqa %xmm6,32(%rsp) |
| 2049 paddq %xmm6,%xmm6 |
| 2050 pand %xmm12,%xmm13 |
| 2051 pcmpgtd %xmm6,%xmm14 |
| 2052 pxor %xmm13,%xmm6 |
| 2053 movdqu 16(%r12),%xmm8 |
| 2054 pxor %xmm7,%xmm15 |
| 2055 pshufd $19,%xmm14,%xmm13 |
| 2056 pxor %xmm14,%xmm14 |
| 2057 movdqa %xmm6,%xmm2 |
| 2058 movdqa %xmm6,48(%rsp) |
| 2059 paddq %xmm6,%xmm6 |
| 2060 pand %xmm12,%xmm13 |
| 2061 pcmpgtd %xmm6,%xmm14 |
| 2062 pxor %xmm13,%xmm6 |
| 2063 movdqu 32(%r12),%xmm9 |
| 2064 pxor %xmm8,%xmm0 |
| 2065 pshufd $19,%xmm14,%xmm13 |
| 2066 pxor %xmm14,%xmm14 |
| 2067 movdqa %xmm6,%xmm3 |
| 2068 movdqa %xmm6,64(%rsp) |
| 2069 paddq %xmm6,%xmm6 |
| 2070 pand %xmm12,%xmm13 |
| 2071 pcmpgtd %xmm6,%xmm14 |
| 2072 pxor %xmm13,%xmm6 |
| 2073 movdqu 48(%r12),%xmm10 |
| 2074 pxor %xmm9,%xmm1 |
| 2075 pshufd $19,%xmm14,%xmm13 |
| 2076 pxor %xmm14,%xmm14 |
| 2077 movdqa %xmm6,%xmm4 |
| 2078 movdqa %xmm6,80(%rsp) |
| 2079 paddq %xmm6,%xmm6 |
| 2080 pand %xmm12,%xmm13 |
| 2081 pcmpgtd %xmm6,%xmm14 |
| 2082 pxor %xmm13,%xmm6 |
| 2083 movdqu 64(%r12),%xmm11 |
| 2084 pxor %xmm10,%xmm2 |
| 2085 pshufd $19,%xmm14,%xmm13 |
| 2086 pxor %xmm14,%xmm14 |
| 2087 movdqa %xmm6,%xmm5 |
| 2088 movdqa %xmm6,96(%rsp) |
| 2089 paddq %xmm6,%xmm6 |
| 2090 pand %xmm12,%xmm13 |
| 2091 pcmpgtd %xmm6,%xmm14 |
| 2092 pxor %xmm13,%xmm6 |
| 2093 movdqu 80(%r12),%xmm12 |
| 2094 pxor %xmm11,%xmm3 |
| 2095 movdqu 96(%r12),%xmm13 |
| 2096 pxor %xmm12,%xmm4 |
| 2097 movdqu 112(%r12),%xmm14 |
| 2098 leaq 128(%r12),%r12 |
| 2099 movdqa %xmm6,112(%rsp) |
| 2100 pxor %xmm13,%xmm5 |
| 2101 leaq 128(%rsp),%rax |
| 2102 pxor %xmm14,%xmm6 |
| 2103 movl %edx,%r10d |
| 2104 |
| 2105 call _bsaes_decrypt8 |
| 2106 |
| 2107 pxor 0(%rsp),%xmm15 |
| 2108 pxor 16(%rsp),%xmm0 |
| 2109 movdqu %xmm15,0(%r13) |
| 2110 pxor 32(%rsp),%xmm5 |
| 2111 movdqu %xmm0,16(%r13) |
| 2112 pxor 48(%rsp),%xmm3 |
| 2113 movdqu %xmm5,32(%r13) |
| 2114 pxor 64(%rsp),%xmm1 |
| 2115 movdqu %xmm3,48(%r13) |
| 2116 pxor 80(%rsp),%xmm6 |
| 2117 movdqu %xmm1,64(%r13) |
| 2118 pxor 96(%rsp),%xmm2 |
| 2119 movdqu %xmm6,80(%r13) |
| 2120 pxor 112(%rsp),%xmm4 |
| 2121 movdqu %xmm2,96(%r13) |
| 2122 movdqu %xmm4,112(%r13) |
| 2123 leaq 128(%r13),%r13 |
| 2124 |
| 2125 movdqa 112(%rsp),%xmm6 |
| 2126 pxor %xmm14,%xmm14 |
| 2127 movdqa .Lxts_magic(%rip),%xmm12 |
| 2128 pcmpgtd %xmm6,%xmm14 |
| 2129 pshufd $19,%xmm14,%xmm13 |
| 2130 pxor %xmm14,%xmm14 |
| 2131 paddq %xmm6,%xmm6 |
| 2132 pand %xmm12,%xmm13 |
| 2133 pcmpgtd %xmm6,%xmm14 |
| 2134 pxor %xmm13,%xmm6 |
| 2135 |
| 2136 subq $128,%r14 |
| 2137 jnc .Lxts_dec_loop |
| 2138 |
| 2139 .Lxts_dec_short: |
| 2140 addq $128,%r14 |
| 2141 jz .Lxts_dec_done |
| 2142 pshufd $19,%xmm14,%xmm13 |
| 2143 pxor %xmm14,%xmm14 |
| 2144 movdqa %xmm6,%xmm15 |
| 2145 movdqa %xmm6,0(%rsp) |
| 2146 paddq %xmm6,%xmm6 |
| 2147 pand %xmm12,%xmm13 |
| 2148 pcmpgtd %xmm6,%xmm14 |
| 2149 pxor %xmm13,%xmm6 |
| 2150 pshufd $19,%xmm14,%xmm13 |
| 2151 pxor %xmm14,%xmm14 |
| 2152 movdqa %xmm6,%xmm0 |
| 2153 movdqa %xmm6,16(%rsp) |
| 2154 paddq %xmm6,%xmm6 |
| 2155 pand %xmm12,%xmm13 |
| 2156 pcmpgtd %xmm6,%xmm14 |
| 2157 pxor %xmm13,%xmm6 |
| 2158 movdqu 0(%r12),%xmm7 |
| 2159 cmpq $16,%r14 |
| 2160 je .Lxts_dec_1 |
| 2161 pshufd $19,%xmm14,%xmm13 |
| 2162 pxor %xmm14,%xmm14 |
| 2163 movdqa %xmm6,%xmm1 |
| 2164 movdqa %xmm6,32(%rsp) |
| 2165 paddq %xmm6,%xmm6 |
| 2166 pand %xmm12,%xmm13 |
| 2167 pcmpgtd %xmm6,%xmm14 |
| 2168 pxor %xmm13,%xmm6 |
| 2169 movdqu 16(%r12),%xmm8 |
| 2170 cmpq $32,%r14 |
| 2171 je .Lxts_dec_2 |
| 2172 pxor %xmm7,%xmm15 |
| 2173 pshufd $19,%xmm14,%xmm13 |
| 2174 pxor %xmm14,%xmm14 |
| 2175 movdqa %xmm6,%xmm2 |
| 2176 movdqa %xmm6,48(%rsp) |
| 2177 paddq %xmm6,%xmm6 |
| 2178 pand %xmm12,%xmm13 |
| 2179 pcmpgtd %xmm6,%xmm14 |
| 2180 pxor %xmm13,%xmm6 |
| 2181 movdqu 32(%r12),%xmm9 |
| 2182 cmpq $48,%r14 |
| 2183 je .Lxts_dec_3 |
| 2184 pxor %xmm8,%xmm0 |
| 2185 pshufd $19,%xmm14,%xmm13 |
| 2186 pxor %xmm14,%xmm14 |
| 2187 movdqa %xmm6,%xmm3 |
| 2188 movdqa %xmm6,64(%rsp) |
| 2189 paddq %xmm6,%xmm6 |
| 2190 pand %xmm12,%xmm13 |
| 2191 pcmpgtd %xmm6,%xmm14 |
| 2192 pxor %xmm13,%xmm6 |
| 2193 movdqu 48(%r12),%xmm10 |
| 2194 cmpq $64,%r14 |
| 2195 je .Lxts_dec_4 |
| 2196 pxor %xmm9,%xmm1 |
| 2197 pshufd $19,%xmm14,%xmm13 |
| 2198 pxor %xmm14,%xmm14 |
| 2199 movdqa %xmm6,%xmm4 |
| 2200 movdqa %xmm6,80(%rsp) |
| 2201 paddq %xmm6,%xmm6 |
| 2202 pand %xmm12,%xmm13 |
| 2203 pcmpgtd %xmm6,%xmm14 |
| 2204 pxor %xmm13,%xmm6 |
| 2205 movdqu 64(%r12),%xmm11 |
| 2206 cmpq $80,%r14 |
| 2207 je .Lxts_dec_5 |
| 2208 pxor %xmm10,%xmm2 |
| 2209 pshufd $19,%xmm14,%xmm13 |
| 2210 pxor %xmm14,%xmm14 |
| 2211 movdqa %xmm6,%xmm5 |
| 2212 movdqa %xmm6,96(%rsp) |
| 2213 paddq %xmm6,%xmm6 |
| 2214 pand %xmm12,%xmm13 |
| 2215 pcmpgtd %xmm6,%xmm14 |
| 2216 pxor %xmm13,%xmm6 |
| 2217 movdqu 80(%r12),%xmm12 |
| 2218 cmpq $96,%r14 |
| 2219 je .Lxts_dec_6 |
| 2220 pxor %xmm11,%xmm3 |
| 2221 movdqu 96(%r12),%xmm13 |
| 2222 pxor %xmm12,%xmm4 |
| 2223 movdqa %xmm6,112(%rsp) |
| 2224 leaq 112(%r12),%r12 |
| 2225 pxor %xmm13,%xmm5 |
| 2226 leaq 128(%rsp),%rax |
| 2227 movl %edx,%r10d |
| 2228 |
| 2229 call _bsaes_decrypt8 |
| 2230 |
| 2231 pxor 0(%rsp),%xmm15 |
| 2232 pxor 16(%rsp),%xmm0 |
| 2233 movdqu %xmm15,0(%r13) |
| 2234 pxor 32(%rsp),%xmm5 |
| 2235 movdqu %xmm0,16(%r13) |
| 2236 pxor 48(%rsp),%xmm3 |
| 2237 movdqu %xmm5,32(%r13) |
| 2238 pxor 64(%rsp),%xmm1 |
| 2239 movdqu %xmm3,48(%r13) |
| 2240 pxor 80(%rsp),%xmm6 |
| 2241 movdqu %xmm1,64(%r13) |
| 2242 pxor 96(%rsp),%xmm2 |
| 2243 movdqu %xmm6,80(%r13) |
| 2244 movdqu %xmm2,96(%r13) |
| 2245 leaq 112(%r13),%r13 |
| 2246 |
| 2247 movdqa 112(%rsp),%xmm6 |
| 2248 jmp .Lxts_dec_done |
| 2249 .align 16 |
| 2250 .Lxts_dec_6: |
| 2251 pxor %xmm11,%xmm3 |
| 2252 leaq 96(%r12),%r12 |
| 2253 pxor %xmm12,%xmm4 |
| 2254 leaq 128(%rsp),%rax |
| 2255 movl %edx,%r10d |
| 2256 |
| 2257 call _bsaes_decrypt8 |
| 2258 |
| 2259 pxor 0(%rsp),%xmm15 |
| 2260 pxor 16(%rsp),%xmm0 |
| 2261 movdqu %xmm15,0(%r13) |
| 2262 pxor 32(%rsp),%xmm5 |
| 2263 movdqu %xmm0,16(%r13) |
| 2264 pxor 48(%rsp),%xmm3 |
| 2265 movdqu %xmm5,32(%r13) |
| 2266 pxor 64(%rsp),%xmm1 |
| 2267 movdqu %xmm3,48(%r13) |
| 2268 pxor 80(%rsp),%xmm6 |
| 2269 movdqu %xmm1,64(%r13) |
| 2270 movdqu %xmm6,80(%r13) |
| 2271 leaq 96(%r13),%r13 |
| 2272 |
| 2273 movdqa 96(%rsp),%xmm6 |
| 2274 jmp .Lxts_dec_done |
| 2275 .align 16 |
| 2276 .Lxts_dec_5: |
| 2277 pxor %xmm10,%xmm2 |
| 2278 leaq 80(%r12),%r12 |
| 2279 pxor %xmm11,%xmm3 |
| 2280 leaq 128(%rsp),%rax |
| 2281 movl %edx,%r10d |
| 2282 |
| 2283 call _bsaes_decrypt8 |
| 2284 |
| 2285 pxor 0(%rsp),%xmm15 |
| 2286 pxor 16(%rsp),%xmm0 |
| 2287 movdqu %xmm15,0(%r13) |
| 2288 pxor 32(%rsp),%xmm5 |
| 2289 movdqu %xmm0,16(%r13) |
| 2290 pxor 48(%rsp),%xmm3 |
| 2291 movdqu %xmm5,32(%r13) |
| 2292 pxor 64(%rsp),%xmm1 |
| 2293 movdqu %xmm3,48(%r13) |
| 2294 movdqu %xmm1,64(%r13) |
| 2295 leaq 80(%r13),%r13 |
| 2296 |
| 2297 movdqa 80(%rsp),%xmm6 |
| 2298 jmp .Lxts_dec_done |
| 2299 .align 16 |
| 2300 .Lxts_dec_4: |
| 2301 pxor %xmm9,%xmm1 |
| 2302 leaq 64(%r12),%r12 |
| 2303 pxor %xmm10,%xmm2 |
| 2304 leaq 128(%rsp),%rax |
| 2305 movl %edx,%r10d |
| 2306 |
| 2307 call _bsaes_decrypt8 |
| 2308 |
| 2309 pxor 0(%rsp),%xmm15 |
| 2310 pxor 16(%rsp),%xmm0 |
| 2311 movdqu %xmm15,0(%r13) |
| 2312 pxor 32(%rsp),%xmm5 |
| 2313 movdqu %xmm0,16(%r13) |
| 2314 pxor 48(%rsp),%xmm3 |
| 2315 movdqu %xmm5,32(%r13) |
| 2316 movdqu %xmm3,48(%r13) |
| 2317 leaq 64(%r13),%r13 |
| 2318 |
| 2319 movdqa 64(%rsp),%xmm6 |
| 2320 jmp .Lxts_dec_done |
| 2321 .align 16 |
| 2322 .Lxts_dec_3: |
| 2323 pxor %xmm8,%xmm0 |
| 2324 leaq 48(%r12),%r12 |
| 2325 pxor %xmm9,%xmm1 |
| 2326 leaq 128(%rsp),%rax |
| 2327 movl %edx,%r10d |
| 2328 |
| 2329 call _bsaes_decrypt8 |
| 2330 |
| 2331 pxor 0(%rsp),%xmm15 |
| 2332 pxor 16(%rsp),%xmm0 |
| 2333 movdqu %xmm15,0(%r13) |
| 2334 pxor 32(%rsp),%xmm5 |
| 2335 movdqu %xmm0,16(%r13) |
| 2336 movdqu %xmm5,32(%r13) |
| 2337 leaq 48(%r13),%r13 |
| 2338 |
| 2339 movdqa 48(%rsp),%xmm6 |
| 2340 jmp .Lxts_dec_done |
| 2341 .align 16 |
| 2342 .Lxts_dec_2: |
| 2343 pxor %xmm7,%xmm15 |
| 2344 leaq 32(%r12),%r12 |
| 2345 pxor %xmm8,%xmm0 |
| 2346 leaq 128(%rsp),%rax |
| 2347 movl %edx,%r10d |
| 2348 |
| 2349 call _bsaes_decrypt8 |
| 2350 |
| 2351 pxor 0(%rsp),%xmm15 |
| 2352 pxor 16(%rsp),%xmm0 |
| 2353 movdqu %xmm15,0(%r13) |
| 2354 movdqu %xmm0,16(%r13) |
| 2355 leaq 32(%r13),%r13 |
| 2356 |
| 2357 movdqa 32(%rsp),%xmm6 |
| 2358 jmp .Lxts_dec_done |
| 2359 .align 16 |
| 2360 .Lxts_dec_1: |
| 2361 pxor %xmm15,%xmm7 |
| 2362 leaq 16(%r12),%r12 |
| 2363 movdqa %xmm7,32(%rbp) |
| 2364 leaq 32(%rbp),%rdi |
| 2365 leaq 32(%rbp),%rsi |
| 2366 leaq (%r15),%rdx |
| 2367 call asm_AES_decrypt |
| 2368 pxor 32(%rbp),%xmm15 |
| 2369 |
| 2370 |
| 2371 |
| 2372 |
| 2373 |
| 2374 movdqu %xmm15,0(%r13) |
| 2375 leaq 16(%r13),%r13 |
| 2376 |
| 2377 movdqa 16(%rsp),%xmm6 |
| 2378 |
| 2379 .Lxts_dec_done: |
| 2380 andl $15,%ebx |
| 2381 jz .Lxts_dec_ret |
| 2382 |
| 2383 pxor %xmm14,%xmm14 |
| 2384 movdqa .Lxts_magic(%rip),%xmm12 |
| 2385 pcmpgtd %xmm6,%xmm14 |
| 2386 pshufd $19,%xmm14,%xmm13 |
| 2387 movdqa %xmm6,%xmm5 |
| 2388 paddq %xmm6,%xmm6 |
| 2389 pand %xmm12,%xmm13 |
| 2390 movdqu (%r12),%xmm15 |
| 2391 pxor %xmm13,%xmm6 |
| 2392 |
| 2393 leaq 32(%rbp),%rdi |
| 2394 pxor %xmm6,%xmm15 |
| 2395 leaq 32(%rbp),%rsi |
| 2396 movdqa %xmm15,32(%rbp) |
| 2397 leaq (%r15),%rdx |
| 2398 call asm_AES_decrypt |
| 2399 pxor 32(%rbp),%xmm6 |
| 2400 movq %r13,%rdx |
| 2401 movdqu %xmm6,(%r13) |
| 2402 |
| 2403 .Lxts_dec_steal: |
| 2404 movzbl 16(%r12),%eax |
| 2405 movzbl (%rdx),%ecx |
| 2406 leaq 1(%r12),%r12 |
| 2407 movb %al,(%rdx) |
| 2408 movb %cl,16(%rdx) |
| 2409 leaq 1(%rdx),%rdx |
| 2410 subl $1,%ebx |
| 2411 jnz .Lxts_dec_steal |
| 2412 |
| 2413 movdqu (%r13),%xmm15 |
| 2414 leaq 32(%rbp),%rdi |
| 2415 pxor %xmm5,%xmm15 |
| 2416 leaq 32(%rbp),%rsi |
| 2417 movdqa %xmm15,32(%rbp) |
| 2418 leaq (%r15),%rdx |
| 2419 call asm_AES_decrypt |
| 2420 pxor 32(%rbp),%xmm5 |
| 2421 movdqu %xmm5,(%r13) |
| 2422 |
| 2423 .Lxts_dec_ret: |
| 2424 leaq (%rsp),%rax |
| 2425 pxor %xmm0,%xmm0 |
| 2426 .Lxts_dec_bzero: |
| 2427 movdqa %xmm0,0(%rax) |
| 2428 movdqa %xmm0,16(%rax) |
| 2429 leaq 32(%rax),%rax |
| 2430 cmpq %rax,%rbp |
| 2431 ja .Lxts_dec_bzero |
| 2432 |
| 2433 leaq (%rbp),%rsp |
| 2434 movq 72(%rsp),%r15 |
| 2435 movq 80(%rsp),%r14 |
| 2436 movq 88(%rsp),%r13 |
| 2437 movq 96(%rsp),%r12 |
| 2438 movq 104(%rsp),%rbx |
| 2439 movq 112(%rsp),%rax |
| 2440 leaq 120(%rsp),%rsp |
| 2441 movq %rax,%rbp |
| 2442 .Lxts_dec_epilogue: |
| 2443 .byte 0xf3,0xc3 |
| 2444 .size bsaes_xts_decrypt,.-bsaes_xts_decrypt |
| 2445 .type _bsaes_const,@object |
| 2446 .align 64 |
| 2447 _bsaes_const: |
| 2448 .LM0ISR: |
| 2449 .quad 0x0a0e0206070b0f03, 0x0004080c0d010509 |
| 2450 .LISRM0: |
| 2451 .quad 0x01040b0e0205080f, 0x0306090c00070a0d |
| 2452 .LISR: |
| 2453 .quad 0x0504070602010003, 0x0f0e0d0c080b0a09 |
| 2454 .LBS0: |
| 2455 .quad 0x5555555555555555, 0x5555555555555555 |
| 2456 .LBS1: |
| 2457 .quad 0x3333333333333333, 0x3333333333333333 |
| 2458 .LBS2: |
| 2459 .quad 0x0f0f0f0f0f0f0f0f, 0x0f0f0f0f0f0f0f0f |
| 2460 .LSR: |
| 2461 .quad 0x0504070600030201, 0x0f0e0d0c0a09080b |
| 2462 .LSRM0: |
| 2463 .quad 0x0304090e00050a0f, 0x01060b0c0207080d |
| 2464 .LM0SR: |
| 2465 .quad 0x0a0e02060f03070b, 0x0004080c05090d01 |
| 2466 .LSWPUP: |
| 2467 .quad 0x0706050403020100, 0x0c0d0e0f0b0a0908 |
| 2468 .LSWPUPM0SR: |
| 2469 .quad 0x0a0d02060c03070b, 0x0004080f05090e01 |
| 2470 .LADD1: |
| 2471 .quad 0x0000000000000000, 0x0000000100000000 |
| 2472 .LADD2: |
| 2473 .quad 0x0000000000000000, 0x0000000200000000 |
| 2474 .LADD3: |
| 2475 .quad 0x0000000000000000, 0x0000000300000000 |
| 2476 .LADD4: |
| 2477 .quad 0x0000000000000000, 0x0000000400000000 |
| 2478 .LADD5: |
| 2479 .quad 0x0000000000000000, 0x0000000500000000 |
| 2480 .LADD6: |
| 2481 .quad 0x0000000000000000, 0x0000000600000000 |
| 2482 .LADD7: |
| 2483 .quad 0x0000000000000000, 0x0000000700000000 |
| 2484 .LADD8: |
| 2485 .quad 0x0000000000000000, 0x0000000800000000 |
| 2486 .Lxts_magic: |
| 2487 .long 0x87,0,1,0 |
| 2488 .Lmasks: |
| 2489 .quad 0x0101010101010101, 0x0101010101010101 |
| 2490 .quad 0x0202020202020202, 0x0202020202020202 |
| 2491 .quad 0x0404040404040404, 0x0404040404040404 |
| 2492 .quad 0x0808080808080808, 0x0808080808080808 |
| 2493 .LM0: |
| 2494 .quad 0x02060a0e03070b0f, 0x0004080c0105090d |
| 2495 .L63: |
| 2496 .quad 0x6363636363636363, 0x6363636363636363 |
| 2497 .byte 66,105,116,45,115,108,105,99,101,100,32,65,69,83,32,102,111,114,32,120,5
6,54,95,54,52,47,83,83,83,69,51,44,32,69,109,105,108,105,97,32,75,195,164,115,11
2,101,114,44,32,80,101,116,101,114,32,83,99,104,119,97,98,101,44,32,65,110,100,1
21,32,80,111,108,121,97,107,111,118,0 |
| 2498 .align 64 |
| 2499 .size _bsaes_const,.-_bsaes_const |
| 2500 #endif |
OLD | NEW |