Robert Sloan | 8ff0355 | 2017-06-14 12:40:58 -0700 | [diff] [blame^] | 1 | #if defined(__x86_64__) && !defined(OPENSSL_NO_ASM) |
| 2 | .data |
| 3 | |
| 4 | .p2align 4 |
| 5 | one: |
| 6 | .quad 1,0 |
| 7 | two: |
| 8 | .quad 2,0 |
| 9 | three: |
| 10 | .quad 3,0 |
| 11 | four: |
| 12 | .quad 4,0 |
| 13 | five: |
| 14 | .quad 5,0 |
| 15 | six: |
| 16 | .quad 6,0 |
| 17 | seven: |
| 18 | .quad 7,0 |
| 19 | eight: |
| 20 | .quad 8,0 |
| 21 | |
| 22 | OR_MASK: |
| 23 | .long 0x00000000,0x00000000,0x00000000,0x80000000 |
| 24 | poly: |
| 25 | .quad 0x1, 0xc200000000000000 |
| 26 | mask: |
| 27 | .long 0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d,0x0c0f0e0d |
| 28 | con1: |
| 29 | .long 1,1,1,1 |
| 30 | con2: |
| 31 | .long 0x1b,0x1b,0x1b,0x1b |
| 32 | con3: |
| 33 | .byte -1,-1,-1,-1,-1,-1,-1,-1,4,5,6,7,4,5,6,7 |
| 34 | and_mask: |
| 35 | .long 0,0xffffffff, 0xffffffff, 0xffffffff |
| 36 | .text |
| 37 | |
| 38 | .p2align 4 |
| 39 | GFMUL: |
| 40 | |
| 41 | vpclmulqdq $0x00,%xmm1,%xmm0,%xmm2 |
| 42 | vpclmulqdq $0x11,%xmm1,%xmm0,%xmm5 |
| 43 | vpclmulqdq $0x10,%xmm1,%xmm0,%xmm3 |
| 44 | vpclmulqdq $0x01,%xmm1,%xmm0,%xmm4 |
| 45 | vpxor %xmm4,%xmm3,%xmm3 |
| 46 | vpslldq $8,%xmm3,%xmm4 |
| 47 | vpsrldq $8,%xmm3,%xmm3 |
| 48 | vpxor %xmm4,%xmm2,%xmm2 |
| 49 | vpxor %xmm3,%xmm5,%xmm5 |
| 50 | |
| 51 | vpclmulqdq $0x10,poly(%rip),%xmm2,%xmm3 |
| 52 | vpshufd $78,%xmm2,%xmm4 |
| 53 | vpxor %xmm4,%xmm3,%xmm2 |
| 54 | |
| 55 | vpclmulqdq $0x10,poly(%rip),%xmm2,%xmm3 |
| 56 | vpshufd $78,%xmm2,%xmm4 |
| 57 | vpxor %xmm4,%xmm3,%xmm2 |
| 58 | |
| 59 | vpxor %xmm5,%xmm2,%xmm0 |
| 60 | .byte 0xf3,0xc3 |
| 61 | |
| 62 | |
| 63 | .globl _aesgcmsiv_htable_init |
| 64 | .private_extern _aesgcmsiv_htable_init |
| 65 | |
| 66 | .p2align 4 |
| 67 | _aesgcmsiv_htable_init: |
| 68 | |
| 69 | vmovdqa (%rsi),%xmm0 |
| 70 | vmovdqa %xmm0,%xmm1 |
| 71 | vmovdqa %xmm0,(%rdi) |
| 72 | call GFMUL |
| 73 | vmovdqa %xmm0,16(%rdi) |
| 74 | call GFMUL |
| 75 | vmovdqa %xmm0,32(%rdi) |
| 76 | call GFMUL |
| 77 | vmovdqa %xmm0,48(%rdi) |
| 78 | call GFMUL |
| 79 | vmovdqa %xmm0,64(%rdi) |
| 80 | call GFMUL |
| 81 | vmovdqa %xmm0,80(%rdi) |
| 82 | call GFMUL |
| 83 | vmovdqa %xmm0,96(%rdi) |
| 84 | call GFMUL |
| 85 | vmovdqa %xmm0,112(%rdi) |
| 86 | .byte 0xf3,0xc3 |
| 87 | |
| 88 | |
| 89 | .globl _aesgcmsiv_htable6_init |
| 90 | .private_extern _aesgcmsiv_htable6_init |
| 91 | |
| 92 | .p2align 4 |
| 93 | _aesgcmsiv_htable6_init: |
| 94 | |
| 95 | vmovdqa (%rsi),%xmm0 |
| 96 | vmovdqa %xmm0,%xmm1 |
| 97 | vmovdqa %xmm0,(%rdi) |
| 98 | call GFMUL |
| 99 | vmovdqa %xmm0,16(%rdi) |
| 100 | call GFMUL |
| 101 | vmovdqa %xmm0,32(%rdi) |
| 102 | call GFMUL |
| 103 | vmovdqa %xmm0,48(%rdi) |
| 104 | call GFMUL |
| 105 | vmovdqa %xmm0,64(%rdi) |
| 106 | call GFMUL |
| 107 | vmovdqa %xmm0,80(%rdi) |
| 108 | .byte 0xf3,0xc3 |
| 109 | |
| 110 | |
| 111 | .globl _aesgcmsiv_htable_polyval |
| 112 | .private_extern _aesgcmsiv_htable_polyval |
| 113 | |
| 114 | .p2align 4 |
| 115 | _aesgcmsiv_htable_polyval: |
| 116 | |
| 117 | testq %rdx,%rdx |
| 118 | jnz L$htable_polyval_start |
| 119 | .byte 0xf3,0xc3 |
| 120 | |
| 121 | L$htable_polyval_start: |
| 122 | vzeroall |
| 123 | |
| 124 | |
| 125 | |
| 126 | movq %rdx,%r11 |
| 127 | andq $127,%r11 |
| 128 | |
| 129 | jz L$htable_polyval_no_prefix |
| 130 | |
| 131 | vpxor %xmm9,%xmm9,%xmm9 |
| 132 | vmovdqa (%rcx),%xmm1 |
| 133 | subq %r11,%rdx |
| 134 | |
| 135 | subq $16,%r11 |
| 136 | |
| 137 | |
| 138 | vmovdqu (%rsi),%xmm0 |
| 139 | vpxor %xmm1,%xmm0,%xmm0 |
| 140 | |
| 141 | vpclmulqdq $0x01,(%rdi,%r11,1),%xmm0,%xmm5 |
| 142 | vpclmulqdq $0x00,(%rdi,%r11,1),%xmm0,%xmm3 |
| 143 | vpclmulqdq $0x11,(%rdi,%r11,1),%xmm0,%xmm4 |
| 144 | vpclmulqdq $0x10,(%rdi,%r11,1),%xmm0,%xmm6 |
| 145 | vpxor %xmm6,%xmm5,%xmm5 |
| 146 | |
| 147 | leaq 16(%rsi),%rsi |
| 148 | testq %r11,%r11 |
| 149 | jnz L$htable_polyval_prefix_loop |
| 150 | jmp L$htable_polyval_prefix_complete |
| 151 | |
| 152 | |
| 153 | .p2align 6 |
| 154 | L$htable_polyval_prefix_loop: |
| 155 | subq $16,%r11 |
| 156 | |
| 157 | vmovdqu (%rsi),%xmm0 |
| 158 | |
| 159 | vpclmulqdq $0x00,(%rdi,%r11,1),%xmm0,%xmm6 |
| 160 | vpxor %xmm6,%xmm3,%xmm3 |
| 161 | vpclmulqdq $0x11,(%rdi,%r11,1),%xmm0,%xmm6 |
| 162 | vpxor %xmm6,%xmm4,%xmm4 |
| 163 | vpclmulqdq $0x01,(%rdi,%r11,1),%xmm0,%xmm6 |
| 164 | vpxor %xmm6,%xmm5,%xmm5 |
| 165 | vpclmulqdq $0x10,(%rdi,%r11,1),%xmm0,%xmm6 |
| 166 | vpxor %xmm6,%xmm5,%xmm5 |
| 167 | |
| 168 | testq %r11,%r11 |
| 169 | |
| 170 | leaq 16(%rsi),%rsi |
| 171 | |
| 172 | jnz L$htable_polyval_prefix_loop |
| 173 | |
| 174 | L$htable_polyval_prefix_complete: |
| 175 | vpsrldq $8,%xmm5,%xmm6 |
| 176 | vpslldq $8,%xmm5,%xmm5 |
| 177 | |
| 178 | vpxor %xmm6,%xmm4,%xmm9 |
| 179 | vpxor %xmm5,%xmm3,%xmm1 |
| 180 | |
| 181 | jmp L$htable_polyval_main_loop |
| 182 | |
| 183 | L$htable_polyval_no_prefix: |
| 184 | |
| 185 | |
| 186 | |
| 187 | |
| 188 | vpxor %xmm1,%xmm1,%xmm1 |
| 189 | vmovdqa (%rcx),%xmm9 |
| 190 | |
| 191 | .p2align 6 |
| 192 | L$htable_polyval_main_loop: |
| 193 | subq $0x80,%rdx |
| 194 | jb L$htable_polyval_out |
| 195 | |
| 196 | vmovdqu 112(%rsi),%xmm0 |
| 197 | |
| 198 | vpclmulqdq $0x01,(%rdi),%xmm0,%xmm5 |
| 199 | vpclmulqdq $0x00,(%rdi),%xmm0,%xmm3 |
| 200 | vpclmulqdq $0x11,(%rdi),%xmm0,%xmm4 |
| 201 | vpclmulqdq $0x10,(%rdi),%xmm0,%xmm6 |
| 202 | vpxor %xmm6,%xmm5,%xmm5 |
| 203 | |
| 204 | |
| 205 | vmovdqu 96(%rsi),%xmm0 |
| 206 | vpclmulqdq $0x01,16(%rdi),%xmm0,%xmm6 |
| 207 | vpxor %xmm6,%xmm5,%xmm5 |
| 208 | vpclmulqdq $0x00,16(%rdi),%xmm0,%xmm6 |
| 209 | vpxor %xmm6,%xmm3,%xmm3 |
| 210 | vpclmulqdq $0x11,16(%rdi),%xmm0,%xmm6 |
| 211 | vpxor %xmm6,%xmm4,%xmm4 |
| 212 | vpclmulqdq $0x10,16(%rdi),%xmm0,%xmm6 |
| 213 | vpxor %xmm6,%xmm5,%xmm5 |
| 214 | |
| 215 | |
| 216 | |
| 217 | vmovdqu 80(%rsi),%xmm0 |
| 218 | |
| 219 | vpclmulqdq $0x10,poly(%rip),%xmm1,%xmm7 |
| 220 | vpalignr $8,%xmm1,%xmm1,%xmm1 |
| 221 | |
| 222 | vpclmulqdq $0x01,32(%rdi),%xmm0,%xmm6 |
| 223 | vpxor %xmm6,%xmm5,%xmm5 |
| 224 | vpclmulqdq $0x00,32(%rdi),%xmm0,%xmm6 |
| 225 | vpxor %xmm6,%xmm3,%xmm3 |
| 226 | vpclmulqdq $0x11,32(%rdi),%xmm0,%xmm6 |
| 227 | vpxor %xmm6,%xmm4,%xmm4 |
| 228 | vpclmulqdq $0x10,32(%rdi),%xmm0,%xmm6 |
| 229 | vpxor %xmm6,%xmm5,%xmm5 |
| 230 | |
| 231 | |
| 232 | vpxor %xmm7,%xmm1,%xmm1 |
| 233 | |
| 234 | vmovdqu 64(%rsi),%xmm0 |
| 235 | |
| 236 | vpclmulqdq $0x01,48(%rdi),%xmm0,%xmm6 |
| 237 | vpxor %xmm6,%xmm5,%xmm5 |
| 238 | vpclmulqdq $0x00,48(%rdi),%xmm0,%xmm6 |
| 239 | vpxor %xmm6,%xmm3,%xmm3 |
| 240 | vpclmulqdq $0x11,48(%rdi),%xmm0,%xmm6 |
| 241 | vpxor %xmm6,%xmm4,%xmm4 |
| 242 | vpclmulqdq $0x10,48(%rdi),%xmm0,%xmm6 |
| 243 | vpxor %xmm6,%xmm5,%xmm5 |
| 244 | |
| 245 | |
| 246 | vmovdqu 48(%rsi),%xmm0 |
| 247 | |
| 248 | vpclmulqdq $0x10,poly(%rip),%xmm1,%xmm7 |
| 249 | vpalignr $8,%xmm1,%xmm1,%xmm1 |
| 250 | |
| 251 | vpclmulqdq $0x01,64(%rdi),%xmm0,%xmm6 |
| 252 | vpxor %xmm6,%xmm5,%xmm5 |
| 253 | vpclmulqdq $0x00,64(%rdi),%xmm0,%xmm6 |
| 254 | vpxor %xmm6,%xmm3,%xmm3 |
| 255 | vpclmulqdq $0x11,64(%rdi),%xmm0,%xmm6 |
| 256 | vpxor %xmm6,%xmm4,%xmm4 |
| 257 | vpclmulqdq $0x10,64(%rdi),%xmm0,%xmm6 |
| 258 | vpxor %xmm6,%xmm5,%xmm5 |
| 259 | |
| 260 | |
| 261 | vpxor %xmm7,%xmm1,%xmm1 |
| 262 | |
| 263 | vmovdqu 32(%rsi),%xmm0 |
| 264 | |
| 265 | vpclmulqdq $0x01,80(%rdi),%xmm0,%xmm6 |
| 266 | vpxor %xmm6,%xmm5,%xmm5 |
| 267 | vpclmulqdq $0x00,80(%rdi),%xmm0,%xmm6 |
| 268 | vpxor %xmm6,%xmm3,%xmm3 |
| 269 | vpclmulqdq $0x11,80(%rdi),%xmm0,%xmm6 |
| 270 | vpxor %xmm6,%xmm4,%xmm4 |
| 271 | vpclmulqdq $0x10,80(%rdi),%xmm0,%xmm6 |
| 272 | vpxor %xmm6,%xmm5,%xmm5 |
| 273 | |
| 274 | |
| 275 | vpxor %xmm9,%xmm1,%xmm1 |
| 276 | |
| 277 | vmovdqu 16(%rsi),%xmm0 |
| 278 | |
| 279 | vpclmulqdq $0x01,96(%rdi),%xmm0,%xmm6 |
| 280 | vpxor %xmm6,%xmm5,%xmm5 |
| 281 | vpclmulqdq $0x00,96(%rdi),%xmm0,%xmm6 |
| 282 | vpxor %xmm6,%xmm3,%xmm3 |
| 283 | vpclmulqdq $0x11,96(%rdi),%xmm0,%xmm6 |
| 284 | vpxor %xmm6,%xmm4,%xmm4 |
| 285 | vpclmulqdq $0x10,96(%rdi),%xmm0,%xmm6 |
| 286 | vpxor %xmm6,%xmm5,%xmm5 |
| 287 | |
| 288 | |
| 289 | vmovdqu 0(%rsi),%xmm0 |
| 290 | vpxor %xmm1,%xmm0,%xmm0 |
| 291 | |
| 292 | vpclmulqdq $0x01,112(%rdi),%xmm0,%xmm6 |
| 293 | vpxor %xmm6,%xmm5,%xmm5 |
| 294 | vpclmulqdq $0x00,112(%rdi),%xmm0,%xmm6 |
| 295 | vpxor %xmm6,%xmm3,%xmm3 |
| 296 | vpclmulqdq $0x11,112(%rdi),%xmm0,%xmm6 |
| 297 | vpxor %xmm6,%xmm4,%xmm4 |
| 298 | vpclmulqdq $0x10,112(%rdi),%xmm0,%xmm6 |
| 299 | vpxor %xmm6,%xmm5,%xmm5 |
| 300 | |
| 301 | |
| 302 | vpsrldq $8,%xmm5,%xmm6 |
| 303 | vpslldq $8,%xmm5,%xmm5 |
| 304 | |
| 305 | vpxor %xmm6,%xmm4,%xmm9 |
| 306 | vpxor %xmm5,%xmm3,%xmm1 |
| 307 | |
| 308 | leaq 128(%rsi),%rsi |
| 309 | jmp L$htable_polyval_main_loop |
| 310 | |
| 311 | |
| 312 | |
| 313 | L$htable_polyval_out: |
| 314 | vpclmulqdq $0x10,poly(%rip),%xmm1,%xmm6 |
| 315 | vpalignr $8,%xmm1,%xmm1,%xmm1 |
| 316 | vpxor %xmm6,%xmm1,%xmm1 |
| 317 | |
| 318 | vpclmulqdq $0x10,poly(%rip),%xmm1,%xmm6 |
| 319 | vpalignr $8,%xmm1,%xmm1,%xmm1 |
| 320 | vpxor %xmm6,%xmm1,%xmm1 |
| 321 | vpxor %xmm9,%xmm1,%xmm1 |
| 322 | |
| 323 | vmovdqu %xmm1,(%rcx) |
| 324 | vzeroupper |
| 325 | .byte 0xf3,0xc3 |
| 326 | |
| 327 | |
| 328 | .globl _aesgcmsiv_polyval_horner |
| 329 | .private_extern _aesgcmsiv_polyval_horner |
| 330 | |
| 331 | .p2align 4 |
| 332 | _aesgcmsiv_polyval_horner: |
| 333 | |
| 334 | testq %rcx,%rcx |
| 335 | jnz L$polyval_horner_start |
| 336 | .byte 0xf3,0xc3 |
| 337 | |
| 338 | L$polyval_horner_start: |
| 339 | |
| 340 | |
| 341 | |
| 342 | xorq %r10,%r10 |
| 343 | shlq $4,%rcx |
| 344 | |
| 345 | vmovdqa (%rsi),%xmm1 |
| 346 | vmovdqa (%rdi),%xmm0 |
| 347 | |
| 348 | L$polyval_horner_loop: |
| 349 | vpxor (%rdx,%r10,1),%xmm0,%xmm0 |
| 350 | call GFMUL |
| 351 | |
| 352 | addq $16,%r10 |
| 353 | cmpq %r10,%rcx |
| 354 | jne L$polyval_horner_loop |
| 355 | |
| 356 | |
| 357 | vmovdqa %xmm0,(%rdi) |
| 358 | .byte 0xf3,0xc3 |
| 359 | |
| 360 | |
| 361 | .globl _aes128gcmsiv_aes_ks |
| 362 | .private_extern _aes128gcmsiv_aes_ks |
| 363 | |
| 364 | .p2align 4 |
| 365 | _aes128gcmsiv_aes_ks: |
| 366 | |
| 367 | vmovdqu (%rdi),%xmm1 |
| 368 | vmovdqa %xmm1,(%rsi) |
| 369 | |
| 370 | vmovdqa con1(%rip),%xmm0 |
| 371 | vmovdqa mask(%rip),%xmm15 |
| 372 | |
| 373 | movq $8,%rax |
| 374 | |
| 375 | L$ks128_loop: |
| 376 | addq $16,%rsi |
| 377 | subq $1,%rax |
| 378 | vpshufb %xmm15,%xmm1,%xmm2 |
| 379 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 380 | vpslld $1,%xmm0,%xmm0 |
| 381 | vpslldq $4,%xmm1,%xmm3 |
| 382 | vpxor %xmm3,%xmm1,%xmm1 |
| 383 | vpslldq $4,%xmm3,%xmm3 |
| 384 | vpxor %xmm3,%xmm1,%xmm1 |
| 385 | vpslldq $4,%xmm3,%xmm3 |
| 386 | vpxor %xmm3,%xmm1,%xmm1 |
| 387 | vpxor %xmm2,%xmm1,%xmm1 |
| 388 | vmovdqa %xmm1,(%rsi) |
| 389 | jne L$ks128_loop |
| 390 | |
| 391 | vmovdqa con2(%rip),%xmm0 |
| 392 | vpshufb %xmm15,%xmm1,%xmm2 |
| 393 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 394 | vpslld $1,%xmm0,%xmm0 |
| 395 | vpslldq $4,%xmm1,%xmm3 |
| 396 | vpxor %xmm3,%xmm1,%xmm1 |
| 397 | vpslldq $4,%xmm3,%xmm3 |
| 398 | vpxor %xmm3,%xmm1,%xmm1 |
| 399 | vpslldq $4,%xmm3,%xmm3 |
| 400 | vpxor %xmm3,%xmm1,%xmm1 |
| 401 | vpxor %xmm2,%xmm1,%xmm1 |
| 402 | vmovdqa %xmm1,16(%rsi) |
| 403 | |
| 404 | vpshufb %xmm15,%xmm1,%xmm2 |
| 405 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 406 | vpslldq $4,%xmm1,%xmm3 |
| 407 | vpxor %xmm3,%xmm1,%xmm1 |
| 408 | vpslldq $4,%xmm3,%xmm3 |
| 409 | vpxor %xmm3,%xmm1,%xmm1 |
| 410 | vpslldq $4,%xmm3,%xmm3 |
| 411 | vpxor %xmm3,%xmm1,%xmm1 |
| 412 | vpxor %xmm2,%xmm1,%xmm1 |
| 413 | vmovdqa %xmm1,32(%rsi) |
| 414 | .byte 0xf3,0xc3 |
| 415 | |
| 416 | |
| 417 | .globl _aes256gcmsiv_aes_ks |
| 418 | .private_extern _aes256gcmsiv_aes_ks |
| 419 | |
| 420 | .p2align 4 |
| 421 | _aes256gcmsiv_aes_ks: |
| 422 | |
| 423 | vmovdqu (%rdi),%xmm1 |
| 424 | vmovdqu 16(%rdi),%xmm3 |
| 425 | vmovdqa %xmm1,(%rsi) |
| 426 | vmovdqa %xmm3,16(%rsi) |
| 427 | vmovdqa con1(%rip),%xmm0 |
| 428 | vmovdqa mask(%rip),%xmm15 |
| 429 | vpxor %xmm14,%xmm14,%xmm14 |
| 430 | movq $6,%rax |
| 431 | |
| 432 | L$ks256_loop: |
| 433 | addq $32,%rsi |
| 434 | subq $1,%rax |
| 435 | vpshufb %xmm15,%xmm3,%xmm2 |
| 436 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 437 | vpslld $1,%xmm0,%xmm0 |
| 438 | vpsllq $32,%xmm1,%xmm4 |
| 439 | vpxor %xmm4,%xmm1,%xmm1 |
| 440 | vpshufb con3(%rip),%xmm1,%xmm4 |
| 441 | vpxor %xmm4,%xmm1,%xmm1 |
| 442 | vpxor %xmm2,%xmm1,%xmm1 |
| 443 | vmovdqa %xmm1,(%rsi) |
| 444 | vpshufd $0xff,%xmm1,%xmm2 |
| 445 | vaesenclast %xmm14,%xmm2,%xmm2 |
| 446 | vpsllq $32,%xmm3,%xmm4 |
| 447 | vpxor %xmm4,%xmm3,%xmm3 |
| 448 | vpshufb con3(%rip),%xmm3,%xmm4 |
| 449 | vpxor %xmm4,%xmm3,%xmm3 |
| 450 | vpxor %xmm2,%xmm3,%xmm3 |
| 451 | vmovdqa %xmm3,16(%rsi) |
| 452 | jne L$ks256_loop |
| 453 | |
| 454 | vpshufb %xmm15,%xmm3,%xmm2 |
| 455 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 456 | vpsllq $32,%xmm1,%xmm4 |
| 457 | vpxor %xmm4,%xmm1,%xmm1 |
| 458 | vpshufb con3(%rip),%xmm1,%xmm4 |
| 459 | vpxor %xmm4,%xmm1,%xmm1 |
| 460 | vpxor %xmm2,%xmm1,%xmm1 |
| 461 | vmovdqa %xmm1,32(%rsi) |
| 462 | .byte 0xf3,0xc3 |
| 463 | |
| 464 | .globl _aes128gcmsiv_aes_ks_enc_x1 |
| 465 | .private_extern _aes128gcmsiv_aes_ks_enc_x1 |
| 466 | |
| 467 | .p2align 4 |
| 468 | _aes128gcmsiv_aes_ks_enc_x1: |
| 469 | |
| 470 | vmovdqa (%rcx),%xmm1 |
| 471 | vmovdqa 0(%rdi),%xmm4 |
| 472 | |
| 473 | vmovdqa %xmm1,(%rdx) |
| 474 | vpxor %xmm1,%xmm4,%xmm4 |
| 475 | |
| 476 | vmovdqa con1(%rip),%xmm0 |
| 477 | vmovdqa mask(%rip),%xmm15 |
| 478 | |
| 479 | vpshufb %xmm15,%xmm1,%xmm2 |
| 480 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 481 | vpslld $1,%xmm0,%xmm0 |
| 482 | vpsllq $32,%xmm1,%xmm3 |
| 483 | vpxor %xmm3,%xmm1,%xmm1 |
| 484 | vpshufb con3(%rip),%xmm1,%xmm3 |
| 485 | vpxor %xmm3,%xmm1,%xmm1 |
| 486 | vpxor %xmm2,%xmm1,%xmm1 |
| 487 | |
| 488 | vaesenc %xmm1,%xmm4,%xmm4 |
| 489 | vmovdqa %xmm1,16(%rdx) |
| 490 | |
| 491 | vpshufb %xmm15,%xmm1,%xmm2 |
| 492 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 493 | vpslld $1,%xmm0,%xmm0 |
| 494 | vpsllq $32,%xmm1,%xmm3 |
| 495 | vpxor %xmm3,%xmm1,%xmm1 |
| 496 | vpshufb con3(%rip),%xmm1,%xmm3 |
| 497 | vpxor %xmm3,%xmm1,%xmm1 |
| 498 | vpxor %xmm2,%xmm1,%xmm1 |
| 499 | |
| 500 | vaesenc %xmm1,%xmm4,%xmm4 |
| 501 | vmovdqa %xmm1,32(%rdx) |
| 502 | |
| 503 | vpshufb %xmm15,%xmm1,%xmm2 |
| 504 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 505 | vpslld $1,%xmm0,%xmm0 |
| 506 | vpsllq $32,%xmm1,%xmm3 |
| 507 | vpxor %xmm3,%xmm1,%xmm1 |
| 508 | vpshufb con3(%rip),%xmm1,%xmm3 |
| 509 | vpxor %xmm3,%xmm1,%xmm1 |
| 510 | vpxor %xmm2,%xmm1,%xmm1 |
| 511 | |
| 512 | vaesenc %xmm1,%xmm4,%xmm4 |
| 513 | vmovdqa %xmm1,48(%rdx) |
| 514 | |
| 515 | vpshufb %xmm15,%xmm1,%xmm2 |
| 516 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 517 | vpslld $1,%xmm0,%xmm0 |
| 518 | vpsllq $32,%xmm1,%xmm3 |
| 519 | vpxor %xmm3,%xmm1,%xmm1 |
| 520 | vpshufb con3(%rip),%xmm1,%xmm3 |
| 521 | vpxor %xmm3,%xmm1,%xmm1 |
| 522 | vpxor %xmm2,%xmm1,%xmm1 |
| 523 | |
| 524 | vaesenc %xmm1,%xmm4,%xmm4 |
| 525 | vmovdqa %xmm1,64(%rdx) |
| 526 | |
| 527 | vpshufb %xmm15,%xmm1,%xmm2 |
| 528 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 529 | vpslld $1,%xmm0,%xmm0 |
| 530 | vpsllq $32,%xmm1,%xmm3 |
| 531 | vpxor %xmm3,%xmm1,%xmm1 |
| 532 | vpshufb con3(%rip),%xmm1,%xmm3 |
| 533 | vpxor %xmm3,%xmm1,%xmm1 |
| 534 | vpxor %xmm2,%xmm1,%xmm1 |
| 535 | |
| 536 | vaesenc %xmm1,%xmm4,%xmm4 |
| 537 | vmovdqa %xmm1,80(%rdx) |
| 538 | |
| 539 | vpshufb %xmm15,%xmm1,%xmm2 |
| 540 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 541 | vpslld $1,%xmm0,%xmm0 |
| 542 | vpsllq $32,%xmm1,%xmm3 |
| 543 | vpxor %xmm3,%xmm1,%xmm1 |
| 544 | vpshufb con3(%rip),%xmm1,%xmm3 |
| 545 | vpxor %xmm3,%xmm1,%xmm1 |
| 546 | vpxor %xmm2,%xmm1,%xmm1 |
| 547 | |
| 548 | vaesenc %xmm1,%xmm4,%xmm4 |
| 549 | vmovdqa %xmm1,96(%rdx) |
| 550 | |
| 551 | vpshufb %xmm15,%xmm1,%xmm2 |
| 552 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 553 | vpslld $1,%xmm0,%xmm0 |
| 554 | vpsllq $32,%xmm1,%xmm3 |
| 555 | vpxor %xmm3,%xmm1,%xmm1 |
| 556 | vpshufb con3(%rip),%xmm1,%xmm3 |
| 557 | vpxor %xmm3,%xmm1,%xmm1 |
| 558 | vpxor %xmm2,%xmm1,%xmm1 |
| 559 | |
| 560 | vaesenc %xmm1,%xmm4,%xmm4 |
| 561 | vmovdqa %xmm1,112(%rdx) |
| 562 | |
| 563 | vpshufb %xmm15,%xmm1,%xmm2 |
| 564 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 565 | vpslld $1,%xmm0,%xmm0 |
| 566 | vpsllq $32,%xmm1,%xmm3 |
| 567 | vpxor %xmm3,%xmm1,%xmm1 |
| 568 | vpshufb con3(%rip),%xmm1,%xmm3 |
| 569 | vpxor %xmm3,%xmm1,%xmm1 |
| 570 | vpxor %xmm2,%xmm1,%xmm1 |
| 571 | |
| 572 | vaesenc %xmm1,%xmm4,%xmm4 |
| 573 | vmovdqa %xmm1,128(%rdx) |
| 574 | |
| 575 | |
| 576 | vmovdqa con2(%rip),%xmm0 |
| 577 | |
| 578 | vpshufb %xmm15,%xmm1,%xmm2 |
| 579 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 580 | vpslld $1,%xmm0,%xmm0 |
| 581 | vpsllq $32,%xmm1,%xmm3 |
| 582 | vpxor %xmm3,%xmm1,%xmm1 |
| 583 | vpshufb con3(%rip),%xmm1,%xmm3 |
| 584 | vpxor %xmm3,%xmm1,%xmm1 |
| 585 | vpxor %xmm2,%xmm1,%xmm1 |
| 586 | |
| 587 | vaesenc %xmm1,%xmm4,%xmm4 |
| 588 | vmovdqa %xmm1,144(%rdx) |
| 589 | |
| 590 | vpshufb %xmm15,%xmm1,%xmm2 |
| 591 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 592 | vpsllq $32,%xmm1,%xmm3 |
| 593 | vpxor %xmm3,%xmm1,%xmm1 |
| 594 | vpshufb con3(%rip),%xmm1,%xmm3 |
| 595 | vpxor %xmm3,%xmm1,%xmm1 |
| 596 | vpxor %xmm2,%xmm1,%xmm1 |
| 597 | |
| 598 | vaesenclast %xmm1,%xmm4,%xmm4 |
| 599 | vmovdqa %xmm1,160(%rdx) |
| 600 | |
| 601 | |
| 602 | vmovdqa %xmm4,0(%rsi) |
| 603 | .byte 0xf3,0xc3 |
| 604 | |
| 605 | |
| 606 | .globl _aes128gcmsiv_kdf |
| 607 | .private_extern _aes128gcmsiv_kdf |
| 608 | |
| 609 | .p2align 4 |
| 610 | _aes128gcmsiv_kdf: |
| 611 | |
| 612 | |
| 613 | |
| 614 | |
| 615 | |
| 616 | vmovdqa (%rdx),%xmm1 |
| 617 | vmovdqa 0(%rdi),%xmm9 |
| 618 | vmovdqa and_mask(%rip),%xmm12 |
| 619 | vmovdqa one(%rip),%xmm13 |
| 620 | vpshufd $0x90,%xmm9,%xmm9 |
| 621 | vpand %xmm12,%xmm9,%xmm9 |
| 622 | vpaddd %xmm13,%xmm9,%xmm10 |
| 623 | vpaddd %xmm13,%xmm10,%xmm11 |
| 624 | vpaddd %xmm13,%xmm11,%xmm12 |
| 625 | |
| 626 | vpxor %xmm1,%xmm9,%xmm9 |
| 627 | vpxor %xmm1,%xmm10,%xmm10 |
| 628 | vpxor %xmm1,%xmm11,%xmm11 |
| 629 | vpxor %xmm1,%xmm12,%xmm12 |
| 630 | |
| 631 | vmovdqa 16(%rdx),%xmm1 |
| 632 | vaesenc %xmm1,%xmm9,%xmm9 |
| 633 | vaesenc %xmm1,%xmm10,%xmm10 |
| 634 | vaesenc %xmm1,%xmm11,%xmm11 |
| 635 | vaesenc %xmm1,%xmm12,%xmm12 |
| 636 | |
| 637 | vmovdqa 32(%rdx),%xmm2 |
| 638 | vaesenc %xmm2,%xmm9,%xmm9 |
| 639 | vaesenc %xmm2,%xmm10,%xmm10 |
| 640 | vaesenc %xmm2,%xmm11,%xmm11 |
| 641 | vaesenc %xmm2,%xmm12,%xmm12 |
| 642 | |
| 643 | vmovdqa 48(%rdx),%xmm1 |
| 644 | vaesenc %xmm1,%xmm9,%xmm9 |
| 645 | vaesenc %xmm1,%xmm10,%xmm10 |
| 646 | vaesenc %xmm1,%xmm11,%xmm11 |
| 647 | vaesenc %xmm1,%xmm12,%xmm12 |
| 648 | |
| 649 | vmovdqa 64(%rdx),%xmm2 |
| 650 | vaesenc %xmm2,%xmm9,%xmm9 |
| 651 | vaesenc %xmm2,%xmm10,%xmm10 |
| 652 | vaesenc %xmm2,%xmm11,%xmm11 |
| 653 | vaesenc %xmm2,%xmm12,%xmm12 |
| 654 | |
| 655 | vmovdqa 80(%rdx),%xmm1 |
| 656 | vaesenc %xmm1,%xmm9,%xmm9 |
| 657 | vaesenc %xmm1,%xmm10,%xmm10 |
| 658 | vaesenc %xmm1,%xmm11,%xmm11 |
| 659 | vaesenc %xmm1,%xmm12,%xmm12 |
| 660 | |
| 661 | vmovdqa 96(%rdx),%xmm2 |
| 662 | vaesenc %xmm2,%xmm9,%xmm9 |
| 663 | vaesenc %xmm2,%xmm10,%xmm10 |
| 664 | vaesenc %xmm2,%xmm11,%xmm11 |
| 665 | vaesenc %xmm2,%xmm12,%xmm12 |
| 666 | |
| 667 | vmovdqa 112(%rdx),%xmm1 |
| 668 | vaesenc %xmm1,%xmm9,%xmm9 |
| 669 | vaesenc %xmm1,%xmm10,%xmm10 |
| 670 | vaesenc %xmm1,%xmm11,%xmm11 |
| 671 | vaesenc %xmm1,%xmm12,%xmm12 |
| 672 | |
| 673 | vmovdqa 128(%rdx),%xmm2 |
| 674 | vaesenc %xmm2,%xmm9,%xmm9 |
| 675 | vaesenc %xmm2,%xmm10,%xmm10 |
| 676 | vaesenc %xmm2,%xmm11,%xmm11 |
| 677 | vaesenc %xmm2,%xmm12,%xmm12 |
| 678 | |
| 679 | vmovdqa 144(%rdx),%xmm1 |
| 680 | vaesenc %xmm1,%xmm9,%xmm9 |
| 681 | vaesenc %xmm1,%xmm10,%xmm10 |
| 682 | vaesenc %xmm1,%xmm11,%xmm11 |
| 683 | vaesenc %xmm1,%xmm12,%xmm12 |
| 684 | |
| 685 | vmovdqa 160(%rdx),%xmm2 |
| 686 | vaesenclast %xmm2,%xmm9,%xmm9 |
| 687 | vaesenclast %xmm2,%xmm10,%xmm10 |
| 688 | vaesenclast %xmm2,%xmm11,%xmm11 |
| 689 | vaesenclast %xmm2,%xmm12,%xmm12 |
| 690 | |
| 691 | |
| 692 | vmovdqa %xmm9,0(%rsi) |
| 693 | vmovdqa %xmm10,16(%rsi) |
| 694 | vmovdqa %xmm11,32(%rsi) |
| 695 | vmovdqa %xmm12,48(%rsi) |
| 696 | .byte 0xf3,0xc3 |
| 697 | |
| 698 | |
| 699 | .globl _aes128gcmsiv_enc_msg_x4 |
| 700 | .private_extern _aes128gcmsiv_enc_msg_x4 |
| 701 | |
| 702 | .p2align 4 |
| 703 | _aes128gcmsiv_enc_msg_x4: |
| 704 | |
| 705 | testq %r8,%r8 |
| 706 | jnz L$128_enc_msg_x4_start |
| 707 | .byte 0xf3,0xc3 |
| 708 | |
| 709 | L$128_enc_msg_x4_start: |
| 710 | pushq %r12 |
| 711 | |
| 712 | pushq %r13 |
| 713 | |
| 714 | |
| 715 | shrq $4,%r8 |
| 716 | movq %r8,%r10 |
| 717 | shlq $62,%r10 |
| 718 | shrq $62,%r10 |
| 719 | |
| 720 | |
| 721 | vmovdqa (%rdx),%xmm15 |
| 722 | vpor OR_MASK(%rip),%xmm15,%xmm15 |
| 723 | |
| 724 | vmovdqu four(%rip),%xmm4 |
| 725 | vmovdqa %xmm15,%xmm0 |
| 726 | vpaddd one(%rip),%xmm15,%xmm1 |
| 727 | vpaddd two(%rip),%xmm15,%xmm2 |
| 728 | vpaddd three(%rip),%xmm15,%xmm3 |
| 729 | |
| 730 | shrq $2,%r8 |
| 731 | je L$128_enc_msg_x4_check_remainder |
| 732 | |
| 733 | subq $64,%rsi |
| 734 | subq $64,%rdi |
| 735 | |
| 736 | L$128_enc_msg_x4_loop1: |
| 737 | addq $64,%rsi |
| 738 | addq $64,%rdi |
| 739 | |
| 740 | vmovdqa %xmm0,%xmm5 |
| 741 | vmovdqa %xmm1,%xmm6 |
| 742 | vmovdqa %xmm2,%xmm7 |
| 743 | vmovdqa %xmm3,%xmm8 |
| 744 | |
| 745 | vpxor (%rcx),%xmm5,%xmm5 |
| 746 | vpxor (%rcx),%xmm6,%xmm6 |
| 747 | vpxor (%rcx),%xmm7,%xmm7 |
| 748 | vpxor (%rcx),%xmm8,%xmm8 |
| 749 | |
| 750 | vmovdqu 16(%rcx),%xmm12 |
| 751 | vaesenc %xmm12,%xmm5,%xmm5 |
| 752 | vaesenc %xmm12,%xmm6,%xmm6 |
| 753 | vaesenc %xmm12,%xmm7,%xmm7 |
| 754 | vaesenc %xmm12,%xmm8,%xmm8 |
| 755 | |
| 756 | vpaddd %xmm4,%xmm0,%xmm0 |
| 757 | vmovdqu 32(%rcx),%xmm12 |
| 758 | vaesenc %xmm12,%xmm5,%xmm5 |
| 759 | vaesenc %xmm12,%xmm6,%xmm6 |
| 760 | vaesenc %xmm12,%xmm7,%xmm7 |
| 761 | vaesenc %xmm12,%xmm8,%xmm8 |
| 762 | |
| 763 | vpaddd %xmm4,%xmm1,%xmm1 |
| 764 | vmovdqu 48(%rcx),%xmm12 |
| 765 | vaesenc %xmm12,%xmm5,%xmm5 |
| 766 | vaesenc %xmm12,%xmm6,%xmm6 |
| 767 | vaesenc %xmm12,%xmm7,%xmm7 |
| 768 | vaesenc %xmm12,%xmm8,%xmm8 |
| 769 | |
| 770 | vpaddd %xmm4,%xmm2,%xmm2 |
| 771 | vmovdqu 64(%rcx),%xmm12 |
| 772 | vaesenc %xmm12,%xmm5,%xmm5 |
| 773 | vaesenc %xmm12,%xmm6,%xmm6 |
| 774 | vaesenc %xmm12,%xmm7,%xmm7 |
| 775 | vaesenc %xmm12,%xmm8,%xmm8 |
| 776 | |
| 777 | vpaddd %xmm4,%xmm3,%xmm3 |
| 778 | |
| 779 | vmovdqu 80(%rcx),%xmm12 |
| 780 | vaesenc %xmm12,%xmm5,%xmm5 |
| 781 | vaesenc %xmm12,%xmm6,%xmm6 |
| 782 | vaesenc %xmm12,%xmm7,%xmm7 |
| 783 | vaesenc %xmm12,%xmm8,%xmm8 |
| 784 | |
| 785 | vmovdqu 96(%rcx),%xmm12 |
| 786 | vaesenc %xmm12,%xmm5,%xmm5 |
| 787 | vaesenc %xmm12,%xmm6,%xmm6 |
| 788 | vaesenc %xmm12,%xmm7,%xmm7 |
| 789 | vaesenc %xmm12,%xmm8,%xmm8 |
| 790 | |
| 791 | vmovdqu 112(%rcx),%xmm12 |
| 792 | vaesenc %xmm12,%xmm5,%xmm5 |
| 793 | vaesenc %xmm12,%xmm6,%xmm6 |
| 794 | vaesenc %xmm12,%xmm7,%xmm7 |
| 795 | vaesenc %xmm12,%xmm8,%xmm8 |
| 796 | |
| 797 | vmovdqu 128(%rcx),%xmm12 |
| 798 | vaesenc %xmm12,%xmm5,%xmm5 |
| 799 | vaesenc %xmm12,%xmm6,%xmm6 |
| 800 | vaesenc %xmm12,%xmm7,%xmm7 |
| 801 | vaesenc %xmm12,%xmm8,%xmm8 |
| 802 | |
| 803 | vmovdqu 144(%rcx),%xmm12 |
| 804 | vaesenc %xmm12,%xmm5,%xmm5 |
| 805 | vaesenc %xmm12,%xmm6,%xmm6 |
| 806 | vaesenc %xmm12,%xmm7,%xmm7 |
| 807 | vaesenc %xmm12,%xmm8,%xmm8 |
| 808 | |
| 809 | vmovdqu 160(%rcx),%xmm12 |
| 810 | vaesenclast %xmm12,%xmm5,%xmm5 |
| 811 | vaesenclast %xmm12,%xmm6,%xmm6 |
| 812 | vaesenclast %xmm12,%xmm7,%xmm7 |
| 813 | vaesenclast %xmm12,%xmm8,%xmm8 |
| 814 | |
| 815 | |
| 816 | |
| 817 | vpxor 0(%rdi),%xmm5,%xmm5 |
| 818 | vpxor 16(%rdi),%xmm6,%xmm6 |
| 819 | vpxor 32(%rdi),%xmm7,%xmm7 |
| 820 | vpxor 48(%rdi),%xmm8,%xmm8 |
| 821 | |
| 822 | subq $1,%r8 |
| 823 | |
| 824 | vmovdqu %xmm5,0(%rsi) |
| 825 | vmovdqu %xmm6,16(%rsi) |
| 826 | vmovdqu %xmm7,32(%rsi) |
| 827 | vmovdqu %xmm8,48(%rsi) |
| 828 | |
| 829 | jne L$128_enc_msg_x4_loop1 |
| 830 | |
| 831 | addq $64,%rsi |
| 832 | addq $64,%rdi |
| 833 | |
| 834 | L$128_enc_msg_x4_check_remainder: |
| 835 | cmpq $0,%r10 |
| 836 | je L$128_enc_msg_x4_out |
| 837 | |
| 838 | L$128_enc_msg_x4_loop2: |
| 839 | |
| 840 | |
| 841 | vmovdqa %xmm0,%xmm5 |
| 842 | vpaddd one(%rip),%xmm0,%xmm0 |
| 843 | |
| 844 | vpxor (%rcx),%xmm5,%xmm5 |
| 845 | vaesenc 16(%rcx),%xmm5,%xmm5 |
| 846 | vaesenc 32(%rcx),%xmm5,%xmm5 |
| 847 | vaesenc 48(%rcx),%xmm5,%xmm5 |
| 848 | vaesenc 64(%rcx),%xmm5,%xmm5 |
| 849 | vaesenc 80(%rcx),%xmm5,%xmm5 |
| 850 | vaesenc 96(%rcx),%xmm5,%xmm5 |
| 851 | vaesenc 112(%rcx),%xmm5,%xmm5 |
| 852 | vaesenc 128(%rcx),%xmm5,%xmm5 |
| 853 | vaesenc 144(%rcx),%xmm5,%xmm5 |
| 854 | vaesenclast 160(%rcx),%xmm5,%xmm5 |
| 855 | |
| 856 | |
| 857 | vpxor (%rdi),%xmm5,%xmm5 |
| 858 | vmovdqu %xmm5,(%rsi) |
| 859 | |
| 860 | addq $16,%rdi |
| 861 | addq $16,%rsi |
| 862 | |
| 863 | subq $1,%r10 |
| 864 | jne L$128_enc_msg_x4_loop2 |
| 865 | |
| 866 | L$128_enc_msg_x4_out: |
| 867 | popq %r13 |
| 868 | |
| 869 | popq %r12 |
| 870 | |
| 871 | .byte 0xf3,0xc3 |
| 872 | |
| 873 | |
| 874 | .globl _aes128gcmsiv_enc_msg_x8 |
| 875 | .private_extern _aes128gcmsiv_enc_msg_x8 |
| 876 | |
| 877 | .p2align 4 |
| 878 | _aes128gcmsiv_enc_msg_x8: |
| 879 | |
| 880 | testq %r8,%r8 |
| 881 | jnz L$128_enc_msg_x8_start |
| 882 | .byte 0xf3,0xc3 |
| 883 | |
| 884 | L$128_enc_msg_x8_start: |
| 885 | pushq %r12 |
| 886 | |
| 887 | pushq %r13 |
| 888 | |
| 889 | pushq %rbp |
| 890 | |
| 891 | movq %rsp,%rbp |
| 892 | |
| 893 | |
| 894 | |
| 895 | subq $128,%rsp |
| 896 | andq $-64,%rsp |
| 897 | |
| 898 | shrq $4,%r8 |
| 899 | movq %r8,%r10 |
| 900 | shlq $61,%r10 |
| 901 | shrq $61,%r10 |
| 902 | |
| 903 | |
| 904 | vmovdqu (%rdx),%xmm1 |
| 905 | vpor OR_MASK(%rip),%xmm1,%xmm1 |
| 906 | |
| 907 | |
| 908 | vpaddd seven(%rip),%xmm1,%xmm0 |
| 909 | vmovdqu %xmm0,(%rsp) |
| 910 | vpaddd one(%rip),%xmm1,%xmm9 |
| 911 | vpaddd two(%rip),%xmm1,%xmm10 |
| 912 | vpaddd three(%rip),%xmm1,%xmm11 |
| 913 | vpaddd four(%rip),%xmm1,%xmm12 |
| 914 | vpaddd five(%rip),%xmm1,%xmm13 |
| 915 | vpaddd six(%rip),%xmm1,%xmm14 |
| 916 | vmovdqa %xmm1,%xmm0 |
| 917 | |
| 918 | shrq $3,%r8 |
| 919 | je L$128_enc_msg_x8_check_remainder |
| 920 | |
| 921 | subq $128,%rsi |
| 922 | subq $128,%rdi |
| 923 | |
| 924 | L$128_enc_msg_x8_loop1: |
| 925 | addq $128,%rsi |
| 926 | addq $128,%rdi |
| 927 | |
| 928 | vmovdqa %xmm0,%xmm1 |
| 929 | vmovdqa %xmm9,%xmm2 |
| 930 | vmovdqa %xmm10,%xmm3 |
| 931 | vmovdqa %xmm11,%xmm4 |
| 932 | vmovdqa %xmm12,%xmm5 |
| 933 | vmovdqa %xmm13,%xmm6 |
| 934 | vmovdqa %xmm14,%xmm7 |
| 935 | |
| 936 | vmovdqu (%rsp),%xmm8 |
| 937 | |
| 938 | vpxor (%rcx),%xmm1,%xmm1 |
| 939 | vpxor (%rcx),%xmm2,%xmm2 |
| 940 | vpxor (%rcx),%xmm3,%xmm3 |
| 941 | vpxor (%rcx),%xmm4,%xmm4 |
| 942 | vpxor (%rcx),%xmm5,%xmm5 |
| 943 | vpxor (%rcx),%xmm6,%xmm6 |
| 944 | vpxor (%rcx),%xmm7,%xmm7 |
| 945 | vpxor (%rcx),%xmm8,%xmm8 |
| 946 | |
| 947 | vmovdqu 16(%rcx),%xmm15 |
| 948 | vaesenc %xmm15,%xmm1,%xmm1 |
| 949 | vaesenc %xmm15,%xmm2,%xmm2 |
| 950 | vaesenc %xmm15,%xmm3,%xmm3 |
| 951 | vaesenc %xmm15,%xmm4,%xmm4 |
| 952 | vaesenc %xmm15,%xmm5,%xmm5 |
| 953 | vaesenc %xmm15,%xmm6,%xmm6 |
| 954 | vaesenc %xmm15,%xmm7,%xmm7 |
| 955 | vaesenc %xmm15,%xmm8,%xmm8 |
| 956 | |
| 957 | vmovdqu (%rsp),%xmm14 |
| 958 | vpaddd eight(%rip),%xmm14,%xmm14 |
| 959 | vmovdqu %xmm14,(%rsp) |
| 960 | vmovdqu 32(%rcx),%xmm15 |
| 961 | vaesenc %xmm15,%xmm1,%xmm1 |
| 962 | vaesenc %xmm15,%xmm2,%xmm2 |
| 963 | vaesenc %xmm15,%xmm3,%xmm3 |
| 964 | vaesenc %xmm15,%xmm4,%xmm4 |
| 965 | vaesenc %xmm15,%xmm5,%xmm5 |
| 966 | vaesenc %xmm15,%xmm6,%xmm6 |
| 967 | vaesenc %xmm15,%xmm7,%xmm7 |
| 968 | vaesenc %xmm15,%xmm8,%xmm8 |
| 969 | |
| 970 | vpsubd one(%rip),%xmm14,%xmm14 |
| 971 | vmovdqu 48(%rcx),%xmm15 |
| 972 | vaesenc %xmm15,%xmm1,%xmm1 |
| 973 | vaesenc %xmm15,%xmm2,%xmm2 |
| 974 | vaesenc %xmm15,%xmm3,%xmm3 |
| 975 | vaesenc %xmm15,%xmm4,%xmm4 |
| 976 | vaesenc %xmm15,%xmm5,%xmm5 |
| 977 | vaesenc %xmm15,%xmm6,%xmm6 |
| 978 | vaesenc %xmm15,%xmm7,%xmm7 |
| 979 | vaesenc %xmm15,%xmm8,%xmm8 |
| 980 | |
| 981 | vpaddd eight(%rip),%xmm0,%xmm0 |
| 982 | vmovdqu 64(%rcx),%xmm15 |
| 983 | vaesenc %xmm15,%xmm1,%xmm1 |
| 984 | vaesenc %xmm15,%xmm2,%xmm2 |
| 985 | vaesenc %xmm15,%xmm3,%xmm3 |
| 986 | vaesenc %xmm15,%xmm4,%xmm4 |
| 987 | vaesenc %xmm15,%xmm5,%xmm5 |
| 988 | vaesenc %xmm15,%xmm6,%xmm6 |
| 989 | vaesenc %xmm15,%xmm7,%xmm7 |
| 990 | vaesenc %xmm15,%xmm8,%xmm8 |
| 991 | |
| 992 | vpaddd eight(%rip),%xmm9,%xmm9 |
| 993 | vmovdqu 80(%rcx),%xmm15 |
| 994 | vaesenc %xmm15,%xmm1,%xmm1 |
| 995 | vaesenc %xmm15,%xmm2,%xmm2 |
| 996 | vaesenc %xmm15,%xmm3,%xmm3 |
| 997 | vaesenc %xmm15,%xmm4,%xmm4 |
| 998 | vaesenc %xmm15,%xmm5,%xmm5 |
| 999 | vaesenc %xmm15,%xmm6,%xmm6 |
| 1000 | vaesenc %xmm15,%xmm7,%xmm7 |
| 1001 | vaesenc %xmm15,%xmm8,%xmm8 |
| 1002 | |
| 1003 | vpaddd eight(%rip),%xmm10,%xmm10 |
| 1004 | vmovdqu 96(%rcx),%xmm15 |
| 1005 | vaesenc %xmm15,%xmm1,%xmm1 |
| 1006 | vaesenc %xmm15,%xmm2,%xmm2 |
| 1007 | vaesenc %xmm15,%xmm3,%xmm3 |
| 1008 | vaesenc %xmm15,%xmm4,%xmm4 |
| 1009 | vaesenc %xmm15,%xmm5,%xmm5 |
| 1010 | vaesenc %xmm15,%xmm6,%xmm6 |
| 1011 | vaesenc %xmm15,%xmm7,%xmm7 |
| 1012 | vaesenc %xmm15,%xmm8,%xmm8 |
| 1013 | |
| 1014 | vpaddd eight(%rip),%xmm11,%xmm11 |
| 1015 | vmovdqu 112(%rcx),%xmm15 |
| 1016 | vaesenc %xmm15,%xmm1,%xmm1 |
| 1017 | vaesenc %xmm15,%xmm2,%xmm2 |
| 1018 | vaesenc %xmm15,%xmm3,%xmm3 |
| 1019 | vaesenc %xmm15,%xmm4,%xmm4 |
| 1020 | vaesenc %xmm15,%xmm5,%xmm5 |
| 1021 | vaesenc %xmm15,%xmm6,%xmm6 |
| 1022 | vaesenc %xmm15,%xmm7,%xmm7 |
| 1023 | vaesenc %xmm15,%xmm8,%xmm8 |
| 1024 | |
| 1025 | vpaddd eight(%rip),%xmm12,%xmm12 |
| 1026 | vmovdqu 128(%rcx),%xmm15 |
| 1027 | vaesenc %xmm15,%xmm1,%xmm1 |
| 1028 | vaesenc %xmm15,%xmm2,%xmm2 |
| 1029 | vaesenc %xmm15,%xmm3,%xmm3 |
| 1030 | vaesenc %xmm15,%xmm4,%xmm4 |
| 1031 | vaesenc %xmm15,%xmm5,%xmm5 |
| 1032 | vaesenc %xmm15,%xmm6,%xmm6 |
| 1033 | vaesenc %xmm15,%xmm7,%xmm7 |
| 1034 | vaesenc %xmm15,%xmm8,%xmm8 |
| 1035 | |
| 1036 | vpaddd eight(%rip),%xmm13,%xmm13 |
| 1037 | vmovdqu 144(%rcx),%xmm15 |
| 1038 | vaesenc %xmm15,%xmm1,%xmm1 |
| 1039 | vaesenc %xmm15,%xmm2,%xmm2 |
| 1040 | vaesenc %xmm15,%xmm3,%xmm3 |
| 1041 | vaesenc %xmm15,%xmm4,%xmm4 |
| 1042 | vaesenc %xmm15,%xmm5,%xmm5 |
| 1043 | vaesenc %xmm15,%xmm6,%xmm6 |
| 1044 | vaesenc %xmm15,%xmm7,%xmm7 |
| 1045 | vaesenc %xmm15,%xmm8,%xmm8 |
| 1046 | |
| 1047 | vmovdqu 160(%rcx),%xmm15 |
| 1048 | vaesenclast %xmm15,%xmm1,%xmm1 |
| 1049 | vaesenclast %xmm15,%xmm2,%xmm2 |
| 1050 | vaesenclast %xmm15,%xmm3,%xmm3 |
| 1051 | vaesenclast %xmm15,%xmm4,%xmm4 |
| 1052 | vaesenclast %xmm15,%xmm5,%xmm5 |
| 1053 | vaesenclast %xmm15,%xmm6,%xmm6 |
| 1054 | vaesenclast %xmm15,%xmm7,%xmm7 |
| 1055 | vaesenclast %xmm15,%xmm8,%xmm8 |
| 1056 | |
| 1057 | |
| 1058 | |
| 1059 | vpxor 0(%rdi),%xmm1,%xmm1 |
| 1060 | vpxor 16(%rdi),%xmm2,%xmm2 |
| 1061 | vpxor 32(%rdi),%xmm3,%xmm3 |
| 1062 | vpxor 48(%rdi),%xmm4,%xmm4 |
| 1063 | vpxor 64(%rdi),%xmm5,%xmm5 |
| 1064 | vpxor 80(%rdi),%xmm6,%xmm6 |
| 1065 | vpxor 96(%rdi),%xmm7,%xmm7 |
| 1066 | vpxor 112(%rdi),%xmm8,%xmm8 |
| 1067 | |
| 1068 | decq %r8 |
| 1069 | |
| 1070 | vmovdqu %xmm1,0(%rsi) |
| 1071 | vmovdqu %xmm2,16(%rsi) |
| 1072 | vmovdqu %xmm3,32(%rsi) |
| 1073 | vmovdqu %xmm4,48(%rsi) |
| 1074 | vmovdqu %xmm5,64(%rsi) |
| 1075 | vmovdqu %xmm6,80(%rsi) |
| 1076 | vmovdqu %xmm7,96(%rsi) |
| 1077 | vmovdqu %xmm8,112(%rsi) |
| 1078 | |
| 1079 | jne L$128_enc_msg_x8_loop1 |
| 1080 | |
| 1081 | addq $128,%rsi |
| 1082 | addq $128,%rdi |
| 1083 | |
| 1084 | L$128_enc_msg_x8_check_remainder: |
| 1085 | cmpq $0,%r10 |
| 1086 | je L$128_enc_msg_x8_out |
| 1087 | |
| 1088 | L$128_enc_msg_x8_loop2: |
| 1089 | |
| 1090 | |
| 1091 | vmovdqa %xmm0,%xmm1 |
| 1092 | vpaddd one(%rip),%xmm0,%xmm0 |
| 1093 | |
| 1094 | vpxor (%rcx),%xmm1,%xmm1 |
| 1095 | vaesenc 16(%rcx),%xmm1,%xmm1 |
| 1096 | vaesenc 32(%rcx),%xmm1,%xmm1 |
| 1097 | vaesenc 48(%rcx),%xmm1,%xmm1 |
| 1098 | vaesenc 64(%rcx),%xmm1,%xmm1 |
| 1099 | vaesenc 80(%rcx),%xmm1,%xmm1 |
| 1100 | vaesenc 96(%rcx),%xmm1,%xmm1 |
| 1101 | vaesenc 112(%rcx),%xmm1,%xmm1 |
| 1102 | vaesenc 128(%rcx),%xmm1,%xmm1 |
| 1103 | vaesenc 144(%rcx),%xmm1,%xmm1 |
| 1104 | vaesenclast 160(%rcx),%xmm1,%xmm1 |
| 1105 | |
| 1106 | |
| 1107 | vpxor (%rdi),%xmm1,%xmm1 |
| 1108 | |
| 1109 | vmovdqu %xmm1,(%rsi) |
| 1110 | |
| 1111 | addq $16,%rdi |
| 1112 | addq $16,%rsi |
| 1113 | |
| 1114 | decq %r10 |
| 1115 | jne L$128_enc_msg_x8_loop2 |
| 1116 | |
| 1117 | L$128_enc_msg_x8_out: |
| 1118 | movq %rbp,%rsp |
| 1119 | |
| 1120 | popq %rbp |
| 1121 | |
| 1122 | popq %r13 |
| 1123 | |
| 1124 | popq %r12 |
| 1125 | |
| 1126 | .byte 0xf3,0xc3 |
| 1127 | |
| 1128 | |
| 1129 | .globl _aes128gcmsiv_dec |
| 1130 | .private_extern _aes128gcmsiv_dec |
| 1131 | |
| 1132 | .p2align 4 |
| 1133 | _aes128gcmsiv_dec: |
| 1134 | |
| 1135 | testq $~15,%r9 |
| 1136 | jnz L$128_dec_start |
| 1137 | .byte 0xf3,0xc3 |
| 1138 | |
| 1139 | L$128_dec_start: |
| 1140 | vzeroupper |
| 1141 | vmovdqa (%rdx),%xmm0 |
| 1142 | movq %rdx,%rax |
| 1143 | |
| 1144 | leaq 32(%rax),%rax |
| 1145 | leaq 32(%rcx),%rcx |
| 1146 | |
| 1147 | |
| 1148 | vmovdqu (%rdi,%r9,1),%xmm15 |
| 1149 | vpor OR_MASK(%rip),%xmm15,%xmm15 |
| 1150 | andq $~15,%r9 |
| 1151 | |
| 1152 | |
| 1153 | cmpq $96,%r9 |
| 1154 | jb L$128_dec_loop2 |
| 1155 | |
| 1156 | |
| 1157 | subq $96,%r9 |
| 1158 | vmovdqa %xmm15,%xmm7 |
| 1159 | vpaddd one(%rip),%xmm7,%xmm8 |
| 1160 | vpaddd two(%rip),%xmm7,%xmm9 |
| 1161 | vpaddd one(%rip),%xmm9,%xmm10 |
| 1162 | vpaddd two(%rip),%xmm9,%xmm11 |
| 1163 | vpaddd one(%rip),%xmm11,%xmm12 |
| 1164 | vpaddd two(%rip),%xmm11,%xmm15 |
| 1165 | |
| 1166 | vpxor (%r8),%xmm7,%xmm7 |
| 1167 | vpxor (%r8),%xmm8,%xmm8 |
| 1168 | vpxor (%r8),%xmm9,%xmm9 |
| 1169 | vpxor (%r8),%xmm10,%xmm10 |
| 1170 | vpxor (%r8),%xmm11,%xmm11 |
| 1171 | vpxor (%r8),%xmm12,%xmm12 |
| 1172 | |
| 1173 | vmovdqu 16(%r8),%xmm4 |
| 1174 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1175 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1176 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1177 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1178 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1179 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1180 | |
| 1181 | vmovdqu 32(%r8),%xmm4 |
| 1182 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1183 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1184 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1185 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1186 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1187 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1188 | |
| 1189 | vmovdqu 48(%r8),%xmm4 |
| 1190 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1191 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1192 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1193 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1194 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1195 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1196 | |
| 1197 | vmovdqu 64(%r8),%xmm4 |
| 1198 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1199 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1200 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1201 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1202 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1203 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1204 | |
| 1205 | vmovdqu 80(%r8),%xmm4 |
| 1206 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1207 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1208 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1209 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1210 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1211 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1212 | |
| 1213 | vmovdqu 96(%r8),%xmm4 |
| 1214 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1215 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1216 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1217 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1218 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1219 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1220 | |
| 1221 | vmovdqu 112(%r8),%xmm4 |
| 1222 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1223 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1224 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1225 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1226 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1227 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1228 | |
| 1229 | vmovdqu 128(%r8),%xmm4 |
| 1230 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1231 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1232 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1233 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1234 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1235 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1236 | |
| 1237 | vmovdqu 144(%r8),%xmm4 |
| 1238 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1239 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1240 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1241 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1242 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1243 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1244 | |
| 1245 | vmovdqu 160(%r8),%xmm4 |
| 1246 | vaesenclast %xmm4,%xmm7,%xmm7 |
| 1247 | vaesenclast %xmm4,%xmm8,%xmm8 |
| 1248 | vaesenclast %xmm4,%xmm9,%xmm9 |
| 1249 | vaesenclast %xmm4,%xmm10,%xmm10 |
| 1250 | vaesenclast %xmm4,%xmm11,%xmm11 |
| 1251 | vaesenclast %xmm4,%xmm12,%xmm12 |
| 1252 | |
| 1253 | |
| 1254 | vpxor 0(%rdi),%xmm7,%xmm7 |
| 1255 | vpxor 16(%rdi),%xmm8,%xmm8 |
| 1256 | vpxor 32(%rdi),%xmm9,%xmm9 |
| 1257 | vpxor 48(%rdi),%xmm10,%xmm10 |
| 1258 | vpxor 64(%rdi),%xmm11,%xmm11 |
| 1259 | vpxor 80(%rdi),%xmm12,%xmm12 |
| 1260 | |
| 1261 | vmovdqu %xmm7,0(%rsi) |
| 1262 | vmovdqu %xmm8,16(%rsi) |
| 1263 | vmovdqu %xmm9,32(%rsi) |
| 1264 | vmovdqu %xmm10,48(%rsi) |
| 1265 | vmovdqu %xmm11,64(%rsi) |
| 1266 | vmovdqu %xmm12,80(%rsi) |
| 1267 | |
| 1268 | addq $96,%rdi |
| 1269 | addq $96,%rsi |
| 1270 | jmp L$128_dec_loop1 |
| 1271 | |
| 1272 | |
| 1273 | .p2align 6 |
| 1274 | L$128_dec_loop1: |
| 1275 | cmpq $96,%r9 |
| 1276 | jb L$128_dec_finish_96 |
| 1277 | subq $96,%r9 |
| 1278 | |
| 1279 | vmovdqa %xmm12,%xmm6 |
| 1280 | vmovdqa %xmm11,16-32(%rax) |
| 1281 | vmovdqa %xmm10,32-32(%rax) |
| 1282 | vmovdqa %xmm9,48-32(%rax) |
| 1283 | vmovdqa %xmm8,64-32(%rax) |
| 1284 | vmovdqa %xmm7,80-32(%rax) |
| 1285 | |
| 1286 | vmovdqa %xmm15,%xmm7 |
| 1287 | vpaddd one(%rip),%xmm7,%xmm8 |
| 1288 | vpaddd two(%rip),%xmm7,%xmm9 |
| 1289 | vpaddd one(%rip),%xmm9,%xmm10 |
| 1290 | vpaddd two(%rip),%xmm9,%xmm11 |
| 1291 | vpaddd one(%rip),%xmm11,%xmm12 |
| 1292 | vpaddd two(%rip),%xmm11,%xmm15 |
| 1293 | |
| 1294 | vmovdqa (%r8),%xmm4 |
| 1295 | vpxor %xmm4,%xmm7,%xmm7 |
| 1296 | vpxor %xmm4,%xmm8,%xmm8 |
| 1297 | vpxor %xmm4,%xmm9,%xmm9 |
| 1298 | vpxor %xmm4,%xmm10,%xmm10 |
| 1299 | vpxor %xmm4,%xmm11,%xmm11 |
| 1300 | vpxor %xmm4,%xmm12,%xmm12 |
| 1301 | |
| 1302 | vmovdqu 0-32(%rcx),%xmm4 |
| 1303 | vpclmulqdq $0x11,%xmm4,%xmm6,%xmm2 |
| 1304 | vpclmulqdq $0x00,%xmm4,%xmm6,%xmm3 |
| 1305 | vpclmulqdq $0x01,%xmm4,%xmm6,%xmm1 |
| 1306 | vpclmulqdq $0x10,%xmm4,%xmm6,%xmm4 |
| 1307 | vpxor %xmm4,%xmm1,%xmm1 |
| 1308 | |
| 1309 | vmovdqu 16(%r8),%xmm4 |
| 1310 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1311 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1312 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1313 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1314 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1315 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1316 | |
| 1317 | vmovdqu -16(%rax),%xmm6 |
| 1318 | vmovdqu -16(%rcx),%xmm13 |
| 1319 | |
| 1320 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 1321 | vpxor %xmm4,%xmm1,%xmm1 |
| 1322 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 1323 | vpxor %xmm4,%xmm2,%xmm2 |
| 1324 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 1325 | vpxor %xmm4,%xmm3,%xmm3 |
| 1326 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 1327 | vpxor %xmm4,%xmm1,%xmm1 |
| 1328 | |
| 1329 | |
| 1330 | vmovdqu 32(%r8),%xmm4 |
| 1331 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1332 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1333 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1334 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1335 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1336 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1337 | |
| 1338 | vmovdqu 0(%rax),%xmm6 |
| 1339 | vmovdqu 0(%rcx),%xmm13 |
| 1340 | |
| 1341 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 1342 | vpxor %xmm4,%xmm1,%xmm1 |
| 1343 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 1344 | vpxor %xmm4,%xmm2,%xmm2 |
| 1345 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 1346 | vpxor %xmm4,%xmm3,%xmm3 |
| 1347 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 1348 | vpxor %xmm4,%xmm1,%xmm1 |
| 1349 | |
| 1350 | |
| 1351 | vmovdqu 48(%r8),%xmm4 |
| 1352 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1353 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1354 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1355 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1356 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1357 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1358 | |
| 1359 | vmovdqu 16(%rax),%xmm6 |
| 1360 | vmovdqu 16(%rcx),%xmm13 |
| 1361 | |
| 1362 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 1363 | vpxor %xmm4,%xmm1,%xmm1 |
| 1364 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 1365 | vpxor %xmm4,%xmm2,%xmm2 |
| 1366 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 1367 | vpxor %xmm4,%xmm3,%xmm3 |
| 1368 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 1369 | vpxor %xmm4,%xmm1,%xmm1 |
| 1370 | |
| 1371 | |
| 1372 | vmovdqu 64(%r8),%xmm4 |
| 1373 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1374 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1375 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1376 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1377 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1378 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1379 | |
| 1380 | vmovdqu 32(%rax),%xmm6 |
| 1381 | vmovdqu 32(%rcx),%xmm13 |
| 1382 | |
| 1383 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 1384 | vpxor %xmm4,%xmm1,%xmm1 |
| 1385 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 1386 | vpxor %xmm4,%xmm2,%xmm2 |
| 1387 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 1388 | vpxor %xmm4,%xmm3,%xmm3 |
| 1389 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 1390 | vpxor %xmm4,%xmm1,%xmm1 |
| 1391 | |
| 1392 | |
| 1393 | vmovdqu 80(%r8),%xmm4 |
| 1394 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1395 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1396 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1397 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1398 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1399 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1400 | |
| 1401 | vmovdqu 96(%r8),%xmm4 |
| 1402 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1403 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1404 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1405 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1406 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1407 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1408 | |
| 1409 | vmovdqu 112(%r8),%xmm4 |
| 1410 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1411 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1412 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1413 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1414 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1415 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1416 | |
| 1417 | |
| 1418 | vmovdqa 80-32(%rax),%xmm6 |
| 1419 | vpxor %xmm0,%xmm6,%xmm6 |
| 1420 | vmovdqu 80-32(%rcx),%xmm5 |
| 1421 | |
| 1422 | vpclmulqdq $0x01,%xmm5,%xmm6,%xmm4 |
| 1423 | vpxor %xmm4,%xmm1,%xmm1 |
| 1424 | vpclmulqdq $0x11,%xmm5,%xmm6,%xmm4 |
| 1425 | vpxor %xmm4,%xmm2,%xmm2 |
| 1426 | vpclmulqdq $0x00,%xmm5,%xmm6,%xmm4 |
| 1427 | vpxor %xmm4,%xmm3,%xmm3 |
| 1428 | vpclmulqdq $0x10,%xmm5,%xmm6,%xmm4 |
| 1429 | vpxor %xmm4,%xmm1,%xmm1 |
| 1430 | |
| 1431 | vmovdqu 128(%r8),%xmm4 |
| 1432 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1433 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1434 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1435 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1436 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1437 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1438 | |
| 1439 | |
| 1440 | vpsrldq $8,%xmm1,%xmm4 |
| 1441 | vpxor %xmm4,%xmm2,%xmm5 |
| 1442 | vpslldq $8,%xmm1,%xmm4 |
| 1443 | vpxor %xmm4,%xmm3,%xmm0 |
| 1444 | |
| 1445 | vmovdqa poly(%rip),%xmm3 |
| 1446 | |
| 1447 | vmovdqu 144(%r8),%xmm4 |
| 1448 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1449 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1450 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1451 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1452 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1453 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1454 | |
| 1455 | vmovdqu 160(%r8),%xmm6 |
| 1456 | vpalignr $8,%xmm0,%xmm0,%xmm2 |
| 1457 | vpclmulqdq $0x10,%xmm3,%xmm0,%xmm0 |
| 1458 | vpxor %xmm0,%xmm2,%xmm0 |
| 1459 | |
| 1460 | vpxor 0(%rdi),%xmm6,%xmm4 |
| 1461 | vaesenclast %xmm4,%xmm7,%xmm7 |
| 1462 | vpxor 16(%rdi),%xmm6,%xmm4 |
| 1463 | vaesenclast %xmm4,%xmm8,%xmm8 |
| 1464 | vpxor 32(%rdi),%xmm6,%xmm4 |
| 1465 | vaesenclast %xmm4,%xmm9,%xmm9 |
| 1466 | vpxor 48(%rdi),%xmm6,%xmm4 |
| 1467 | vaesenclast %xmm4,%xmm10,%xmm10 |
| 1468 | vpxor 64(%rdi),%xmm6,%xmm4 |
| 1469 | vaesenclast %xmm4,%xmm11,%xmm11 |
| 1470 | vpxor 80(%rdi),%xmm6,%xmm4 |
| 1471 | vaesenclast %xmm4,%xmm12,%xmm12 |
| 1472 | |
| 1473 | vpalignr $8,%xmm0,%xmm0,%xmm2 |
| 1474 | vpclmulqdq $0x10,%xmm3,%xmm0,%xmm0 |
| 1475 | vpxor %xmm0,%xmm2,%xmm0 |
| 1476 | |
| 1477 | vmovdqu %xmm7,0(%rsi) |
| 1478 | vmovdqu %xmm8,16(%rsi) |
| 1479 | vmovdqu %xmm9,32(%rsi) |
| 1480 | vmovdqu %xmm10,48(%rsi) |
| 1481 | vmovdqu %xmm11,64(%rsi) |
| 1482 | vmovdqu %xmm12,80(%rsi) |
| 1483 | |
| 1484 | vpxor %xmm5,%xmm0,%xmm0 |
| 1485 | |
| 1486 | leaq 96(%rdi),%rdi |
| 1487 | leaq 96(%rsi),%rsi |
| 1488 | jmp L$128_dec_loop1 |
| 1489 | |
| 1490 | L$128_dec_finish_96: |
| 1491 | vmovdqa %xmm12,%xmm6 |
| 1492 | vmovdqa %xmm11,16-32(%rax) |
| 1493 | vmovdqa %xmm10,32-32(%rax) |
| 1494 | vmovdqa %xmm9,48-32(%rax) |
| 1495 | vmovdqa %xmm8,64-32(%rax) |
| 1496 | vmovdqa %xmm7,80-32(%rax) |
| 1497 | |
| 1498 | vmovdqu 0-32(%rcx),%xmm4 |
| 1499 | vpclmulqdq $0x10,%xmm4,%xmm6,%xmm1 |
| 1500 | vpclmulqdq $0x11,%xmm4,%xmm6,%xmm2 |
| 1501 | vpclmulqdq $0x00,%xmm4,%xmm6,%xmm3 |
| 1502 | vpclmulqdq $0x01,%xmm4,%xmm6,%xmm4 |
| 1503 | vpxor %xmm4,%xmm1,%xmm1 |
| 1504 | |
| 1505 | vmovdqu -16(%rax),%xmm6 |
| 1506 | vmovdqu -16(%rcx),%xmm13 |
| 1507 | |
| 1508 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 1509 | vpxor %xmm4,%xmm1,%xmm1 |
| 1510 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 1511 | vpxor %xmm4,%xmm2,%xmm2 |
| 1512 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 1513 | vpxor %xmm4,%xmm3,%xmm3 |
| 1514 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 1515 | vpxor %xmm4,%xmm1,%xmm1 |
| 1516 | |
| 1517 | vmovdqu 0(%rax),%xmm6 |
| 1518 | vmovdqu 0(%rcx),%xmm13 |
| 1519 | |
| 1520 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 1521 | vpxor %xmm4,%xmm1,%xmm1 |
| 1522 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 1523 | vpxor %xmm4,%xmm2,%xmm2 |
| 1524 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 1525 | vpxor %xmm4,%xmm3,%xmm3 |
| 1526 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 1527 | vpxor %xmm4,%xmm1,%xmm1 |
| 1528 | |
| 1529 | vmovdqu 16(%rax),%xmm6 |
| 1530 | vmovdqu 16(%rcx),%xmm13 |
| 1531 | |
| 1532 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 1533 | vpxor %xmm4,%xmm1,%xmm1 |
| 1534 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 1535 | vpxor %xmm4,%xmm2,%xmm2 |
| 1536 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 1537 | vpxor %xmm4,%xmm3,%xmm3 |
| 1538 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 1539 | vpxor %xmm4,%xmm1,%xmm1 |
| 1540 | |
| 1541 | vmovdqu 32(%rax),%xmm6 |
| 1542 | vmovdqu 32(%rcx),%xmm13 |
| 1543 | |
| 1544 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 1545 | vpxor %xmm4,%xmm1,%xmm1 |
| 1546 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 1547 | vpxor %xmm4,%xmm2,%xmm2 |
| 1548 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 1549 | vpxor %xmm4,%xmm3,%xmm3 |
| 1550 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 1551 | vpxor %xmm4,%xmm1,%xmm1 |
| 1552 | |
| 1553 | |
| 1554 | vmovdqu 80-32(%rax),%xmm6 |
| 1555 | vpxor %xmm0,%xmm6,%xmm6 |
| 1556 | vmovdqu 80-32(%rcx),%xmm5 |
| 1557 | vpclmulqdq $0x11,%xmm5,%xmm6,%xmm4 |
| 1558 | vpxor %xmm4,%xmm2,%xmm2 |
| 1559 | vpclmulqdq $0x00,%xmm5,%xmm6,%xmm4 |
| 1560 | vpxor %xmm4,%xmm3,%xmm3 |
| 1561 | vpclmulqdq $0x10,%xmm5,%xmm6,%xmm4 |
| 1562 | vpxor %xmm4,%xmm1,%xmm1 |
| 1563 | vpclmulqdq $0x01,%xmm5,%xmm6,%xmm4 |
| 1564 | vpxor %xmm4,%xmm1,%xmm1 |
| 1565 | |
| 1566 | vpsrldq $8,%xmm1,%xmm4 |
| 1567 | vpxor %xmm4,%xmm2,%xmm5 |
| 1568 | vpslldq $8,%xmm1,%xmm4 |
| 1569 | vpxor %xmm4,%xmm3,%xmm0 |
| 1570 | |
| 1571 | vmovdqa poly(%rip),%xmm3 |
| 1572 | |
| 1573 | vpalignr $8,%xmm0,%xmm0,%xmm2 |
| 1574 | vpclmulqdq $0x10,%xmm3,%xmm0,%xmm0 |
| 1575 | vpxor %xmm0,%xmm2,%xmm0 |
| 1576 | |
| 1577 | vpalignr $8,%xmm0,%xmm0,%xmm2 |
| 1578 | vpclmulqdq $0x10,%xmm3,%xmm0,%xmm0 |
| 1579 | vpxor %xmm0,%xmm2,%xmm0 |
| 1580 | |
| 1581 | vpxor %xmm5,%xmm0,%xmm0 |
| 1582 | |
| 1583 | L$128_dec_loop2: |
| 1584 | |
| 1585 | |
| 1586 | |
| 1587 | cmpq $16,%r9 |
| 1588 | jb L$128_dec_out |
| 1589 | subq $16,%r9 |
| 1590 | |
| 1591 | vmovdqa %xmm15,%xmm2 |
| 1592 | vpaddd one(%rip),%xmm15,%xmm15 |
| 1593 | |
| 1594 | vpxor 0(%r8),%xmm2,%xmm2 |
| 1595 | vaesenc 16(%r8),%xmm2,%xmm2 |
| 1596 | vaesenc 32(%r8),%xmm2,%xmm2 |
| 1597 | vaesenc 48(%r8),%xmm2,%xmm2 |
| 1598 | vaesenc 64(%r8),%xmm2,%xmm2 |
| 1599 | vaesenc 80(%r8),%xmm2,%xmm2 |
| 1600 | vaesenc 96(%r8),%xmm2,%xmm2 |
| 1601 | vaesenc 112(%r8),%xmm2,%xmm2 |
| 1602 | vaesenc 128(%r8),%xmm2,%xmm2 |
| 1603 | vaesenc 144(%r8),%xmm2,%xmm2 |
| 1604 | vaesenclast 160(%r8),%xmm2,%xmm2 |
| 1605 | vpxor (%rdi),%xmm2,%xmm2 |
| 1606 | vmovdqu %xmm2,(%rsi) |
| 1607 | addq $16,%rdi |
| 1608 | addq $16,%rsi |
| 1609 | |
| 1610 | vpxor %xmm2,%xmm0,%xmm0 |
| 1611 | vmovdqa -32(%rcx),%xmm1 |
| 1612 | call GFMUL |
| 1613 | |
| 1614 | jmp L$128_dec_loop2 |
| 1615 | |
| 1616 | L$128_dec_out: |
| 1617 | vmovdqu %xmm0,(%rdx) |
| 1618 | .byte 0xf3,0xc3 |
| 1619 | |
| 1620 | |
| 1621 | .globl _aes128gcmsiv_ecb_enc_block |
| 1622 | .private_extern _aes128gcmsiv_ecb_enc_block |
| 1623 | |
| 1624 | .p2align 4 |
| 1625 | _aes128gcmsiv_ecb_enc_block: |
| 1626 | |
| 1627 | vmovdqa (%rdi),%xmm1 |
| 1628 | |
| 1629 | vpxor (%rdx),%xmm1,%xmm1 |
| 1630 | vaesenc 16(%rdx),%xmm1,%xmm1 |
| 1631 | vaesenc 32(%rdx),%xmm1,%xmm1 |
| 1632 | vaesenc 48(%rdx),%xmm1,%xmm1 |
| 1633 | vaesenc 64(%rdx),%xmm1,%xmm1 |
| 1634 | vaesenc 80(%rdx),%xmm1,%xmm1 |
| 1635 | vaesenc 96(%rdx),%xmm1,%xmm1 |
| 1636 | vaesenc 112(%rdx),%xmm1,%xmm1 |
| 1637 | vaesenc 128(%rdx),%xmm1,%xmm1 |
| 1638 | vaesenc 144(%rdx),%xmm1,%xmm1 |
| 1639 | vaesenclast 160(%rdx),%xmm1,%xmm1 |
| 1640 | |
| 1641 | vmovdqa %xmm1,(%rsi) |
| 1642 | |
| 1643 | .byte 0xf3,0xc3 |
| 1644 | |
| 1645 | |
| 1646 | .globl _aes256gcmsiv_aes_ks_enc_x1 |
| 1647 | .private_extern _aes256gcmsiv_aes_ks_enc_x1 |
| 1648 | |
| 1649 | .p2align 4 |
| 1650 | _aes256gcmsiv_aes_ks_enc_x1: |
| 1651 | |
| 1652 | vmovdqa con1(%rip),%xmm0 |
| 1653 | vmovdqa mask(%rip),%xmm15 |
| 1654 | vmovdqa (%rdi),%xmm8 |
| 1655 | vmovdqa (%rcx),%xmm1 |
| 1656 | vmovdqa 16(%rcx),%xmm3 |
| 1657 | vpxor %xmm1,%xmm8,%xmm8 |
| 1658 | vaesenc %xmm3,%xmm8,%xmm8 |
| 1659 | vmovdqu %xmm1,(%rdx) |
| 1660 | vmovdqu %xmm3,16(%rdx) |
| 1661 | vpxor %xmm14,%xmm14,%xmm14 |
| 1662 | |
| 1663 | vpshufb %xmm15,%xmm3,%xmm2 |
| 1664 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 1665 | vpslld $1,%xmm0,%xmm0 |
| 1666 | vpslldq $4,%xmm1,%xmm4 |
| 1667 | vpxor %xmm4,%xmm1,%xmm1 |
| 1668 | vpslldq $4,%xmm4,%xmm4 |
| 1669 | vpxor %xmm4,%xmm1,%xmm1 |
| 1670 | vpslldq $4,%xmm4,%xmm4 |
| 1671 | vpxor %xmm4,%xmm1,%xmm1 |
| 1672 | vpxor %xmm2,%xmm1,%xmm1 |
| 1673 | vaesenc %xmm1,%xmm8,%xmm8 |
| 1674 | vmovdqu %xmm1,32(%rdx) |
| 1675 | |
| 1676 | vpshufd $0xff,%xmm1,%xmm2 |
| 1677 | vaesenclast %xmm14,%xmm2,%xmm2 |
| 1678 | vpslldq $4,%xmm3,%xmm4 |
| 1679 | vpxor %xmm4,%xmm3,%xmm3 |
| 1680 | vpslldq $4,%xmm4,%xmm4 |
| 1681 | vpxor %xmm4,%xmm3,%xmm3 |
| 1682 | vpslldq $4,%xmm4,%xmm4 |
| 1683 | vpxor %xmm4,%xmm3,%xmm3 |
| 1684 | vpxor %xmm2,%xmm3,%xmm3 |
| 1685 | vaesenc %xmm3,%xmm8,%xmm8 |
| 1686 | vmovdqu %xmm3,48(%rdx) |
| 1687 | |
| 1688 | vpshufb %xmm15,%xmm3,%xmm2 |
| 1689 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 1690 | vpslld $1,%xmm0,%xmm0 |
| 1691 | vpslldq $4,%xmm1,%xmm4 |
| 1692 | vpxor %xmm4,%xmm1,%xmm1 |
| 1693 | vpslldq $4,%xmm4,%xmm4 |
| 1694 | vpxor %xmm4,%xmm1,%xmm1 |
| 1695 | vpslldq $4,%xmm4,%xmm4 |
| 1696 | vpxor %xmm4,%xmm1,%xmm1 |
| 1697 | vpxor %xmm2,%xmm1,%xmm1 |
| 1698 | vaesenc %xmm1,%xmm8,%xmm8 |
| 1699 | vmovdqu %xmm1,64(%rdx) |
| 1700 | |
| 1701 | vpshufd $0xff,%xmm1,%xmm2 |
| 1702 | vaesenclast %xmm14,%xmm2,%xmm2 |
| 1703 | vpslldq $4,%xmm3,%xmm4 |
| 1704 | vpxor %xmm4,%xmm3,%xmm3 |
| 1705 | vpslldq $4,%xmm4,%xmm4 |
| 1706 | vpxor %xmm4,%xmm3,%xmm3 |
| 1707 | vpslldq $4,%xmm4,%xmm4 |
| 1708 | vpxor %xmm4,%xmm3,%xmm3 |
| 1709 | vpxor %xmm2,%xmm3,%xmm3 |
| 1710 | vaesenc %xmm3,%xmm8,%xmm8 |
| 1711 | vmovdqu %xmm3,80(%rdx) |
| 1712 | |
| 1713 | vpshufb %xmm15,%xmm3,%xmm2 |
| 1714 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 1715 | vpslld $1,%xmm0,%xmm0 |
| 1716 | vpslldq $4,%xmm1,%xmm4 |
| 1717 | vpxor %xmm4,%xmm1,%xmm1 |
| 1718 | vpslldq $4,%xmm4,%xmm4 |
| 1719 | vpxor %xmm4,%xmm1,%xmm1 |
| 1720 | vpslldq $4,%xmm4,%xmm4 |
| 1721 | vpxor %xmm4,%xmm1,%xmm1 |
| 1722 | vpxor %xmm2,%xmm1,%xmm1 |
| 1723 | vaesenc %xmm1,%xmm8,%xmm8 |
| 1724 | vmovdqu %xmm1,96(%rdx) |
| 1725 | |
| 1726 | vpshufd $0xff,%xmm1,%xmm2 |
| 1727 | vaesenclast %xmm14,%xmm2,%xmm2 |
| 1728 | vpslldq $4,%xmm3,%xmm4 |
| 1729 | vpxor %xmm4,%xmm3,%xmm3 |
| 1730 | vpslldq $4,%xmm4,%xmm4 |
| 1731 | vpxor %xmm4,%xmm3,%xmm3 |
| 1732 | vpslldq $4,%xmm4,%xmm4 |
| 1733 | vpxor %xmm4,%xmm3,%xmm3 |
| 1734 | vpxor %xmm2,%xmm3,%xmm3 |
| 1735 | vaesenc %xmm3,%xmm8,%xmm8 |
| 1736 | vmovdqu %xmm3,112(%rdx) |
| 1737 | |
| 1738 | vpshufb %xmm15,%xmm3,%xmm2 |
| 1739 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 1740 | vpslld $1,%xmm0,%xmm0 |
| 1741 | vpslldq $4,%xmm1,%xmm4 |
| 1742 | vpxor %xmm4,%xmm1,%xmm1 |
| 1743 | vpslldq $4,%xmm4,%xmm4 |
| 1744 | vpxor %xmm4,%xmm1,%xmm1 |
| 1745 | vpslldq $4,%xmm4,%xmm4 |
| 1746 | vpxor %xmm4,%xmm1,%xmm1 |
| 1747 | vpxor %xmm2,%xmm1,%xmm1 |
| 1748 | vaesenc %xmm1,%xmm8,%xmm8 |
| 1749 | vmovdqu %xmm1,128(%rdx) |
| 1750 | |
| 1751 | vpshufd $0xff,%xmm1,%xmm2 |
| 1752 | vaesenclast %xmm14,%xmm2,%xmm2 |
| 1753 | vpslldq $4,%xmm3,%xmm4 |
| 1754 | vpxor %xmm4,%xmm3,%xmm3 |
| 1755 | vpslldq $4,%xmm4,%xmm4 |
| 1756 | vpxor %xmm4,%xmm3,%xmm3 |
| 1757 | vpslldq $4,%xmm4,%xmm4 |
| 1758 | vpxor %xmm4,%xmm3,%xmm3 |
| 1759 | vpxor %xmm2,%xmm3,%xmm3 |
| 1760 | vaesenc %xmm3,%xmm8,%xmm8 |
| 1761 | vmovdqu %xmm3,144(%rdx) |
| 1762 | |
| 1763 | vpshufb %xmm15,%xmm3,%xmm2 |
| 1764 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 1765 | vpslld $1,%xmm0,%xmm0 |
| 1766 | vpslldq $4,%xmm1,%xmm4 |
| 1767 | vpxor %xmm4,%xmm1,%xmm1 |
| 1768 | vpslldq $4,%xmm4,%xmm4 |
| 1769 | vpxor %xmm4,%xmm1,%xmm1 |
| 1770 | vpslldq $4,%xmm4,%xmm4 |
| 1771 | vpxor %xmm4,%xmm1,%xmm1 |
| 1772 | vpxor %xmm2,%xmm1,%xmm1 |
| 1773 | vaesenc %xmm1,%xmm8,%xmm8 |
| 1774 | vmovdqu %xmm1,160(%rdx) |
| 1775 | |
| 1776 | vpshufd $0xff,%xmm1,%xmm2 |
| 1777 | vaesenclast %xmm14,%xmm2,%xmm2 |
| 1778 | vpslldq $4,%xmm3,%xmm4 |
| 1779 | vpxor %xmm4,%xmm3,%xmm3 |
| 1780 | vpslldq $4,%xmm4,%xmm4 |
| 1781 | vpxor %xmm4,%xmm3,%xmm3 |
| 1782 | vpslldq $4,%xmm4,%xmm4 |
| 1783 | vpxor %xmm4,%xmm3,%xmm3 |
| 1784 | vpxor %xmm2,%xmm3,%xmm3 |
| 1785 | vaesenc %xmm3,%xmm8,%xmm8 |
| 1786 | vmovdqu %xmm3,176(%rdx) |
| 1787 | |
| 1788 | vpshufb %xmm15,%xmm3,%xmm2 |
| 1789 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 1790 | vpslld $1,%xmm0,%xmm0 |
| 1791 | vpslldq $4,%xmm1,%xmm4 |
| 1792 | vpxor %xmm4,%xmm1,%xmm1 |
| 1793 | vpslldq $4,%xmm4,%xmm4 |
| 1794 | vpxor %xmm4,%xmm1,%xmm1 |
| 1795 | vpslldq $4,%xmm4,%xmm4 |
| 1796 | vpxor %xmm4,%xmm1,%xmm1 |
| 1797 | vpxor %xmm2,%xmm1,%xmm1 |
| 1798 | vaesenc %xmm1,%xmm8,%xmm8 |
| 1799 | vmovdqu %xmm1,192(%rdx) |
| 1800 | |
| 1801 | vpshufd $0xff,%xmm1,%xmm2 |
| 1802 | vaesenclast %xmm14,%xmm2,%xmm2 |
| 1803 | vpslldq $4,%xmm3,%xmm4 |
| 1804 | vpxor %xmm4,%xmm3,%xmm3 |
| 1805 | vpslldq $4,%xmm4,%xmm4 |
| 1806 | vpxor %xmm4,%xmm3,%xmm3 |
| 1807 | vpslldq $4,%xmm4,%xmm4 |
| 1808 | vpxor %xmm4,%xmm3,%xmm3 |
| 1809 | vpxor %xmm2,%xmm3,%xmm3 |
| 1810 | vaesenc %xmm3,%xmm8,%xmm8 |
| 1811 | vmovdqu %xmm3,208(%rdx) |
| 1812 | |
| 1813 | vpshufb %xmm15,%xmm3,%xmm2 |
| 1814 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 1815 | vpslldq $4,%xmm1,%xmm4 |
| 1816 | vpxor %xmm4,%xmm1,%xmm1 |
| 1817 | vpslldq $4,%xmm4,%xmm4 |
| 1818 | vpxor %xmm4,%xmm1,%xmm1 |
| 1819 | vpslldq $4,%xmm4,%xmm4 |
| 1820 | vpxor %xmm4,%xmm1,%xmm1 |
| 1821 | vpxor %xmm2,%xmm1,%xmm1 |
| 1822 | vaesenclast %xmm1,%xmm8,%xmm8 |
| 1823 | vmovdqu %xmm1,224(%rdx) |
| 1824 | |
| 1825 | vmovdqa %xmm8,(%rsi) |
| 1826 | .byte 0xf3,0xc3 |
| 1827 | |
| 1828 | |
| 1829 | .globl _aes256gcmsiv_ecb_enc_block |
| 1830 | .private_extern _aes256gcmsiv_ecb_enc_block |
| 1831 | |
| 1832 | .p2align 4 |
| 1833 | _aes256gcmsiv_ecb_enc_block: |
| 1834 | |
| 1835 | vmovdqa (%rdi),%xmm1 |
| 1836 | vpxor (%rdx),%xmm1,%xmm1 |
| 1837 | vaesenc 16(%rdx),%xmm1,%xmm1 |
| 1838 | vaesenc 32(%rdx),%xmm1,%xmm1 |
| 1839 | vaesenc 48(%rdx),%xmm1,%xmm1 |
| 1840 | vaesenc 64(%rdx),%xmm1,%xmm1 |
| 1841 | vaesenc 80(%rdx),%xmm1,%xmm1 |
| 1842 | vaesenc 96(%rdx),%xmm1,%xmm1 |
| 1843 | vaesenc 112(%rdx),%xmm1,%xmm1 |
| 1844 | vaesenc 128(%rdx),%xmm1,%xmm1 |
| 1845 | vaesenc 144(%rdx),%xmm1,%xmm1 |
| 1846 | vaesenc 160(%rdx),%xmm1,%xmm1 |
| 1847 | vaesenc 176(%rdx),%xmm1,%xmm1 |
| 1848 | vaesenc 192(%rdx),%xmm1,%xmm1 |
| 1849 | vaesenc 208(%rdx),%xmm1,%xmm1 |
| 1850 | vaesenclast 224(%rdx),%xmm1,%xmm1 |
| 1851 | vmovdqa %xmm1,(%rsi) |
| 1852 | .byte 0xf3,0xc3 |
| 1853 | |
| 1854 | |
| 1855 | .globl _aes256gcmsiv_enc_msg_x4 |
| 1856 | .private_extern _aes256gcmsiv_enc_msg_x4 |
| 1857 | |
| 1858 | .p2align 4 |
| 1859 | _aes256gcmsiv_enc_msg_x4: |
| 1860 | |
| 1861 | testq %r8,%r8 |
| 1862 | jnz L$256_enc_msg_x4_start |
| 1863 | .byte 0xf3,0xc3 |
| 1864 | |
| 1865 | L$256_enc_msg_x4_start: |
| 1866 | movq %r8,%r10 |
| 1867 | shrq $4,%r8 |
| 1868 | shlq $60,%r10 |
| 1869 | jz L$256_enc_msg_x4_start2 |
| 1870 | addq $1,%r8 |
| 1871 | |
| 1872 | L$256_enc_msg_x4_start2: |
| 1873 | movq %r8,%r10 |
| 1874 | shlq $62,%r10 |
| 1875 | shrq $62,%r10 |
| 1876 | |
| 1877 | |
| 1878 | vmovdqa (%rdx),%xmm15 |
| 1879 | vpor OR_MASK(%rip),%xmm15,%xmm15 |
| 1880 | |
| 1881 | vmovdqa four(%rip),%xmm4 |
| 1882 | vmovdqa %xmm15,%xmm0 |
| 1883 | vpaddd one(%rip),%xmm15,%xmm1 |
| 1884 | vpaddd two(%rip),%xmm15,%xmm2 |
| 1885 | vpaddd three(%rip),%xmm15,%xmm3 |
| 1886 | |
| 1887 | shrq $2,%r8 |
| 1888 | je L$256_enc_msg_x4_check_remainder |
| 1889 | |
| 1890 | subq $64,%rsi |
| 1891 | subq $64,%rdi |
| 1892 | |
| 1893 | L$256_enc_msg_x4_loop1: |
| 1894 | addq $64,%rsi |
| 1895 | addq $64,%rdi |
| 1896 | |
| 1897 | vmovdqa %xmm0,%xmm5 |
| 1898 | vmovdqa %xmm1,%xmm6 |
| 1899 | vmovdqa %xmm2,%xmm7 |
| 1900 | vmovdqa %xmm3,%xmm8 |
| 1901 | |
| 1902 | vpxor (%rcx),%xmm5,%xmm5 |
| 1903 | vpxor (%rcx),%xmm6,%xmm6 |
| 1904 | vpxor (%rcx),%xmm7,%xmm7 |
| 1905 | vpxor (%rcx),%xmm8,%xmm8 |
| 1906 | |
| 1907 | vmovdqu 16(%rcx),%xmm12 |
| 1908 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1909 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1910 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1911 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1912 | |
| 1913 | vpaddd %xmm4,%xmm0,%xmm0 |
| 1914 | vmovdqu 32(%rcx),%xmm12 |
| 1915 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1916 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1917 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1918 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1919 | |
| 1920 | vpaddd %xmm4,%xmm1,%xmm1 |
| 1921 | vmovdqu 48(%rcx),%xmm12 |
| 1922 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1923 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1924 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1925 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1926 | |
| 1927 | vpaddd %xmm4,%xmm2,%xmm2 |
| 1928 | vmovdqu 64(%rcx),%xmm12 |
| 1929 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1930 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1931 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1932 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1933 | |
| 1934 | vpaddd %xmm4,%xmm3,%xmm3 |
| 1935 | |
| 1936 | vmovdqu 80(%rcx),%xmm12 |
| 1937 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1938 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1939 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1940 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1941 | |
| 1942 | vmovdqu 96(%rcx),%xmm12 |
| 1943 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1944 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1945 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1946 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1947 | |
| 1948 | vmovdqu 112(%rcx),%xmm12 |
| 1949 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1950 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1951 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1952 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1953 | |
| 1954 | vmovdqu 128(%rcx),%xmm12 |
| 1955 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1956 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1957 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1958 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1959 | |
| 1960 | vmovdqu 144(%rcx),%xmm12 |
| 1961 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1962 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1963 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1964 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1965 | |
| 1966 | vmovdqu 160(%rcx),%xmm12 |
| 1967 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1968 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1969 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1970 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1971 | |
| 1972 | vmovdqu 176(%rcx),%xmm12 |
| 1973 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1974 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1975 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1976 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1977 | |
| 1978 | vmovdqu 192(%rcx),%xmm12 |
| 1979 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1980 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1981 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1982 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1983 | |
| 1984 | vmovdqu 208(%rcx),%xmm12 |
| 1985 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1986 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1987 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1988 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1989 | |
| 1990 | vmovdqu 224(%rcx),%xmm12 |
| 1991 | vaesenclast %xmm12,%xmm5,%xmm5 |
| 1992 | vaesenclast %xmm12,%xmm6,%xmm6 |
| 1993 | vaesenclast %xmm12,%xmm7,%xmm7 |
| 1994 | vaesenclast %xmm12,%xmm8,%xmm8 |
| 1995 | |
| 1996 | |
| 1997 | |
| 1998 | vpxor 0(%rdi),%xmm5,%xmm5 |
| 1999 | vpxor 16(%rdi),%xmm6,%xmm6 |
| 2000 | vpxor 32(%rdi),%xmm7,%xmm7 |
| 2001 | vpxor 48(%rdi),%xmm8,%xmm8 |
| 2002 | |
| 2003 | subq $1,%r8 |
| 2004 | |
| 2005 | vmovdqu %xmm5,0(%rsi) |
| 2006 | vmovdqu %xmm6,16(%rsi) |
| 2007 | vmovdqu %xmm7,32(%rsi) |
| 2008 | vmovdqu %xmm8,48(%rsi) |
| 2009 | |
| 2010 | jne L$256_enc_msg_x4_loop1 |
| 2011 | |
| 2012 | addq $64,%rsi |
| 2013 | addq $64,%rdi |
| 2014 | |
| 2015 | L$256_enc_msg_x4_check_remainder: |
| 2016 | cmpq $0,%r10 |
| 2017 | je L$256_enc_msg_x4_out |
| 2018 | |
| 2019 | L$256_enc_msg_x4_loop2: |
| 2020 | |
| 2021 | |
| 2022 | |
| 2023 | vmovdqa %xmm0,%xmm5 |
| 2024 | vpaddd one(%rip),%xmm0,%xmm0 |
| 2025 | vpxor (%rcx),%xmm5,%xmm5 |
| 2026 | vaesenc 16(%rcx),%xmm5,%xmm5 |
| 2027 | vaesenc 32(%rcx),%xmm5,%xmm5 |
| 2028 | vaesenc 48(%rcx),%xmm5,%xmm5 |
| 2029 | vaesenc 64(%rcx),%xmm5,%xmm5 |
| 2030 | vaesenc 80(%rcx),%xmm5,%xmm5 |
| 2031 | vaesenc 96(%rcx),%xmm5,%xmm5 |
| 2032 | vaesenc 112(%rcx),%xmm5,%xmm5 |
| 2033 | vaesenc 128(%rcx),%xmm5,%xmm5 |
| 2034 | vaesenc 144(%rcx),%xmm5,%xmm5 |
| 2035 | vaesenc 160(%rcx),%xmm5,%xmm5 |
| 2036 | vaesenc 176(%rcx),%xmm5,%xmm5 |
| 2037 | vaesenc 192(%rcx),%xmm5,%xmm5 |
| 2038 | vaesenc 208(%rcx),%xmm5,%xmm5 |
| 2039 | vaesenclast 224(%rcx),%xmm5,%xmm5 |
| 2040 | |
| 2041 | |
| 2042 | vpxor (%rdi),%xmm5,%xmm5 |
| 2043 | |
| 2044 | vmovdqu %xmm5,(%rsi) |
| 2045 | |
| 2046 | addq $16,%rdi |
| 2047 | addq $16,%rsi |
| 2048 | |
| 2049 | subq $1,%r10 |
| 2050 | jne L$256_enc_msg_x4_loop2 |
| 2051 | |
| 2052 | L$256_enc_msg_x4_out: |
| 2053 | .byte 0xf3,0xc3 |
| 2054 | |
| 2055 | |
| 2056 | .globl _aes256gcmsiv_enc_msg_x8 |
| 2057 | .private_extern _aes256gcmsiv_enc_msg_x8 |
| 2058 | |
| 2059 | .p2align 4 |
| 2060 | _aes256gcmsiv_enc_msg_x8: |
| 2061 | |
| 2062 | testq %r8,%r8 |
| 2063 | jnz L$256_enc_msg_x8_start |
| 2064 | .byte 0xf3,0xc3 |
| 2065 | |
| 2066 | L$256_enc_msg_x8_start: |
| 2067 | |
| 2068 | movq %rsp,%r11 |
| 2069 | subq $16,%r11 |
| 2070 | andq $-64,%r11 |
| 2071 | |
| 2072 | movq %r8,%r10 |
| 2073 | shrq $4,%r8 |
| 2074 | shlq $60,%r10 |
| 2075 | jz L$256_enc_msg_x8_start2 |
| 2076 | addq $1,%r8 |
| 2077 | |
| 2078 | L$256_enc_msg_x8_start2: |
| 2079 | movq %r8,%r10 |
| 2080 | shlq $61,%r10 |
| 2081 | shrq $61,%r10 |
| 2082 | |
| 2083 | |
| 2084 | vmovdqa (%rdx),%xmm1 |
| 2085 | vpor OR_MASK(%rip),%xmm1,%xmm1 |
| 2086 | |
| 2087 | |
| 2088 | vpaddd seven(%rip),%xmm1,%xmm0 |
| 2089 | vmovdqa %xmm0,(%r11) |
| 2090 | vpaddd one(%rip),%xmm1,%xmm9 |
| 2091 | vpaddd two(%rip),%xmm1,%xmm10 |
| 2092 | vpaddd three(%rip),%xmm1,%xmm11 |
| 2093 | vpaddd four(%rip),%xmm1,%xmm12 |
| 2094 | vpaddd five(%rip),%xmm1,%xmm13 |
| 2095 | vpaddd six(%rip),%xmm1,%xmm14 |
| 2096 | vmovdqa %xmm1,%xmm0 |
| 2097 | |
| 2098 | shrq $3,%r8 |
| 2099 | jz L$256_enc_msg_x8_check_remainder |
| 2100 | |
| 2101 | subq $128,%rsi |
| 2102 | subq $128,%rdi |
| 2103 | |
| 2104 | L$256_enc_msg_x8_loop1: |
| 2105 | addq $128,%rsi |
| 2106 | addq $128,%rdi |
| 2107 | |
| 2108 | vmovdqa %xmm0,%xmm1 |
| 2109 | vmovdqa %xmm9,%xmm2 |
| 2110 | vmovdqa %xmm10,%xmm3 |
| 2111 | vmovdqa %xmm11,%xmm4 |
| 2112 | vmovdqa %xmm12,%xmm5 |
| 2113 | vmovdqa %xmm13,%xmm6 |
| 2114 | vmovdqa %xmm14,%xmm7 |
| 2115 | |
| 2116 | vmovdqa (%r11),%xmm8 |
| 2117 | |
| 2118 | vpxor (%rcx),%xmm1,%xmm1 |
| 2119 | vpxor (%rcx),%xmm2,%xmm2 |
| 2120 | vpxor (%rcx),%xmm3,%xmm3 |
| 2121 | vpxor (%rcx),%xmm4,%xmm4 |
| 2122 | vpxor (%rcx),%xmm5,%xmm5 |
| 2123 | vpxor (%rcx),%xmm6,%xmm6 |
| 2124 | vpxor (%rcx),%xmm7,%xmm7 |
| 2125 | vpxor (%rcx),%xmm8,%xmm8 |
| 2126 | |
| 2127 | vmovdqu 16(%rcx),%xmm15 |
| 2128 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2129 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2130 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2131 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2132 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2133 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2134 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2135 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2136 | |
| 2137 | vmovdqa (%r11),%xmm14 |
| 2138 | vpaddd eight(%rip),%xmm14,%xmm14 |
| 2139 | vmovdqa %xmm14,(%r11) |
| 2140 | vmovdqu 32(%rcx),%xmm15 |
| 2141 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2142 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2143 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2144 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2145 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2146 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2147 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2148 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2149 | |
| 2150 | vpsubd one(%rip),%xmm14,%xmm14 |
| 2151 | vmovdqu 48(%rcx),%xmm15 |
| 2152 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2153 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2154 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2155 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2156 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2157 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2158 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2159 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2160 | |
| 2161 | vpaddd eight(%rip),%xmm0,%xmm0 |
| 2162 | vmovdqu 64(%rcx),%xmm15 |
| 2163 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2164 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2165 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2166 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2167 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2168 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2169 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2170 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2171 | |
| 2172 | vpaddd eight(%rip),%xmm9,%xmm9 |
| 2173 | vmovdqu 80(%rcx),%xmm15 |
| 2174 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2175 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2176 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2177 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2178 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2179 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2180 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2181 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2182 | |
| 2183 | vpaddd eight(%rip),%xmm10,%xmm10 |
| 2184 | vmovdqu 96(%rcx),%xmm15 |
| 2185 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2186 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2187 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2188 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2189 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2190 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2191 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2192 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2193 | |
| 2194 | vpaddd eight(%rip),%xmm11,%xmm11 |
| 2195 | vmovdqu 112(%rcx),%xmm15 |
| 2196 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2197 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2198 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2199 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2200 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2201 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2202 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2203 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2204 | |
| 2205 | vpaddd eight(%rip),%xmm12,%xmm12 |
| 2206 | vmovdqu 128(%rcx),%xmm15 |
| 2207 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2208 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2209 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2210 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2211 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2212 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2213 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2214 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2215 | |
| 2216 | vpaddd eight(%rip),%xmm13,%xmm13 |
| 2217 | vmovdqu 144(%rcx),%xmm15 |
| 2218 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2219 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2220 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2221 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2222 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2223 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2224 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2225 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2226 | |
| 2227 | vmovdqu 160(%rcx),%xmm15 |
| 2228 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2229 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2230 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2231 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2232 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2233 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2234 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2235 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2236 | |
| 2237 | vmovdqu 176(%rcx),%xmm15 |
| 2238 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2239 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2240 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2241 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2242 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2243 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2244 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2245 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2246 | |
| 2247 | vmovdqu 192(%rcx),%xmm15 |
| 2248 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2249 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2250 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2251 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2252 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2253 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2254 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2255 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2256 | |
| 2257 | vmovdqu 208(%rcx),%xmm15 |
| 2258 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2259 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2260 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2261 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2262 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2263 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2264 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2265 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2266 | |
| 2267 | vmovdqu 224(%rcx),%xmm15 |
| 2268 | vaesenclast %xmm15,%xmm1,%xmm1 |
| 2269 | vaesenclast %xmm15,%xmm2,%xmm2 |
| 2270 | vaesenclast %xmm15,%xmm3,%xmm3 |
| 2271 | vaesenclast %xmm15,%xmm4,%xmm4 |
| 2272 | vaesenclast %xmm15,%xmm5,%xmm5 |
| 2273 | vaesenclast %xmm15,%xmm6,%xmm6 |
| 2274 | vaesenclast %xmm15,%xmm7,%xmm7 |
| 2275 | vaesenclast %xmm15,%xmm8,%xmm8 |
| 2276 | |
| 2277 | |
| 2278 | |
| 2279 | vpxor 0(%rdi),%xmm1,%xmm1 |
| 2280 | vpxor 16(%rdi),%xmm2,%xmm2 |
| 2281 | vpxor 32(%rdi),%xmm3,%xmm3 |
| 2282 | vpxor 48(%rdi),%xmm4,%xmm4 |
| 2283 | vpxor 64(%rdi),%xmm5,%xmm5 |
| 2284 | vpxor 80(%rdi),%xmm6,%xmm6 |
| 2285 | vpxor 96(%rdi),%xmm7,%xmm7 |
| 2286 | vpxor 112(%rdi),%xmm8,%xmm8 |
| 2287 | |
| 2288 | subq $1,%r8 |
| 2289 | |
| 2290 | vmovdqu %xmm1,0(%rsi) |
| 2291 | vmovdqu %xmm2,16(%rsi) |
| 2292 | vmovdqu %xmm3,32(%rsi) |
| 2293 | vmovdqu %xmm4,48(%rsi) |
| 2294 | vmovdqu %xmm5,64(%rsi) |
| 2295 | vmovdqu %xmm6,80(%rsi) |
| 2296 | vmovdqu %xmm7,96(%rsi) |
| 2297 | vmovdqu %xmm8,112(%rsi) |
| 2298 | |
| 2299 | jne L$256_enc_msg_x8_loop1 |
| 2300 | |
| 2301 | addq $128,%rsi |
| 2302 | addq $128,%rdi |
| 2303 | |
| 2304 | L$256_enc_msg_x8_check_remainder: |
| 2305 | cmpq $0,%r10 |
| 2306 | je L$256_enc_msg_x8_out |
| 2307 | |
| 2308 | L$256_enc_msg_x8_loop2: |
| 2309 | |
| 2310 | |
| 2311 | vmovdqa %xmm0,%xmm1 |
| 2312 | vpaddd one(%rip),%xmm0,%xmm0 |
| 2313 | |
| 2314 | vpxor (%rcx),%xmm1,%xmm1 |
| 2315 | vaesenc 16(%rcx),%xmm1,%xmm1 |
| 2316 | vaesenc 32(%rcx),%xmm1,%xmm1 |
| 2317 | vaesenc 48(%rcx),%xmm1,%xmm1 |
| 2318 | vaesenc 64(%rcx),%xmm1,%xmm1 |
| 2319 | vaesenc 80(%rcx),%xmm1,%xmm1 |
| 2320 | vaesenc 96(%rcx),%xmm1,%xmm1 |
| 2321 | vaesenc 112(%rcx),%xmm1,%xmm1 |
| 2322 | vaesenc 128(%rcx),%xmm1,%xmm1 |
| 2323 | vaesenc 144(%rcx),%xmm1,%xmm1 |
| 2324 | vaesenc 160(%rcx),%xmm1,%xmm1 |
| 2325 | vaesenc 176(%rcx),%xmm1,%xmm1 |
| 2326 | vaesenc 192(%rcx),%xmm1,%xmm1 |
| 2327 | vaesenc 208(%rcx),%xmm1,%xmm1 |
| 2328 | vaesenclast 224(%rcx),%xmm1,%xmm1 |
| 2329 | |
| 2330 | |
| 2331 | vpxor (%rdi),%xmm1,%xmm1 |
| 2332 | |
| 2333 | vmovdqu %xmm1,(%rsi) |
| 2334 | |
| 2335 | addq $16,%rdi |
| 2336 | addq $16,%rsi |
| 2337 | subq $1,%r10 |
| 2338 | jnz L$256_enc_msg_x8_loop2 |
| 2339 | |
| 2340 | L$256_enc_msg_x8_out: |
| 2341 | .byte 0xf3,0xc3 |
| 2342 | |
| 2343 | |
| 2344 | |
| 2345 | .globl _aes256gcmsiv_dec |
| 2346 | .private_extern _aes256gcmsiv_dec |
| 2347 | |
| 2348 | .p2align 4 |
| 2349 | _aes256gcmsiv_dec: |
| 2350 | |
| 2351 | testq $~15,%r9 |
| 2352 | jnz L$256_dec_start |
| 2353 | .byte 0xf3,0xc3 |
| 2354 | |
| 2355 | L$256_dec_start: |
| 2356 | vzeroupper |
| 2357 | vmovdqa (%rdx),%xmm0 |
| 2358 | movq %rdx,%rax |
| 2359 | |
| 2360 | leaq 32(%rax),%rax |
| 2361 | leaq 32(%rcx),%rcx |
| 2362 | |
| 2363 | |
| 2364 | vmovdqu (%rdi,%r9,1),%xmm15 |
| 2365 | vpor OR_MASK(%rip),%xmm15,%xmm15 |
| 2366 | andq $~15,%r9 |
| 2367 | |
| 2368 | |
| 2369 | cmpq $96,%r9 |
| 2370 | jb L$256_dec_loop2 |
| 2371 | |
| 2372 | |
| 2373 | subq $96,%r9 |
| 2374 | vmovdqa %xmm15,%xmm7 |
| 2375 | vpaddd one(%rip),%xmm7,%xmm8 |
| 2376 | vpaddd two(%rip),%xmm7,%xmm9 |
| 2377 | vpaddd one(%rip),%xmm9,%xmm10 |
| 2378 | vpaddd two(%rip),%xmm9,%xmm11 |
| 2379 | vpaddd one(%rip),%xmm11,%xmm12 |
| 2380 | vpaddd two(%rip),%xmm11,%xmm15 |
| 2381 | |
| 2382 | vpxor (%r8),%xmm7,%xmm7 |
| 2383 | vpxor (%r8),%xmm8,%xmm8 |
| 2384 | vpxor (%r8),%xmm9,%xmm9 |
| 2385 | vpxor (%r8),%xmm10,%xmm10 |
| 2386 | vpxor (%r8),%xmm11,%xmm11 |
| 2387 | vpxor (%r8),%xmm12,%xmm12 |
| 2388 | |
| 2389 | vmovdqu 16(%r8),%xmm4 |
| 2390 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2391 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2392 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2393 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2394 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2395 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2396 | |
| 2397 | vmovdqu 32(%r8),%xmm4 |
| 2398 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2399 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2400 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2401 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2402 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2403 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2404 | |
| 2405 | vmovdqu 48(%r8),%xmm4 |
| 2406 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2407 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2408 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2409 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2410 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2411 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2412 | |
| 2413 | vmovdqu 64(%r8),%xmm4 |
| 2414 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2415 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2416 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2417 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2418 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2419 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2420 | |
| 2421 | vmovdqu 80(%r8),%xmm4 |
| 2422 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2423 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2424 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2425 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2426 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2427 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2428 | |
| 2429 | vmovdqu 96(%r8),%xmm4 |
| 2430 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2431 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2432 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2433 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2434 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2435 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2436 | |
| 2437 | vmovdqu 112(%r8),%xmm4 |
| 2438 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2439 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2440 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2441 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2442 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2443 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2444 | |
| 2445 | vmovdqu 128(%r8),%xmm4 |
| 2446 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2447 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2448 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2449 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2450 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2451 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2452 | |
| 2453 | vmovdqu 144(%r8),%xmm4 |
| 2454 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2455 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2456 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2457 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2458 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2459 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2460 | |
| 2461 | vmovdqu 160(%r8),%xmm4 |
| 2462 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2463 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2464 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2465 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2466 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2467 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2468 | |
| 2469 | vmovdqu 176(%r8),%xmm4 |
| 2470 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2471 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2472 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2473 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2474 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2475 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2476 | |
| 2477 | vmovdqu 192(%r8),%xmm4 |
| 2478 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2479 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2480 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2481 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2482 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2483 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2484 | |
| 2485 | vmovdqu 208(%r8),%xmm4 |
| 2486 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2487 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2488 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2489 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2490 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2491 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2492 | |
| 2493 | vmovdqu 224(%r8),%xmm4 |
| 2494 | vaesenclast %xmm4,%xmm7,%xmm7 |
| 2495 | vaesenclast %xmm4,%xmm8,%xmm8 |
| 2496 | vaesenclast %xmm4,%xmm9,%xmm9 |
| 2497 | vaesenclast %xmm4,%xmm10,%xmm10 |
| 2498 | vaesenclast %xmm4,%xmm11,%xmm11 |
| 2499 | vaesenclast %xmm4,%xmm12,%xmm12 |
| 2500 | |
| 2501 | |
| 2502 | vpxor 0(%rdi),%xmm7,%xmm7 |
| 2503 | vpxor 16(%rdi),%xmm8,%xmm8 |
| 2504 | vpxor 32(%rdi),%xmm9,%xmm9 |
| 2505 | vpxor 48(%rdi),%xmm10,%xmm10 |
| 2506 | vpxor 64(%rdi),%xmm11,%xmm11 |
| 2507 | vpxor 80(%rdi),%xmm12,%xmm12 |
| 2508 | |
| 2509 | vmovdqu %xmm7,0(%rsi) |
| 2510 | vmovdqu %xmm8,16(%rsi) |
| 2511 | vmovdqu %xmm9,32(%rsi) |
| 2512 | vmovdqu %xmm10,48(%rsi) |
| 2513 | vmovdqu %xmm11,64(%rsi) |
| 2514 | vmovdqu %xmm12,80(%rsi) |
| 2515 | |
| 2516 | addq $96,%rdi |
| 2517 | addq $96,%rsi |
| 2518 | jmp L$256_dec_loop1 |
| 2519 | |
| 2520 | |
| 2521 | .p2align 6 |
| 2522 | L$256_dec_loop1: |
| 2523 | cmpq $96,%r9 |
| 2524 | jb L$256_dec_finish_96 |
| 2525 | subq $96,%r9 |
| 2526 | |
| 2527 | vmovdqa %xmm12,%xmm6 |
| 2528 | vmovdqa %xmm11,16-32(%rax) |
| 2529 | vmovdqa %xmm10,32-32(%rax) |
| 2530 | vmovdqa %xmm9,48-32(%rax) |
| 2531 | vmovdqa %xmm8,64-32(%rax) |
| 2532 | vmovdqa %xmm7,80-32(%rax) |
| 2533 | |
| 2534 | vmovdqa %xmm15,%xmm7 |
| 2535 | vpaddd one(%rip),%xmm7,%xmm8 |
| 2536 | vpaddd two(%rip),%xmm7,%xmm9 |
| 2537 | vpaddd one(%rip),%xmm9,%xmm10 |
| 2538 | vpaddd two(%rip),%xmm9,%xmm11 |
| 2539 | vpaddd one(%rip),%xmm11,%xmm12 |
| 2540 | vpaddd two(%rip),%xmm11,%xmm15 |
| 2541 | |
| 2542 | vmovdqa (%r8),%xmm4 |
| 2543 | vpxor %xmm4,%xmm7,%xmm7 |
| 2544 | vpxor %xmm4,%xmm8,%xmm8 |
| 2545 | vpxor %xmm4,%xmm9,%xmm9 |
| 2546 | vpxor %xmm4,%xmm10,%xmm10 |
| 2547 | vpxor %xmm4,%xmm11,%xmm11 |
| 2548 | vpxor %xmm4,%xmm12,%xmm12 |
| 2549 | |
| 2550 | vmovdqu 0-32(%rcx),%xmm4 |
| 2551 | vpclmulqdq $0x11,%xmm4,%xmm6,%xmm2 |
| 2552 | vpclmulqdq $0x00,%xmm4,%xmm6,%xmm3 |
| 2553 | vpclmulqdq $0x01,%xmm4,%xmm6,%xmm1 |
| 2554 | vpclmulqdq $0x10,%xmm4,%xmm6,%xmm4 |
| 2555 | vpxor %xmm4,%xmm1,%xmm1 |
| 2556 | |
| 2557 | vmovdqu 16(%r8),%xmm4 |
| 2558 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2559 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2560 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2561 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2562 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2563 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2564 | |
| 2565 | vmovdqu -16(%rax),%xmm6 |
| 2566 | vmovdqu -16(%rcx),%xmm13 |
| 2567 | |
| 2568 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 2569 | vpxor %xmm4,%xmm1,%xmm1 |
| 2570 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 2571 | vpxor %xmm4,%xmm2,%xmm2 |
| 2572 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 2573 | vpxor %xmm4,%xmm3,%xmm3 |
| 2574 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 2575 | vpxor %xmm4,%xmm1,%xmm1 |
| 2576 | |
| 2577 | |
| 2578 | vmovdqu 32(%r8),%xmm4 |
| 2579 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2580 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2581 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2582 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2583 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2584 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2585 | |
| 2586 | vmovdqu 0(%rax),%xmm6 |
| 2587 | vmovdqu 0(%rcx),%xmm13 |
| 2588 | |
| 2589 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 2590 | vpxor %xmm4,%xmm1,%xmm1 |
| 2591 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 2592 | vpxor %xmm4,%xmm2,%xmm2 |
| 2593 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 2594 | vpxor %xmm4,%xmm3,%xmm3 |
| 2595 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 2596 | vpxor %xmm4,%xmm1,%xmm1 |
| 2597 | |
| 2598 | |
| 2599 | vmovdqu 48(%r8),%xmm4 |
| 2600 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2601 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2602 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2603 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2604 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2605 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2606 | |
| 2607 | vmovdqu 16(%rax),%xmm6 |
| 2608 | vmovdqu 16(%rcx),%xmm13 |
| 2609 | |
| 2610 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 2611 | vpxor %xmm4,%xmm1,%xmm1 |
| 2612 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 2613 | vpxor %xmm4,%xmm2,%xmm2 |
| 2614 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 2615 | vpxor %xmm4,%xmm3,%xmm3 |
| 2616 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 2617 | vpxor %xmm4,%xmm1,%xmm1 |
| 2618 | |
| 2619 | |
| 2620 | vmovdqu 64(%r8),%xmm4 |
| 2621 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2622 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2623 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2624 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2625 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2626 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2627 | |
| 2628 | vmovdqu 32(%rax),%xmm6 |
| 2629 | vmovdqu 32(%rcx),%xmm13 |
| 2630 | |
| 2631 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 2632 | vpxor %xmm4,%xmm1,%xmm1 |
| 2633 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 2634 | vpxor %xmm4,%xmm2,%xmm2 |
| 2635 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 2636 | vpxor %xmm4,%xmm3,%xmm3 |
| 2637 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 2638 | vpxor %xmm4,%xmm1,%xmm1 |
| 2639 | |
| 2640 | |
| 2641 | vmovdqu 80(%r8),%xmm4 |
| 2642 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2643 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2644 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2645 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2646 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2647 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2648 | |
| 2649 | vmovdqu 96(%r8),%xmm4 |
| 2650 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2651 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2652 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2653 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2654 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2655 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2656 | |
| 2657 | vmovdqu 112(%r8),%xmm4 |
| 2658 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2659 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2660 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2661 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2662 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2663 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2664 | |
| 2665 | |
| 2666 | vmovdqa 80-32(%rax),%xmm6 |
| 2667 | vpxor %xmm0,%xmm6,%xmm6 |
| 2668 | vmovdqu 80-32(%rcx),%xmm5 |
| 2669 | |
| 2670 | vpclmulqdq $0x01,%xmm5,%xmm6,%xmm4 |
| 2671 | vpxor %xmm4,%xmm1,%xmm1 |
| 2672 | vpclmulqdq $0x11,%xmm5,%xmm6,%xmm4 |
| 2673 | vpxor %xmm4,%xmm2,%xmm2 |
| 2674 | vpclmulqdq $0x00,%xmm5,%xmm6,%xmm4 |
| 2675 | vpxor %xmm4,%xmm3,%xmm3 |
| 2676 | vpclmulqdq $0x10,%xmm5,%xmm6,%xmm4 |
| 2677 | vpxor %xmm4,%xmm1,%xmm1 |
| 2678 | |
| 2679 | vmovdqu 128(%r8),%xmm4 |
| 2680 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2681 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2682 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2683 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2684 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2685 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2686 | |
| 2687 | |
| 2688 | vpsrldq $8,%xmm1,%xmm4 |
| 2689 | vpxor %xmm4,%xmm2,%xmm5 |
| 2690 | vpslldq $8,%xmm1,%xmm4 |
| 2691 | vpxor %xmm4,%xmm3,%xmm0 |
| 2692 | |
| 2693 | vmovdqa poly(%rip),%xmm3 |
| 2694 | |
| 2695 | vmovdqu 144(%r8),%xmm4 |
| 2696 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2697 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2698 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2699 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2700 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2701 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2702 | |
| 2703 | vmovdqu 160(%r8),%xmm4 |
| 2704 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2705 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2706 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2707 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2708 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2709 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2710 | |
| 2711 | vmovdqu 176(%r8),%xmm4 |
| 2712 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2713 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2714 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2715 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2716 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2717 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2718 | |
| 2719 | vmovdqu 192(%r8),%xmm4 |
| 2720 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2721 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2722 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2723 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2724 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2725 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2726 | |
| 2727 | vmovdqu 208(%r8),%xmm4 |
| 2728 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2729 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2730 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2731 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2732 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2733 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2734 | |
| 2735 | vmovdqu 224(%r8),%xmm6 |
| 2736 | vpalignr $8,%xmm0,%xmm0,%xmm2 |
| 2737 | vpclmulqdq $0x10,%xmm3,%xmm0,%xmm0 |
| 2738 | vpxor %xmm0,%xmm2,%xmm0 |
| 2739 | |
| 2740 | vpxor 0(%rdi),%xmm6,%xmm4 |
| 2741 | vaesenclast %xmm4,%xmm7,%xmm7 |
| 2742 | vpxor 16(%rdi),%xmm6,%xmm4 |
| 2743 | vaesenclast %xmm4,%xmm8,%xmm8 |
| 2744 | vpxor 32(%rdi),%xmm6,%xmm4 |
| 2745 | vaesenclast %xmm4,%xmm9,%xmm9 |
| 2746 | vpxor 48(%rdi),%xmm6,%xmm4 |
| 2747 | vaesenclast %xmm4,%xmm10,%xmm10 |
| 2748 | vpxor 64(%rdi),%xmm6,%xmm4 |
| 2749 | vaesenclast %xmm4,%xmm11,%xmm11 |
| 2750 | vpxor 80(%rdi),%xmm6,%xmm4 |
| 2751 | vaesenclast %xmm4,%xmm12,%xmm12 |
| 2752 | |
| 2753 | vpalignr $8,%xmm0,%xmm0,%xmm2 |
| 2754 | vpclmulqdq $0x10,%xmm3,%xmm0,%xmm0 |
| 2755 | vpxor %xmm0,%xmm2,%xmm0 |
| 2756 | |
| 2757 | vmovdqu %xmm7,0(%rsi) |
| 2758 | vmovdqu %xmm8,16(%rsi) |
| 2759 | vmovdqu %xmm9,32(%rsi) |
| 2760 | vmovdqu %xmm10,48(%rsi) |
| 2761 | vmovdqu %xmm11,64(%rsi) |
| 2762 | vmovdqu %xmm12,80(%rsi) |
| 2763 | |
| 2764 | vpxor %xmm5,%xmm0,%xmm0 |
| 2765 | |
| 2766 | leaq 96(%rdi),%rdi |
| 2767 | leaq 96(%rsi),%rsi |
| 2768 | jmp L$256_dec_loop1 |
| 2769 | |
| 2770 | L$256_dec_finish_96: |
| 2771 | vmovdqa %xmm12,%xmm6 |
| 2772 | vmovdqa %xmm11,16-32(%rax) |
| 2773 | vmovdqa %xmm10,32-32(%rax) |
| 2774 | vmovdqa %xmm9,48-32(%rax) |
| 2775 | vmovdqa %xmm8,64-32(%rax) |
| 2776 | vmovdqa %xmm7,80-32(%rax) |
| 2777 | |
| 2778 | vmovdqu 0-32(%rcx),%xmm4 |
| 2779 | vpclmulqdq $0x10,%xmm4,%xmm6,%xmm1 |
| 2780 | vpclmulqdq $0x11,%xmm4,%xmm6,%xmm2 |
| 2781 | vpclmulqdq $0x00,%xmm4,%xmm6,%xmm3 |
| 2782 | vpclmulqdq $0x01,%xmm4,%xmm6,%xmm4 |
| 2783 | vpxor %xmm4,%xmm1,%xmm1 |
| 2784 | |
| 2785 | vmovdqu -16(%rax),%xmm6 |
| 2786 | vmovdqu -16(%rcx),%xmm13 |
| 2787 | |
| 2788 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 2789 | vpxor %xmm4,%xmm1,%xmm1 |
| 2790 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 2791 | vpxor %xmm4,%xmm2,%xmm2 |
| 2792 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 2793 | vpxor %xmm4,%xmm3,%xmm3 |
| 2794 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 2795 | vpxor %xmm4,%xmm1,%xmm1 |
| 2796 | |
| 2797 | vmovdqu 0(%rax),%xmm6 |
| 2798 | vmovdqu 0(%rcx),%xmm13 |
| 2799 | |
| 2800 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 2801 | vpxor %xmm4,%xmm1,%xmm1 |
| 2802 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 2803 | vpxor %xmm4,%xmm2,%xmm2 |
| 2804 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 2805 | vpxor %xmm4,%xmm3,%xmm3 |
| 2806 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 2807 | vpxor %xmm4,%xmm1,%xmm1 |
| 2808 | |
| 2809 | vmovdqu 16(%rax),%xmm6 |
| 2810 | vmovdqu 16(%rcx),%xmm13 |
| 2811 | |
| 2812 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 2813 | vpxor %xmm4,%xmm1,%xmm1 |
| 2814 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 2815 | vpxor %xmm4,%xmm2,%xmm2 |
| 2816 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 2817 | vpxor %xmm4,%xmm3,%xmm3 |
| 2818 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 2819 | vpxor %xmm4,%xmm1,%xmm1 |
| 2820 | |
| 2821 | vmovdqu 32(%rax),%xmm6 |
| 2822 | vmovdqu 32(%rcx),%xmm13 |
| 2823 | |
| 2824 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 2825 | vpxor %xmm4,%xmm1,%xmm1 |
| 2826 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 2827 | vpxor %xmm4,%xmm2,%xmm2 |
| 2828 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 2829 | vpxor %xmm4,%xmm3,%xmm3 |
| 2830 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 2831 | vpxor %xmm4,%xmm1,%xmm1 |
| 2832 | |
| 2833 | |
| 2834 | vmovdqu 80-32(%rax),%xmm6 |
| 2835 | vpxor %xmm0,%xmm6,%xmm6 |
| 2836 | vmovdqu 80-32(%rcx),%xmm5 |
| 2837 | vpclmulqdq $0x11,%xmm5,%xmm6,%xmm4 |
| 2838 | vpxor %xmm4,%xmm2,%xmm2 |
| 2839 | vpclmulqdq $0x00,%xmm5,%xmm6,%xmm4 |
| 2840 | vpxor %xmm4,%xmm3,%xmm3 |
| 2841 | vpclmulqdq $0x10,%xmm5,%xmm6,%xmm4 |
| 2842 | vpxor %xmm4,%xmm1,%xmm1 |
| 2843 | vpclmulqdq $0x01,%xmm5,%xmm6,%xmm4 |
| 2844 | vpxor %xmm4,%xmm1,%xmm1 |
| 2845 | |
| 2846 | vpsrldq $8,%xmm1,%xmm4 |
| 2847 | vpxor %xmm4,%xmm2,%xmm5 |
| 2848 | vpslldq $8,%xmm1,%xmm4 |
| 2849 | vpxor %xmm4,%xmm3,%xmm0 |
| 2850 | |
| 2851 | vmovdqa poly(%rip),%xmm3 |
| 2852 | |
| 2853 | vpalignr $8,%xmm0,%xmm0,%xmm2 |
| 2854 | vpclmulqdq $0x10,%xmm3,%xmm0,%xmm0 |
| 2855 | vpxor %xmm0,%xmm2,%xmm0 |
| 2856 | |
| 2857 | vpalignr $8,%xmm0,%xmm0,%xmm2 |
| 2858 | vpclmulqdq $0x10,%xmm3,%xmm0,%xmm0 |
| 2859 | vpxor %xmm0,%xmm2,%xmm0 |
| 2860 | |
| 2861 | vpxor %xmm5,%xmm0,%xmm0 |
| 2862 | |
| 2863 | L$256_dec_loop2: |
| 2864 | |
| 2865 | |
| 2866 | |
| 2867 | cmpq $16,%r9 |
| 2868 | jb L$256_dec_out |
| 2869 | subq $16,%r9 |
| 2870 | |
| 2871 | vmovdqa %xmm15,%xmm2 |
| 2872 | vpaddd one(%rip),%xmm15,%xmm15 |
| 2873 | |
| 2874 | vpxor 0(%r8),%xmm2,%xmm2 |
| 2875 | vaesenc 16(%r8),%xmm2,%xmm2 |
| 2876 | vaesenc 32(%r8),%xmm2,%xmm2 |
| 2877 | vaesenc 48(%r8),%xmm2,%xmm2 |
| 2878 | vaesenc 64(%r8),%xmm2,%xmm2 |
| 2879 | vaesenc 80(%r8),%xmm2,%xmm2 |
| 2880 | vaesenc 96(%r8),%xmm2,%xmm2 |
| 2881 | vaesenc 112(%r8),%xmm2,%xmm2 |
| 2882 | vaesenc 128(%r8),%xmm2,%xmm2 |
| 2883 | vaesenc 144(%r8),%xmm2,%xmm2 |
| 2884 | vaesenc 160(%r8),%xmm2,%xmm2 |
| 2885 | vaesenc 176(%r8),%xmm2,%xmm2 |
| 2886 | vaesenc 192(%r8),%xmm2,%xmm2 |
| 2887 | vaesenc 208(%r8),%xmm2,%xmm2 |
| 2888 | vaesenclast 224(%r8),%xmm2,%xmm2 |
| 2889 | vpxor (%rdi),%xmm2,%xmm2 |
| 2890 | vmovdqu %xmm2,(%rsi) |
| 2891 | addq $16,%rdi |
| 2892 | addq $16,%rsi |
| 2893 | |
| 2894 | vpxor %xmm2,%xmm0,%xmm0 |
| 2895 | vmovdqa -32(%rcx),%xmm1 |
| 2896 | call GFMUL |
| 2897 | |
| 2898 | jmp L$256_dec_loop2 |
| 2899 | |
| 2900 | L$256_dec_out: |
| 2901 | vmovdqu %xmm0,(%rdx) |
| 2902 | .byte 0xf3,0xc3 |
| 2903 | |
| 2904 | |
| 2905 | .globl _aes256gcmsiv_kdf |
| 2906 | .private_extern _aes256gcmsiv_kdf |
| 2907 | |
| 2908 | .p2align 4 |
| 2909 | _aes256gcmsiv_kdf: |
| 2910 | |
| 2911 | |
| 2912 | |
| 2913 | |
| 2914 | |
| 2915 | vmovdqa (%rdx),%xmm1 |
| 2916 | vmovdqa 0(%rdi),%xmm4 |
| 2917 | vmovdqa and_mask(%rip),%xmm11 |
| 2918 | vmovdqa one(%rip),%xmm8 |
| 2919 | vpshufd $0x90,%xmm4,%xmm4 |
| 2920 | vpand %xmm11,%xmm4,%xmm4 |
| 2921 | vpaddd %xmm8,%xmm4,%xmm6 |
| 2922 | vpaddd %xmm8,%xmm6,%xmm7 |
| 2923 | vpaddd %xmm8,%xmm7,%xmm11 |
| 2924 | vpaddd %xmm8,%xmm11,%xmm12 |
| 2925 | vpaddd %xmm8,%xmm12,%xmm13 |
| 2926 | |
| 2927 | vpxor %xmm1,%xmm4,%xmm4 |
| 2928 | vpxor %xmm1,%xmm6,%xmm6 |
| 2929 | vpxor %xmm1,%xmm7,%xmm7 |
| 2930 | vpxor %xmm1,%xmm11,%xmm11 |
| 2931 | vpxor %xmm1,%xmm12,%xmm12 |
| 2932 | vpxor %xmm1,%xmm13,%xmm13 |
| 2933 | |
| 2934 | vmovdqa 16(%rdx),%xmm1 |
| 2935 | vaesenc %xmm1,%xmm4,%xmm4 |
| 2936 | vaesenc %xmm1,%xmm6,%xmm6 |
| 2937 | vaesenc %xmm1,%xmm7,%xmm7 |
| 2938 | vaesenc %xmm1,%xmm11,%xmm11 |
| 2939 | vaesenc %xmm1,%xmm12,%xmm12 |
| 2940 | vaesenc %xmm1,%xmm13,%xmm13 |
| 2941 | |
| 2942 | vmovdqa 32(%rdx),%xmm2 |
| 2943 | vaesenc %xmm2,%xmm4,%xmm4 |
| 2944 | vaesenc %xmm2,%xmm6,%xmm6 |
| 2945 | vaesenc %xmm2,%xmm7,%xmm7 |
| 2946 | vaesenc %xmm2,%xmm11,%xmm11 |
| 2947 | vaesenc %xmm2,%xmm12,%xmm12 |
| 2948 | vaesenc %xmm2,%xmm13,%xmm13 |
| 2949 | |
| 2950 | vmovdqa 48(%rdx),%xmm1 |
| 2951 | vaesenc %xmm1,%xmm4,%xmm4 |
| 2952 | vaesenc %xmm1,%xmm6,%xmm6 |
| 2953 | vaesenc %xmm1,%xmm7,%xmm7 |
| 2954 | vaesenc %xmm1,%xmm11,%xmm11 |
| 2955 | vaesenc %xmm1,%xmm12,%xmm12 |
| 2956 | vaesenc %xmm1,%xmm13,%xmm13 |
| 2957 | |
| 2958 | vmovdqa 64(%rdx),%xmm2 |
| 2959 | vaesenc %xmm2,%xmm4,%xmm4 |
| 2960 | vaesenc %xmm2,%xmm6,%xmm6 |
| 2961 | vaesenc %xmm2,%xmm7,%xmm7 |
| 2962 | vaesenc %xmm2,%xmm11,%xmm11 |
| 2963 | vaesenc %xmm2,%xmm12,%xmm12 |
| 2964 | vaesenc %xmm2,%xmm13,%xmm13 |
| 2965 | |
| 2966 | vmovdqa 80(%rdx),%xmm1 |
| 2967 | vaesenc %xmm1,%xmm4,%xmm4 |
| 2968 | vaesenc %xmm1,%xmm6,%xmm6 |
| 2969 | vaesenc %xmm1,%xmm7,%xmm7 |
| 2970 | vaesenc %xmm1,%xmm11,%xmm11 |
| 2971 | vaesenc %xmm1,%xmm12,%xmm12 |
| 2972 | vaesenc %xmm1,%xmm13,%xmm13 |
| 2973 | |
| 2974 | vmovdqa 96(%rdx),%xmm2 |
| 2975 | vaesenc %xmm2,%xmm4,%xmm4 |
| 2976 | vaesenc %xmm2,%xmm6,%xmm6 |
| 2977 | vaesenc %xmm2,%xmm7,%xmm7 |
| 2978 | vaesenc %xmm2,%xmm11,%xmm11 |
| 2979 | vaesenc %xmm2,%xmm12,%xmm12 |
| 2980 | vaesenc %xmm2,%xmm13,%xmm13 |
| 2981 | |
| 2982 | vmovdqa 112(%rdx),%xmm1 |
| 2983 | vaesenc %xmm1,%xmm4,%xmm4 |
| 2984 | vaesenc %xmm1,%xmm6,%xmm6 |
| 2985 | vaesenc %xmm1,%xmm7,%xmm7 |
| 2986 | vaesenc %xmm1,%xmm11,%xmm11 |
| 2987 | vaesenc %xmm1,%xmm12,%xmm12 |
| 2988 | vaesenc %xmm1,%xmm13,%xmm13 |
| 2989 | |
| 2990 | vmovdqa 128(%rdx),%xmm2 |
| 2991 | vaesenc %xmm2,%xmm4,%xmm4 |
| 2992 | vaesenc %xmm2,%xmm6,%xmm6 |
| 2993 | vaesenc %xmm2,%xmm7,%xmm7 |
| 2994 | vaesenc %xmm2,%xmm11,%xmm11 |
| 2995 | vaesenc %xmm2,%xmm12,%xmm12 |
| 2996 | vaesenc %xmm2,%xmm13,%xmm13 |
| 2997 | |
| 2998 | vmovdqa 144(%rdx),%xmm1 |
| 2999 | vaesenc %xmm1,%xmm4,%xmm4 |
| 3000 | vaesenc %xmm1,%xmm6,%xmm6 |
| 3001 | vaesenc %xmm1,%xmm7,%xmm7 |
| 3002 | vaesenc %xmm1,%xmm11,%xmm11 |
| 3003 | vaesenc %xmm1,%xmm12,%xmm12 |
| 3004 | vaesenc %xmm1,%xmm13,%xmm13 |
| 3005 | |
| 3006 | vmovdqa 160(%rdx),%xmm2 |
| 3007 | vaesenc %xmm2,%xmm4,%xmm4 |
| 3008 | vaesenc %xmm2,%xmm6,%xmm6 |
| 3009 | vaesenc %xmm2,%xmm7,%xmm7 |
| 3010 | vaesenc %xmm2,%xmm11,%xmm11 |
| 3011 | vaesenc %xmm2,%xmm12,%xmm12 |
| 3012 | vaesenc %xmm2,%xmm13,%xmm13 |
| 3013 | |
| 3014 | vmovdqa 176(%rdx),%xmm1 |
| 3015 | vaesenc %xmm1,%xmm4,%xmm4 |
| 3016 | vaesenc %xmm1,%xmm6,%xmm6 |
| 3017 | vaesenc %xmm1,%xmm7,%xmm7 |
| 3018 | vaesenc %xmm1,%xmm11,%xmm11 |
| 3019 | vaesenc %xmm1,%xmm12,%xmm12 |
| 3020 | vaesenc %xmm1,%xmm13,%xmm13 |
| 3021 | |
| 3022 | vmovdqa 192(%rdx),%xmm2 |
| 3023 | vaesenc %xmm2,%xmm4,%xmm4 |
| 3024 | vaesenc %xmm2,%xmm6,%xmm6 |
| 3025 | vaesenc %xmm2,%xmm7,%xmm7 |
| 3026 | vaesenc %xmm2,%xmm11,%xmm11 |
| 3027 | vaesenc %xmm2,%xmm12,%xmm12 |
| 3028 | vaesenc %xmm2,%xmm13,%xmm13 |
| 3029 | |
| 3030 | vmovdqa 208(%rdx),%xmm1 |
| 3031 | vaesenc %xmm1,%xmm4,%xmm4 |
| 3032 | vaesenc %xmm1,%xmm6,%xmm6 |
| 3033 | vaesenc %xmm1,%xmm7,%xmm7 |
| 3034 | vaesenc %xmm1,%xmm11,%xmm11 |
| 3035 | vaesenc %xmm1,%xmm12,%xmm12 |
| 3036 | vaesenc %xmm1,%xmm13,%xmm13 |
| 3037 | |
| 3038 | vmovdqa 224(%rdx),%xmm2 |
| 3039 | vaesenclast %xmm2,%xmm4,%xmm4 |
| 3040 | vaesenclast %xmm2,%xmm6,%xmm6 |
| 3041 | vaesenclast %xmm2,%xmm7,%xmm7 |
| 3042 | vaesenclast %xmm2,%xmm11,%xmm11 |
| 3043 | vaesenclast %xmm2,%xmm12,%xmm12 |
| 3044 | vaesenclast %xmm2,%xmm13,%xmm13 |
| 3045 | |
| 3046 | |
| 3047 | vmovdqa %xmm4,0(%rsi) |
| 3048 | vmovdqa %xmm6,16(%rsi) |
| 3049 | vmovdqa %xmm7,32(%rsi) |
| 3050 | vmovdqa %xmm11,48(%rsi) |
| 3051 | vmovdqa %xmm12,64(%rsi) |
| 3052 | vmovdqa %xmm13,80(%rsi) |
| 3053 | .byte 0xf3,0xc3 |
| 3054 | |
| 3055 | |
| 3056 | #endif |