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 | .align 16 |
| 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 | .type GFMUL,@function |
| 38 | .align 16 |
| 39 | GFMUL: |
| 40 | .cfi_startproc |
| 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 | .cfi_endproc |
| 62 | .size GFMUL, .-GFMUL |
| 63 | .globl aesgcmsiv_htable_init |
| 64 | .hidden aesgcmsiv_htable_init |
| 65 | .type aesgcmsiv_htable_init,@function |
| 66 | .align 16 |
| 67 | aesgcmsiv_htable_init: |
| 68 | .cfi_startproc |
| 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 | .cfi_endproc |
| 88 | .size aesgcmsiv_htable_init, .-aesgcmsiv_htable_init |
| 89 | .globl aesgcmsiv_htable6_init |
| 90 | .hidden aesgcmsiv_htable6_init |
| 91 | .type aesgcmsiv_htable6_init,@function |
| 92 | .align 16 |
| 93 | aesgcmsiv_htable6_init: |
| 94 | .cfi_startproc |
| 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 | .cfi_endproc |
| 110 | .size aesgcmsiv_htable6_init, .-aesgcmsiv_htable6_init |
| 111 | .globl aesgcmsiv_htable_polyval |
| 112 | .hidden aesgcmsiv_htable_polyval |
| 113 | .type aesgcmsiv_htable_polyval,@function |
| 114 | .align 16 |
| 115 | aesgcmsiv_htable_polyval: |
| 116 | .cfi_startproc |
| 117 | testq %rdx,%rdx |
| 118 | jnz .Lhtable_polyval_start |
| 119 | .byte 0xf3,0xc3 |
| 120 | |
| 121 | .Lhtable_polyval_start: |
| 122 | vzeroall |
| 123 | |
| 124 | |
| 125 | |
| 126 | movq %rdx,%r11 |
| 127 | andq $127,%r11 |
| 128 | |
| 129 | jz .Lhtable_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 .Lhtable_polyval_prefix_loop |
| 150 | jmp .Lhtable_polyval_prefix_complete |
| 151 | |
| 152 | |
| 153 | .align 64 |
| 154 | .Lhtable_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 .Lhtable_polyval_prefix_loop |
| 173 | |
| 174 | .Lhtable_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 .Lhtable_polyval_main_loop |
| 182 | |
| 183 | .Lhtable_polyval_no_prefix: |
| 184 | |
| 185 | |
| 186 | |
| 187 | |
| 188 | vpxor %xmm1,%xmm1,%xmm1 |
| 189 | vmovdqa (%rcx),%xmm9 |
| 190 | |
| 191 | .align 64 |
| 192 | .Lhtable_polyval_main_loop: |
| 193 | subq $0x80,%rdx |
| 194 | jb .Lhtable_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 .Lhtable_polyval_main_loop |
| 310 | |
| 311 | |
| 312 | |
| 313 | .Lhtable_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 | .cfi_endproc |
| 327 | .size aesgcmsiv_htable_polyval,.-aesgcmsiv_htable_polyval |
| 328 | .globl aesgcmsiv_polyval_horner |
| 329 | .hidden aesgcmsiv_polyval_horner |
| 330 | .type aesgcmsiv_polyval_horner,@function |
| 331 | .align 16 |
| 332 | aesgcmsiv_polyval_horner: |
| 333 | .cfi_startproc |
| 334 | testq %rcx,%rcx |
| 335 | jnz .Lpolyval_horner_start |
| 336 | .byte 0xf3,0xc3 |
| 337 | |
| 338 | .Lpolyval_horner_start: |
| 339 | |
| 340 | |
| 341 | |
| 342 | xorq %r10,%r10 |
| 343 | shlq $4,%rcx |
| 344 | |
| 345 | vmovdqa (%rsi),%xmm1 |
| 346 | vmovdqa (%rdi),%xmm0 |
| 347 | |
| 348 | .Lpolyval_horner_loop: |
| 349 | vpxor (%rdx,%r10,1),%xmm0,%xmm0 |
| 350 | call GFMUL |
| 351 | |
| 352 | addq $16,%r10 |
| 353 | cmpq %r10,%rcx |
| 354 | jne .Lpolyval_horner_loop |
| 355 | |
| 356 | |
| 357 | vmovdqa %xmm0,(%rdi) |
| 358 | .byte 0xf3,0xc3 |
| 359 | .cfi_endproc |
| 360 | .size aesgcmsiv_polyval_horner,.-aesgcmsiv_polyval_horner |
| 361 | .globl aes128gcmsiv_aes_ks |
| 362 | .hidden aes128gcmsiv_aes_ks |
| 363 | .type aes128gcmsiv_aes_ks,@function |
| 364 | .align 16 |
| 365 | aes128gcmsiv_aes_ks: |
| 366 | .cfi_startproc |
| 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 | .Lks128_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 .Lks128_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 | .cfi_endproc |
| 416 | .size aes128gcmsiv_aes_ks,.-aes128gcmsiv_aes_ks |
| 417 | .globl aes256gcmsiv_aes_ks |
| 418 | .hidden aes256gcmsiv_aes_ks |
| 419 | .type aes256gcmsiv_aes_ks,@function |
| 420 | .align 16 |
| 421 | aes256gcmsiv_aes_ks: |
| 422 | .cfi_startproc |
| 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 | .Lks256_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 .Lks256_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 | .cfi_endproc |
| 464 | .globl aes128gcmsiv_aes_ks_enc_x1 |
| 465 | .hidden aes128gcmsiv_aes_ks_enc_x1 |
| 466 | .type aes128gcmsiv_aes_ks_enc_x1,@function |
| 467 | .align 16 |
| 468 | aes128gcmsiv_aes_ks_enc_x1: |
| 469 | .cfi_startproc |
| 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 | .cfi_endproc |
| 605 | .size aes128gcmsiv_aes_ks_enc_x1,.-aes128gcmsiv_aes_ks_enc_x1 |
| 606 | .globl aes128gcmsiv_kdf |
| 607 | .hidden aes128gcmsiv_kdf |
| 608 | .type aes128gcmsiv_kdf,@function |
| 609 | .align 16 |
| 610 | aes128gcmsiv_kdf: |
| 611 | .cfi_startproc |
| 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 | .cfi_endproc |
| 698 | .size aes128gcmsiv_kdf,.-aes128gcmsiv_kdf |
| 699 | .globl aes128gcmsiv_enc_msg_x4 |
| 700 | .hidden aes128gcmsiv_enc_msg_x4 |
| 701 | .type aes128gcmsiv_enc_msg_x4,@function |
| 702 | .align 16 |
| 703 | aes128gcmsiv_enc_msg_x4: |
| 704 | .cfi_startproc |
| 705 | testq %r8,%r8 |
| 706 | jnz .L128_enc_msg_x4_start |
| 707 | .byte 0xf3,0xc3 |
| 708 | |
| 709 | .L128_enc_msg_x4_start: |
| 710 | pushq %r12 |
| 711 | .cfi_adjust_cfa_offset 8 |
| 712 | .cfi_offset %r12,-16 |
| 713 | pushq %r13 |
| 714 | .cfi_adjust_cfa_offset 8 |
| 715 | .cfi_offset %r13,-24 |
| 716 | |
| 717 | shrq $4,%r8 |
| 718 | movq %r8,%r10 |
| 719 | shlq $62,%r10 |
| 720 | shrq $62,%r10 |
| 721 | |
| 722 | |
| 723 | vmovdqa (%rdx),%xmm15 |
| 724 | vpor OR_MASK(%rip),%xmm15,%xmm15 |
| 725 | |
| 726 | vmovdqu four(%rip),%xmm4 |
| 727 | vmovdqa %xmm15,%xmm0 |
| 728 | vpaddd one(%rip),%xmm15,%xmm1 |
| 729 | vpaddd two(%rip),%xmm15,%xmm2 |
| 730 | vpaddd three(%rip),%xmm15,%xmm3 |
| 731 | |
| 732 | shrq $2,%r8 |
| 733 | je .L128_enc_msg_x4_check_remainder |
| 734 | |
| 735 | subq $64,%rsi |
| 736 | subq $64,%rdi |
| 737 | |
| 738 | .L128_enc_msg_x4_loop1: |
| 739 | addq $64,%rsi |
| 740 | addq $64,%rdi |
| 741 | |
| 742 | vmovdqa %xmm0,%xmm5 |
| 743 | vmovdqa %xmm1,%xmm6 |
| 744 | vmovdqa %xmm2,%xmm7 |
| 745 | vmovdqa %xmm3,%xmm8 |
| 746 | |
| 747 | vpxor (%rcx),%xmm5,%xmm5 |
| 748 | vpxor (%rcx),%xmm6,%xmm6 |
| 749 | vpxor (%rcx),%xmm7,%xmm7 |
| 750 | vpxor (%rcx),%xmm8,%xmm8 |
| 751 | |
| 752 | vmovdqu 16(%rcx),%xmm12 |
| 753 | vaesenc %xmm12,%xmm5,%xmm5 |
| 754 | vaesenc %xmm12,%xmm6,%xmm6 |
| 755 | vaesenc %xmm12,%xmm7,%xmm7 |
| 756 | vaesenc %xmm12,%xmm8,%xmm8 |
| 757 | |
| 758 | vpaddd %xmm4,%xmm0,%xmm0 |
| 759 | vmovdqu 32(%rcx),%xmm12 |
| 760 | vaesenc %xmm12,%xmm5,%xmm5 |
| 761 | vaesenc %xmm12,%xmm6,%xmm6 |
| 762 | vaesenc %xmm12,%xmm7,%xmm7 |
| 763 | vaesenc %xmm12,%xmm8,%xmm8 |
| 764 | |
| 765 | vpaddd %xmm4,%xmm1,%xmm1 |
| 766 | vmovdqu 48(%rcx),%xmm12 |
| 767 | vaesenc %xmm12,%xmm5,%xmm5 |
| 768 | vaesenc %xmm12,%xmm6,%xmm6 |
| 769 | vaesenc %xmm12,%xmm7,%xmm7 |
| 770 | vaesenc %xmm12,%xmm8,%xmm8 |
| 771 | |
| 772 | vpaddd %xmm4,%xmm2,%xmm2 |
| 773 | vmovdqu 64(%rcx),%xmm12 |
| 774 | vaesenc %xmm12,%xmm5,%xmm5 |
| 775 | vaesenc %xmm12,%xmm6,%xmm6 |
| 776 | vaesenc %xmm12,%xmm7,%xmm7 |
| 777 | vaesenc %xmm12,%xmm8,%xmm8 |
| 778 | |
| 779 | vpaddd %xmm4,%xmm3,%xmm3 |
| 780 | |
| 781 | vmovdqu 80(%rcx),%xmm12 |
| 782 | vaesenc %xmm12,%xmm5,%xmm5 |
| 783 | vaesenc %xmm12,%xmm6,%xmm6 |
| 784 | vaesenc %xmm12,%xmm7,%xmm7 |
| 785 | vaesenc %xmm12,%xmm8,%xmm8 |
| 786 | |
| 787 | vmovdqu 96(%rcx),%xmm12 |
| 788 | vaesenc %xmm12,%xmm5,%xmm5 |
| 789 | vaesenc %xmm12,%xmm6,%xmm6 |
| 790 | vaesenc %xmm12,%xmm7,%xmm7 |
| 791 | vaesenc %xmm12,%xmm8,%xmm8 |
| 792 | |
| 793 | vmovdqu 112(%rcx),%xmm12 |
| 794 | vaesenc %xmm12,%xmm5,%xmm5 |
| 795 | vaesenc %xmm12,%xmm6,%xmm6 |
| 796 | vaesenc %xmm12,%xmm7,%xmm7 |
| 797 | vaesenc %xmm12,%xmm8,%xmm8 |
| 798 | |
| 799 | vmovdqu 128(%rcx),%xmm12 |
| 800 | vaesenc %xmm12,%xmm5,%xmm5 |
| 801 | vaesenc %xmm12,%xmm6,%xmm6 |
| 802 | vaesenc %xmm12,%xmm7,%xmm7 |
| 803 | vaesenc %xmm12,%xmm8,%xmm8 |
| 804 | |
| 805 | vmovdqu 144(%rcx),%xmm12 |
| 806 | vaesenc %xmm12,%xmm5,%xmm5 |
| 807 | vaesenc %xmm12,%xmm6,%xmm6 |
| 808 | vaesenc %xmm12,%xmm7,%xmm7 |
| 809 | vaesenc %xmm12,%xmm8,%xmm8 |
| 810 | |
| 811 | vmovdqu 160(%rcx),%xmm12 |
| 812 | vaesenclast %xmm12,%xmm5,%xmm5 |
| 813 | vaesenclast %xmm12,%xmm6,%xmm6 |
| 814 | vaesenclast %xmm12,%xmm7,%xmm7 |
| 815 | vaesenclast %xmm12,%xmm8,%xmm8 |
| 816 | |
| 817 | |
| 818 | |
| 819 | vpxor 0(%rdi),%xmm5,%xmm5 |
| 820 | vpxor 16(%rdi),%xmm6,%xmm6 |
| 821 | vpxor 32(%rdi),%xmm7,%xmm7 |
| 822 | vpxor 48(%rdi),%xmm8,%xmm8 |
| 823 | |
| 824 | subq $1,%r8 |
| 825 | |
| 826 | vmovdqu %xmm5,0(%rsi) |
| 827 | vmovdqu %xmm6,16(%rsi) |
| 828 | vmovdqu %xmm7,32(%rsi) |
| 829 | vmovdqu %xmm8,48(%rsi) |
| 830 | |
| 831 | jne .L128_enc_msg_x4_loop1 |
| 832 | |
| 833 | addq $64,%rsi |
| 834 | addq $64,%rdi |
| 835 | |
| 836 | .L128_enc_msg_x4_check_remainder: |
| 837 | cmpq $0,%r10 |
| 838 | je .L128_enc_msg_x4_out |
| 839 | |
| 840 | .L128_enc_msg_x4_loop2: |
| 841 | |
| 842 | |
| 843 | vmovdqa %xmm0,%xmm5 |
| 844 | vpaddd one(%rip),%xmm0,%xmm0 |
| 845 | |
| 846 | vpxor (%rcx),%xmm5,%xmm5 |
| 847 | vaesenc 16(%rcx),%xmm5,%xmm5 |
| 848 | vaesenc 32(%rcx),%xmm5,%xmm5 |
| 849 | vaesenc 48(%rcx),%xmm5,%xmm5 |
| 850 | vaesenc 64(%rcx),%xmm5,%xmm5 |
| 851 | vaesenc 80(%rcx),%xmm5,%xmm5 |
| 852 | vaesenc 96(%rcx),%xmm5,%xmm5 |
| 853 | vaesenc 112(%rcx),%xmm5,%xmm5 |
| 854 | vaesenc 128(%rcx),%xmm5,%xmm5 |
| 855 | vaesenc 144(%rcx),%xmm5,%xmm5 |
| 856 | vaesenclast 160(%rcx),%xmm5,%xmm5 |
| 857 | |
| 858 | |
| 859 | vpxor (%rdi),%xmm5,%xmm5 |
| 860 | vmovdqu %xmm5,(%rsi) |
| 861 | |
| 862 | addq $16,%rdi |
| 863 | addq $16,%rsi |
| 864 | |
| 865 | subq $1,%r10 |
| 866 | jne .L128_enc_msg_x4_loop2 |
| 867 | |
| 868 | .L128_enc_msg_x4_out: |
| 869 | popq %r13 |
| 870 | .cfi_adjust_cfa_offset -8 |
| 871 | .cfi_restore %r13 |
| 872 | popq %r12 |
| 873 | .cfi_adjust_cfa_offset -8 |
| 874 | .cfi_restore %r12 |
| 875 | .byte 0xf3,0xc3 |
| 876 | .cfi_endproc |
| 877 | .size aes128gcmsiv_enc_msg_x4,.-aes128gcmsiv_enc_msg_x4 |
| 878 | .globl aes128gcmsiv_enc_msg_x8 |
| 879 | .hidden aes128gcmsiv_enc_msg_x8 |
| 880 | .type aes128gcmsiv_enc_msg_x8,@function |
| 881 | .align 16 |
| 882 | aes128gcmsiv_enc_msg_x8: |
| 883 | .cfi_startproc |
| 884 | testq %r8,%r8 |
| 885 | jnz .L128_enc_msg_x8_start |
| 886 | .byte 0xf3,0xc3 |
| 887 | |
| 888 | .L128_enc_msg_x8_start: |
| 889 | pushq %r12 |
| 890 | .cfi_adjust_cfa_offset 8 |
| 891 | .cfi_offset %r12,-16 |
| 892 | pushq %r13 |
| 893 | .cfi_adjust_cfa_offset 8 |
| 894 | .cfi_offset %r13,-24 |
| 895 | pushq %rbp |
| 896 | .cfi_adjust_cfa_offset 8 |
| 897 | .cfi_offset %rbp,-32 |
| 898 | movq %rsp,%rbp |
| 899 | .cfi_def_cfa_register rbp |
| 900 | |
| 901 | |
| 902 | subq $128,%rsp |
| 903 | andq $-64,%rsp |
| 904 | |
| 905 | shrq $4,%r8 |
| 906 | movq %r8,%r10 |
| 907 | shlq $61,%r10 |
| 908 | shrq $61,%r10 |
| 909 | |
| 910 | |
| 911 | vmovdqu (%rdx),%xmm1 |
| 912 | vpor OR_MASK(%rip),%xmm1,%xmm1 |
| 913 | |
| 914 | |
| 915 | vpaddd seven(%rip),%xmm1,%xmm0 |
| 916 | vmovdqu %xmm0,(%rsp) |
| 917 | vpaddd one(%rip),%xmm1,%xmm9 |
| 918 | vpaddd two(%rip),%xmm1,%xmm10 |
| 919 | vpaddd three(%rip),%xmm1,%xmm11 |
| 920 | vpaddd four(%rip),%xmm1,%xmm12 |
| 921 | vpaddd five(%rip),%xmm1,%xmm13 |
| 922 | vpaddd six(%rip),%xmm1,%xmm14 |
| 923 | vmovdqa %xmm1,%xmm0 |
| 924 | |
| 925 | shrq $3,%r8 |
| 926 | je .L128_enc_msg_x8_check_remainder |
| 927 | |
| 928 | subq $128,%rsi |
| 929 | subq $128,%rdi |
| 930 | |
| 931 | .L128_enc_msg_x8_loop1: |
| 932 | addq $128,%rsi |
| 933 | addq $128,%rdi |
| 934 | |
| 935 | vmovdqa %xmm0,%xmm1 |
| 936 | vmovdqa %xmm9,%xmm2 |
| 937 | vmovdqa %xmm10,%xmm3 |
| 938 | vmovdqa %xmm11,%xmm4 |
| 939 | vmovdqa %xmm12,%xmm5 |
| 940 | vmovdqa %xmm13,%xmm6 |
| 941 | vmovdqa %xmm14,%xmm7 |
| 942 | |
| 943 | vmovdqu (%rsp),%xmm8 |
| 944 | |
| 945 | vpxor (%rcx),%xmm1,%xmm1 |
| 946 | vpxor (%rcx),%xmm2,%xmm2 |
| 947 | vpxor (%rcx),%xmm3,%xmm3 |
| 948 | vpxor (%rcx),%xmm4,%xmm4 |
| 949 | vpxor (%rcx),%xmm5,%xmm5 |
| 950 | vpxor (%rcx),%xmm6,%xmm6 |
| 951 | vpxor (%rcx),%xmm7,%xmm7 |
| 952 | vpxor (%rcx),%xmm8,%xmm8 |
| 953 | |
| 954 | vmovdqu 16(%rcx),%xmm15 |
| 955 | vaesenc %xmm15,%xmm1,%xmm1 |
| 956 | vaesenc %xmm15,%xmm2,%xmm2 |
| 957 | vaesenc %xmm15,%xmm3,%xmm3 |
| 958 | vaesenc %xmm15,%xmm4,%xmm4 |
| 959 | vaesenc %xmm15,%xmm5,%xmm5 |
| 960 | vaesenc %xmm15,%xmm6,%xmm6 |
| 961 | vaesenc %xmm15,%xmm7,%xmm7 |
| 962 | vaesenc %xmm15,%xmm8,%xmm8 |
| 963 | |
| 964 | vmovdqu (%rsp),%xmm14 |
| 965 | vpaddd eight(%rip),%xmm14,%xmm14 |
| 966 | vmovdqu %xmm14,(%rsp) |
| 967 | vmovdqu 32(%rcx),%xmm15 |
| 968 | vaesenc %xmm15,%xmm1,%xmm1 |
| 969 | vaesenc %xmm15,%xmm2,%xmm2 |
| 970 | vaesenc %xmm15,%xmm3,%xmm3 |
| 971 | vaesenc %xmm15,%xmm4,%xmm4 |
| 972 | vaesenc %xmm15,%xmm5,%xmm5 |
| 973 | vaesenc %xmm15,%xmm6,%xmm6 |
| 974 | vaesenc %xmm15,%xmm7,%xmm7 |
| 975 | vaesenc %xmm15,%xmm8,%xmm8 |
| 976 | |
| 977 | vpsubd one(%rip),%xmm14,%xmm14 |
| 978 | vmovdqu 48(%rcx),%xmm15 |
| 979 | vaesenc %xmm15,%xmm1,%xmm1 |
| 980 | vaesenc %xmm15,%xmm2,%xmm2 |
| 981 | vaesenc %xmm15,%xmm3,%xmm3 |
| 982 | vaesenc %xmm15,%xmm4,%xmm4 |
| 983 | vaesenc %xmm15,%xmm5,%xmm5 |
| 984 | vaesenc %xmm15,%xmm6,%xmm6 |
| 985 | vaesenc %xmm15,%xmm7,%xmm7 |
| 986 | vaesenc %xmm15,%xmm8,%xmm8 |
| 987 | |
| 988 | vpaddd eight(%rip),%xmm0,%xmm0 |
| 989 | vmovdqu 64(%rcx),%xmm15 |
| 990 | vaesenc %xmm15,%xmm1,%xmm1 |
| 991 | vaesenc %xmm15,%xmm2,%xmm2 |
| 992 | vaesenc %xmm15,%xmm3,%xmm3 |
| 993 | vaesenc %xmm15,%xmm4,%xmm4 |
| 994 | vaesenc %xmm15,%xmm5,%xmm5 |
| 995 | vaesenc %xmm15,%xmm6,%xmm6 |
| 996 | vaesenc %xmm15,%xmm7,%xmm7 |
| 997 | vaesenc %xmm15,%xmm8,%xmm8 |
| 998 | |
| 999 | vpaddd eight(%rip),%xmm9,%xmm9 |
| 1000 | vmovdqu 80(%rcx),%xmm15 |
| 1001 | vaesenc %xmm15,%xmm1,%xmm1 |
| 1002 | vaesenc %xmm15,%xmm2,%xmm2 |
| 1003 | vaesenc %xmm15,%xmm3,%xmm3 |
| 1004 | vaesenc %xmm15,%xmm4,%xmm4 |
| 1005 | vaesenc %xmm15,%xmm5,%xmm5 |
| 1006 | vaesenc %xmm15,%xmm6,%xmm6 |
| 1007 | vaesenc %xmm15,%xmm7,%xmm7 |
| 1008 | vaesenc %xmm15,%xmm8,%xmm8 |
| 1009 | |
| 1010 | vpaddd eight(%rip),%xmm10,%xmm10 |
| 1011 | vmovdqu 96(%rcx),%xmm15 |
| 1012 | vaesenc %xmm15,%xmm1,%xmm1 |
| 1013 | vaesenc %xmm15,%xmm2,%xmm2 |
| 1014 | vaesenc %xmm15,%xmm3,%xmm3 |
| 1015 | vaesenc %xmm15,%xmm4,%xmm4 |
| 1016 | vaesenc %xmm15,%xmm5,%xmm5 |
| 1017 | vaesenc %xmm15,%xmm6,%xmm6 |
| 1018 | vaesenc %xmm15,%xmm7,%xmm7 |
| 1019 | vaesenc %xmm15,%xmm8,%xmm8 |
| 1020 | |
| 1021 | vpaddd eight(%rip),%xmm11,%xmm11 |
| 1022 | vmovdqu 112(%rcx),%xmm15 |
| 1023 | vaesenc %xmm15,%xmm1,%xmm1 |
| 1024 | vaesenc %xmm15,%xmm2,%xmm2 |
| 1025 | vaesenc %xmm15,%xmm3,%xmm3 |
| 1026 | vaesenc %xmm15,%xmm4,%xmm4 |
| 1027 | vaesenc %xmm15,%xmm5,%xmm5 |
| 1028 | vaesenc %xmm15,%xmm6,%xmm6 |
| 1029 | vaesenc %xmm15,%xmm7,%xmm7 |
| 1030 | vaesenc %xmm15,%xmm8,%xmm8 |
| 1031 | |
| 1032 | vpaddd eight(%rip),%xmm12,%xmm12 |
| 1033 | vmovdqu 128(%rcx),%xmm15 |
| 1034 | vaesenc %xmm15,%xmm1,%xmm1 |
| 1035 | vaesenc %xmm15,%xmm2,%xmm2 |
| 1036 | vaesenc %xmm15,%xmm3,%xmm3 |
| 1037 | vaesenc %xmm15,%xmm4,%xmm4 |
| 1038 | vaesenc %xmm15,%xmm5,%xmm5 |
| 1039 | vaesenc %xmm15,%xmm6,%xmm6 |
| 1040 | vaesenc %xmm15,%xmm7,%xmm7 |
| 1041 | vaesenc %xmm15,%xmm8,%xmm8 |
| 1042 | |
| 1043 | vpaddd eight(%rip),%xmm13,%xmm13 |
| 1044 | vmovdqu 144(%rcx),%xmm15 |
| 1045 | vaesenc %xmm15,%xmm1,%xmm1 |
| 1046 | vaesenc %xmm15,%xmm2,%xmm2 |
| 1047 | vaesenc %xmm15,%xmm3,%xmm3 |
| 1048 | vaesenc %xmm15,%xmm4,%xmm4 |
| 1049 | vaesenc %xmm15,%xmm5,%xmm5 |
| 1050 | vaesenc %xmm15,%xmm6,%xmm6 |
| 1051 | vaesenc %xmm15,%xmm7,%xmm7 |
| 1052 | vaesenc %xmm15,%xmm8,%xmm8 |
| 1053 | |
| 1054 | vmovdqu 160(%rcx),%xmm15 |
| 1055 | vaesenclast %xmm15,%xmm1,%xmm1 |
| 1056 | vaesenclast %xmm15,%xmm2,%xmm2 |
| 1057 | vaesenclast %xmm15,%xmm3,%xmm3 |
| 1058 | vaesenclast %xmm15,%xmm4,%xmm4 |
| 1059 | vaesenclast %xmm15,%xmm5,%xmm5 |
| 1060 | vaesenclast %xmm15,%xmm6,%xmm6 |
| 1061 | vaesenclast %xmm15,%xmm7,%xmm7 |
| 1062 | vaesenclast %xmm15,%xmm8,%xmm8 |
| 1063 | |
| 1064 | |
| 1065 | |
| 1066 | vpxor 0(%rdi),%xmm1,%xmm1 |
| 1067 | vpxor 16(%rdi),%xmm2,%xmm2 |
| 1068 | vpxor 32(%rdi),%xmm3,%xmm3 |
| 1069 | vpxor 48(%rdi),%xmm4,%xmm4 |
| 1070 | vpxor 64(%rdi),%xmm5,%xmm5 |
| 1071 | vpxor 80(%rdi),%xmm6,%xmm6 |
| 1072 | vpxor 96(%rdi),%xmm7,%xmm7 |
| 1073 | vpxor 112(%rdi),%xmm8,%xmm8 |
| 1074 | |
| 1075 | decq %r8 |
| 1076 | |
| 1077 | vmovdqu %xmm1,0(%rsi) |
| 1078 | vmovdqu %xmm2,16(%rsi) |
| 1079 | vmovdqu %xmm3,32(%rsi) |
| 1080 | vmovdqu %xmm4,48(%rsi) |
| 1081 | vmovdqu %xmm5,64(%rsi) |
| 1082 | vmovdqu %xmm6,80(%rsi) |
| 1083 | vmovdqu %xmm7,96(%rsi) |
| 1084 | vmovdqu %xmm8,112(%rsi) |
| 1085 | |
| 1086 | jne .L128_enc_msg_x8_loop1 |
| 1087 | |
| 1088 | addq $128,%rsi |
| 1089 | addq $128,%rdi |
| 1090 | |
| 1091 | .L128_enc_msg_x8_check_remainder: |
| 1092 | cmpq $0,%r10 |
| 1093 | je .L128_enc_msg_x8_out |
| 1094 | |
| 1095 | .L128_enc_msg_x8_loop2: |
| 1096 | |
| 1097 | |
| 1098 | vmovdqa %xmm0,%xmm1 |
| 1099 | vpaddd one(%rip),%xmm0,%xmm0 |
| 1100 | |
| 1101 | vpxor (%rcx),%xmm1,%xmm1 |
| 1102 | vaesenc 16(%rcx),%xmm1,%xmm1 |
| 1103 | vaesenc 32(%rcx),%xmm1,%xmm1 |
| 1104 | vaesenc 48(%rcx),%xmm1,%xmm1 |
| 1105 | vaesenc 64(%rcx),%xmm1,%xmm1 |
| 1106 | vaesenc 80(%rcx),%xmm1,%xmm1 |
| 1107 | vaesenc 96(%rcx),%xmm1,%xmm1 |
| 1108 | vaesenc 112(%rcx),%xmm1,%xmm1 |
| 1109 | vaesenc 128(%rcx),%xmm1,%xmm1 |
| 1110 | vaesenc 144(%rcx),%xmm1,%xmm1 |
| 1111 | vaesenclast 160(%rcx),%xmm1,%xmm1 |
| 1112 | |
| 1113 | |
| 1114 | vpxor (%rdi),%xmm1,%xmm1 |
| 1115 | |
| 1116 | vmovdqu %xmm1,(%rsi) |
| 1117 | |
| 1118 | addq $16,%rdi |
| 1119 | addq $16,%rsi |
| 1120 | |
| 1121 | decq %r10 |
| 1122 | jne .L128_enc_msg_x8_loop2 |
| 1123 | |
| 1124 | .L128_enc_msg_x8_out: |
| 1125 | movq %rbp,%rsp |
| 1126 | .cfi_def_cfa_register %rsp |
| 1127 | popq %rbp |
| 1128 | .cfi_adjust_cfa_offset -8 |
| 1129 | .cfi_restore %rbp |
| 1130 | popq %r13 |
| 1131 | .cfi_adjust_cfa_offset -8 |
| 1132 | .cfi_restore %r13 |
| 1133 | popq %r12 |
| 1134 | .cfi_adjust_cfa_offset -8 |
| 1135 | .cfi_restore %r12 |
| 1136 | .byte 0xf3,0xc3 |
| 1137 | .cfi_endproc |
| 1138 | .size aes128gcmsiv_enc_msg_x8,.-aes128gcmsiv_enc_msg_x8 |
| 1139 | .globl aes128gcmsiv_dec |
| 1140 | .hidden aes128gcmsiv_dec |
| 1141 | .type aes128gcmsiv_dec,@function |
| 1142 | .align 16 |
| 1143 | aes128gcmsiv_dec: |
| 1144 | .cfi_startproc |
| 1145 | testq $~15,%r9 |
| 1146 | jnz .L128_dec_start |
| 1147 | .byte 0xf3,0xc3 |
| 1148 | |
| 1149 | .L128_dec_start: |
| 1150 | vzeroupper |
| 1151 | vmovdqa (%rdx),%xmm0 |
| 1152 | movq %rdx,%rax |
| 1153 | |
| 1154 | leaq 32(%rax),%rax |
| 1155 | leaq 32(%rcx),%rcx |
| 1156 | |
| 1157 | |
| 1158 | vmovdqu (%rdi,%r9,1),%xmm15 |
| 1159 | vpor OR_MASK(%rip),%xmm15,%xmm15 |
| 1160 | andq $~15,%r9 |
| 1161 | |
| 1162 | |
| 1163 | cmpq $96,%r9 |
| 1164 | jb .L128_dec_loop2 |
| 1165 | |
| 1166 | |
| 1167 | subq $96,%r9 |
| 1168 | vmovdqa %xmm15,%xmm7 |
| 1169 | vpaddd one(%rip),%xmm7,%xmm8 |
| 1170 | vpaddd two(%rip),%xmm7,%xmm9 |
| 1171 | vpaddd one(%rip),%xmm9,%xmm10 |
| 1172 | vpaddd two(%rip),%xmm9,%xmm11 |
| 1173 | vpaddd one(%rip),%xmm11,%xmm12 |
| 1174 | vpaddd two(%rip),%xmm11,%xmm15 |
| 1175 | |
| 1176 | vpxor (%r8),%xmm7,%xmm7 |
| 1177 | vpxor (%r8),%xmm8,%xmm8 |
| 1178 | vpxor (%r8),%xmm9,%xmm9 |
| 1179 | vpxor (%r8),%xmm10,%xmm10 |
| 1180 | vpxor (%r8),%xmm11,%xmm11 |
| 1181 | vpxor (%r8),%xmm12,%xmm12 |
| 1182 | |
| 1183 | vmovdqu 16(%r8),%xmm4 |
| 1184 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1185 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1186 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1187 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1188 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1189 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1190 | |
| 1191 | vmovdqu 32(%r8),%xmm4 |
| 1192 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1193 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1194 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1195 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1196 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1197 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1198 | |
| 1199 | vmovdqu 48(%r8),%xmm4 |
| 1200 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1201 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1202 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1203 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1204 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1205 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1206 | |
| 1207 | vmovdqu 64(%r8),%xmm4 |
| 1208 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1209 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1210 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1211 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1212 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1213 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1214 | |
| 1215 | vmovdqu 80(%r8),%xmm4 |
| 1216 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1217 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1218 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1219 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1220 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1221 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1222 | |
| 1223 | vmovdqu 96(%r8),%xmm4 |
| 1224 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1225 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1226 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1227 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1228 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1229 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1230 | |
| 1231 | vmovdqu 112(%r8),%xmm4 |
| 1232 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1233 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1234 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1235 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1236 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1237 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1238 | |
| 1239 | vmovdqu 128(%r8),%xmm4 |
| 1240 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1241 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1242 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1243 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1244 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1245 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1246 | |
| 1247 | vmovdqu 144(%r8),%xmm4 |
| 1248 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1249 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1250 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1251 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1252 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1253 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1254 | |
| 1255 | vmovdqu 160(%r8),%xmm4 |
| 1256 | vaesenclast %xmm4,%xmm7,%xmm7 |
| 1257 | vaesenclast %xmm4,%xmm8,%xmm8 |
| 1258 | vaesenclast %xmm4,%xmm9,%xmm9 |
| 1259 | vaesenclast %xmm4,%xmm10,%xmm10 |
| 1260 | vaesenclast %xmm4,%xmm11,%xmm11 |
| 1261 | vaesenclast %xmm4,%xmm12,%xmm12 |
| 1262 | |
| 1263 | |
| 1264 | vpxor 0(%rdi),%xmm7,%xmm7 |
| 1265 | vpxor 16(%rdi),%xmm8,%xmm8 |
| 1266 | vpxor 32(%rdi),%xmm9,%xmm9 |
| 1267 | vpxor 48(%rdi),%xmm10,%xmm10 |
| 1268 | vpxor 64(%rdi),%xmm11,%xmm11 |
| 1269 | vpxor 80(%rdi),%xmm12,%xmm12 |
| 1270 | |
| 1271 | vmovdqu %xmm7,0(%rsi) |
| 1272 | vmovdqu %xmm8,16(%rsi) |
| 1273 | vmovdqu %xmm9,32(%rsi) |
| 1274 | vmovdqu %xmm10,48(%rsi) |
| 1275 | vmovdqu %xmm11,64(%rsi) |
| 1276 | vmovdqu %xmm12,80(%rsi) |
| 1277 | |
| 1278 | addq $96,%rdi |
| 1279 | addq $96,%rsi |
| 1280 | jmp .L128_dec_loop1 |
| 1281 | |
| 1282 | |
| 1283 | .align 64 |
| 1284 | .L128_dec_loop1: |
| 1285 | cmpq $96,%r9 |
| 1286 | jb .L128_dec_finish_96 |
| 1287 | subq $96,%r9 |
| 1288 | |
| 1289 | vmovdqa %xmm12,%xmm6 |
| 1290 | vmovdqa %xmm11,16-32(%rax) |
| 1291 | vmovdqa %xmm10,32-32(%rax) |
| 1292 | vmovdqa %xmm9,48-32(%rax) |
| 1293 | vmovdqa %xmm8,64-32(%rax) |
| 1294 | vmovdqa %xmm7,80-32(%rax) |
| 1295 | |
| 1296 | vmovdqa %xmm15,%xmm7 |
| 1297 | vpaddd one(%rip),%xmm7,%xmm8 |
| 1298 | vpaddd two(%rip),%xmm7,%xmm9 |
| 1299 | vpaddd one(%rip),%xmm9,%xmm10 |
| 1300 | vpaddd two(%rip),%xmm9,%xmm11 |
| 1301 | vpaddd one(%rip),%xmm11,%xmm12 |
| 1302 | vpaddd two(%rip),%xmm11,%xmm15 |
| 1303 | |
| 1304 | vmovdqa (%r8),%xmm4 |
| 1305 | vpxor %xmm4,%xmm7,%xmm7 |
| 1306 | vpxor %xmm4,%xmm8,%xmm8 |
| 1307 | vpxor %xmm4,%xmm9,%xmm9 |
| 1308 | vpxor %xmm4,%xmm10,%xmm10 |
| 1309 | vpxor %xmm4,%xmm11,%xmm11 |
| 1310 | vpxor %xmm4,%xmm12,%xmm12 |
| 1311 | |
| 1312 | vmovdqu 0-32(%rcx),%xmm4 |
| 1313 | vpclmulqdq $0x11,%xmm4,%xmm6,%xmm2 |
| 1314 | vpclmulqdq $0x00,%xmm4,%xmm6,%xmm3 |
| 1315 | vpclmulqdq $0x01,%xmm4,%xmm6,%xmm1 |
| 1316 | vpclmulqdq $0x10,%xmm4,%xmm6,%xmm4 |
| 1317 | vpxor %xmm4,%xmm1,%xmm1 |
| 1318 | |
| 1319 | vmovdqu 16(%r8),%xmm4 |
| 1320 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1321 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1322 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1323 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1324 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1325 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1326 | |
| 1327 | vmovdqu -16(%rax),%xmm6 |
| 1328 | vmovdqu -16(%rcx),%xmm13 |
| 1329 | |
| 1330 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 1331 | vpxor %xmm4,%xmm1,%xmm1 |
| 1332 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 1333 | vpxor %xmm4,%xmm2,%xmm2 |
| 1334 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 1335 | vpxor %xmm4,%xmm3,%xmm3 |
| 1336 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 1337 | vpxor %xmm4,%xmm1,%xmm1 |
| 1338 | |
| 1339 | |
| 1340 | vmovdqu 32(%r8),%xmm4 |
| 1341 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1342 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1343 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1344 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1345 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1346 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1347 | |
| 1348 | vmovdqu 0(%rax),%xmm6 |
| 1349 | vmovdqu 0(%rcx),%xmm13 |
| 1350 | |
| 1351 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 1352 | vpxor %xmm4,%xmm1,%xmm1 |
| 1353 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 1354 | vpxor %xmm4,%xmm2,%xmm2 |
| 1355 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 1356 | vpxor %xmm4,%xmm3,%xmm3 |
| 1357 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 1358 | vpxor %xmm4,%xmm1,%xmm1 |
| 1359 | |
| 1360 | |
| 1361 | vmovdqu 48(%r8),%xmm4 |
| 1362 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1363 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1364 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1365 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1366 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1367 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1368 | |
| 1369 | vmovdqu 16(%rax),%xmm6 |
| 1370 | vmovdqu 16(%rcx),%xmm13 |
| 1371 | |
| 1372 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 1373 | vpxor %xmm4,%xmm1,%xmm1 |
| 1374 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 1375 | vpxor %xmm4,%xmm2,%xmm2 |
| 1376 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 1377 | vpxor %xmm4,%xmm3,%xmm3 |
| 1378 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 1379 | vpxor %xmm4,%xmm1,%xmm1 |
| 1380 | |
| 1381 | |
| 1382 | vmovdqu 64(%r8),%xmm4 |
| 1383 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1384 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1385 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1386 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1387 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1388 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1389 | |
| 1390 | vmovdqu 32(%rax),%xmm6 |
| 1391 | vmovdqu 32(%rcx),%xmm13 |
| 1392 | |
| 1393 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 1394 | vpxor %xmm4,%xmm1,%xmm1 |
| 1395 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 1396 | vpxor %xmm4,%xmm2,%xmm2 |
| 1397 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 1398 | vpxor %xmm4,%xmm3,%xmm3 |
| 1399 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 1400 | vpxor %xmm4,%xmm1,%xmm1 |
| 1401 | |
| 1402 | |
| 1403 | vmovdqu 80(%r8),%xmm4 |
| 1404 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1405 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1406 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1407 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1408 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1409 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1410 | |
| 1411 | vmovdqu 96(%r8),%xmm4 |
| 1412 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1413 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1414 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1415 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1416 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1417 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1418 | |
| 1419 | vmovdqu 112(%r8),%xmm4 |
| 1420 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1421 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1422 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1423 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1424 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1425 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1426 | |
| 1427 | |
| 1428 | vmovdqa 80-32(%rax),%xmm6 |
| 1429 | vpxor %xmm0,%xmm6,%xmm6 |
| 1430 | vmovdqu 80-32(%rcx),%xmm5 |
| 1431 | |
| 1432 | vpclmulqdq $0x01,%xmm5,%xmm6,%xmm4 |
| 1433 | vpxor %xmm4,%xmm1,%xmm1 |
| 1434 | vpclmulqdq $0x11,%xmm5,%xmm6,%xmm4 |
| 1435 | vpxor %xmm4,%xmm2,%xmm2 |
| 1436 | vpclmulqdq $0x00,%xmm5,%xmm6,%xmm4 |
| 1437 | vpxor %xmm4,%xmm3,%xmm3 |
| 1438 | vpclmulqdq $0x10,%xmm5,%xmm6,%xmm4 |
| 1439 | vpxor %xmm4,%xmm1,%xmm1 |
| 1440 | |
| 1441 | vmovdqu 128(%r8),%xmm4 |
| 1442 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1443 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1444 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1445 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1446 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1447 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1448 | |
| 1449 | |
| 1450 | vpsrldq $8,%xmm1,%xmm4 |
| 1451 | vpxor %xmm4,%xmm2,%xmm5 |
| 1452 | vpslldq $8,%xmm1,%xmm4 |
| 1453 | vpxor %xmm4,%xmm3,%xmm0 |
| 1454 | |
| 1455 | vmovdqa poly(%rip),%xmm3 |
| 1456 | |
| 1457 | vmovdqu 144(%r8),%xmm4 |
| 1458 | vaesenc %xmm4,%xmm7,%xmm7 |
| 1459 | vaesenc %xmm4,%xmm8,%xmm8 |
| 1460 | vaesenc %xmm4,%xmm9,%xmm9 |
| 1461 | vaesenc %xmm4,%xmm10,%xmm10 |
| 1462 | vaesenc %xmm4,%xmm11,%xmm11 |
| 1463 | vaesenc %xmm4,%xmm12,%xmm12 |
| 1464 | |
| 1465 | vmovdqu 160(%r8),%xmm6 |
| 1466 | vpalignr $8,%xmm0,%xmm0,%xmm2 |
| 1467 | vpclmulqdq $0x10,%xmm3,%xmm0,%xmm0 |
| 1468 | vpxor %xmm0,%xmm2,%xmm0 |
| 1469 | |
| 1470 | vpxor 0(%rdi),%xmm6,%xmm4 |
| 1471 | vaesenclast %xmm4,%xmm7,%xmm7 |
| 1472 | vpxor 16(%rdi),%xmm6,%xmm4 |
| 1473 | vaesenclast %xmm4,%xmm8,%xmm8 |
| 1474 | vpxor 32(%rdi),%xmm6,%xmm4 |
| 1475 | vaesenclast %xmm4,%xmm9,%xmm9 |
| 1476 | vpxor 48(%rdi),%xmm6,%xmm4 |
| 1477 | vaesenclast %xmm4,%xmm10,%xmm10 |
| 1478 | vpxor 64(%rdi),%xmm6,%xmm4 |
| 1479 | vaesenclast %xmm4,%xmm11,%xmm11 |
| 1480 | vpxor 80(%rdi),%xmm6,%xmm4 |
| 1481 | vaesenclast %xmm4,%xmm12,%xmm12 |
| 1482 | |
| 1483 | vpalignr $8,%xmm0,%xmm0,%xmm2 |
| 1484 | vpclmulqdq $0x10,%xmm3,%xmm0,%xmm0 |
| 1485 | vpxor %xmm0,%xmm2,%xmm0 |
| 1486 | |
| 1487 | vmovdqu %xmm7,0(%rsi) |
| 1488 | vmovdqu %xmm8,16(%rsi) |
| 1489 | vmovdqu %xmm9,32(%rsi) |
| 1490 | vmovdqu %xmm10,48(%rsi) |
| 1491 | vmovdqu %xmm11,64(%rsi) |
| 1492 | vmovdqu %xmm12,80(%rsi) |
| 1493 | |
| 1494 | vpxor %xmm5,%xmm0,%xmm0 |
| 1495 | |
| 1496 | leaq 96(%rdi),%rdi |
| 1497 | leaq 96(%rsi),%rsi |
| 1498 | jmp .L128_dec_loop1 |
| 1499 | |
| 1500 | .L128_dec_finish_96: |
| 1501 | vmovdqa %xmm12,%xmm6 |
| 1502 | vmovdqa %xmm11,16-32(%rax) |
| 1503 | vmovdqa %xmm10,32-32(%rax) |
| 1504 | vmovdqa %xmm9,48-32(%rax) |
| 1505 | vmovdqa %xmm8,64-32(%rax) |
| 1506 | vmovdqa %xmm7,80-32(%rax) |
| 1507 | |
| 1508 | vmovdqu 0-32(%rcx),%xmm4 |
| 1509 | vpclmulqdq $0x10,%xmm4,%xmm6,%xmm1 |
| 1510 | vpclmulqdq $0x11,%xmm4,%xmm6,%xmm2 |
| 1511 | vpclmulqdq $0x00,%xmm4,%xmm6,%xmm3 |
| 1512 | vpclmulqdq $0x01,%xmm4,%xmm6,%xmm4 |
| 1513 | vpxor %xmm4,%xmm1,%xmm1 |
| 1514 | |
| 1515 | vmovdqu -16(%rax),%xmm6 |
| 1516 | vmovdqu -16(%rcx),%xmm13 |
| 1517 | |
| 1518 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 1519 | vpxor %xmm4,%xmm1,%xmm1 |
| 1520 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 1521 | vpxor %xmm4,%xmm2,%xmm2 |
| 1522 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 1523 | vpxor %xmm4,%xmm3,%xmm3 |
| 1524 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 1525 | vpxor %xmm4,%xmm1,%xmm1 |
| 1526 | |
| 1527 | vmovdqu 0(%rax),%xmm6 |
| 1528 | vmovdqu 0(%rcx),%xmm13 |
| 1529 | |
| 1530 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 1531 | vpxor %xmm4,%xmm1,%xmm1 |
| 1532 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 1533 | vpxor %xmm4,%xmm2,%xmm2 |
| 1534 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 1535 | vpxor %xmm4,%xmm3,%xmm3 |
| 1536 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 1537 | vpxor %xmm4,%xmm1,%xmm1 |
| 1538 | |
| 1539 | vmovdqu 16(%rax),%xmm6 |
| 1540 | vmovdqu 16(%rcx),%xmm13 |
| 1541 | |
| 1542 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 1543 | vpxor %xmm4,%xmm1,%xmm1 |
| 1544 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 1545 | vpxor %xmm4,%xmm2,%xmm2 |
| 1546 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 1547 | vpxor %xmm4,%xmm3,%xmm3 |
| 1548 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 1549 | vpxor %xmm4,%xmm1,%xmm1 |
| 1550 | |
| 1551 | vmovdqu 32(%rax),%xmm6 |
| 1552 | vmovdqu 32(%rcx),%xmm13 |
| 1553 | |
| 1554 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 1555 | vpxor %xmm4,%xmm1,%xmm1 |
| 1556 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 1557 | vpxor %xmm4,%xmm2,%xmm2 |
| 1558 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 1559 | vpxor %xmm4,%xmm3,%xmm3 |
| 1560 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 1561 | vpxor %xmm4,%xmm1,%xmm1 |
| 1562 | |
| 1563 | |
| 1564 | vmovdqu 80-32(%rax),%xmm6 |
| 1565 | vpxor %xmm0,%xmm6,%xmm6 |
| 1566 | vmovdqu 80-32(%rcx),%xmm5 |
| 1567 | vpclmulqdq $0x11,%xmm5,%xmm6,%xmm4 |
| 1568 | vpxor %xmm4,%xmm2,%xmm2 |
| 1569 | vpclmulqdq $0x00,%xmm5,%xmm6,%xmm4 |
| 1570 | vpxor %xmm4,%xmm3,%xmm3 |
| 1571 | vpclmulqdq $0x10,%xmm5,%xmm6,%xmm4 |
| 1572 | vpxor %xmm4,%xmm1,%xmm1 |
| 1573 | vpclmulqdq $0x01,%xmm5,%xmm6,%xmm4 |
| 1574 | vpxor %xmm4,%xmm1,%xmm1 |
| 1575 | |
| 1576 | vpsrldq $8,%xmm1,%xmm4 |
| 1577 | vpxor %xmm4,%xmm2,%xmm5 |
| 1578 | vpslldq $8,%xmm1,%xmm4 |
| 1579 | vpxor %xmm4,%xmm3,%xmm0 |
| 1580 | |
| 1581 | vmovdqa poly(%rip),%xmm3 |
| 1582 | |
| 1583 | vpalignr $8,%xmm0,%xmm0,%xmm2 |
| 1584 | vpclmulqdq $0x10,%xmm3,%xmm0,%xmm0 |
| 1585 | vpxor %xmm0,%xmm2,%xmm0 |
| 1586 | |
| 1587 | vpalignr $8,%xmm0,%xmm0,%xmm2 |
| 1588 | vpclmulqdq $0x10,%xmm3,%xmm0,%xmm0 |
| 1589 | vpxor %xmm0,%xmm2,%xmm0 |
| 1590 | |
| 1591 | vpxor %xmm5,%xmm0,%xmm0 |
| 1592 | |
| 1593 | .L128_dec_loop2: |
| 1594 | |
| 1595 | |
| 1596 | |
| 1597 | cmpq $16,%r9 |
| 1598 | jb .L128_dec_out |
| 1599 | subq $16,%r9 |
| 1600 | |
| 1601 | vmovdqa %xmm15,%xmm2 |
| 1602 | vpaddd one(%rip),%xmm15,%xmm15 |
| 1603 | |
| 1604 | vpxor 0(%r8),%xmm2,%xmm2 |
| 1605 | vaesenc 16(%r8),%xmm2,%xmm2 |
| 1606 | vaesenc 32(%r8),%xmm2,%xmm2 |
| 1607 | vaesenc 48(%r8),%xmm2,%xmm2 |
| 1608 | vaesenc 64(%r8),%xmm2,%xmm2 |
| 1609 | vaesenc 80(%r8),%xmm2,%xmm2 |
| 1610 | vaesenc 96(%r8),%xmm2,%xmm2 |
| 1611 | vaesenc 112(%r8),%xmm2,%xmm2 |
| 1612 | vaesenc 128(%r8),%xmm2,%xmm2 |
| 1613 | vaesenc 144(%r8),%xmm2,%xmm2 |
| 1614 | vaesenclast 160(%r8),%xmm2,%xmm2 |
| 1615 | vpxor (%rdi),%xmm2,%xmm2 |
| 1616 | vmovdqu %xmm2,(%rsi) |
| 1617 | addq $16,%rdi |
| 1618 | addq $16,%rsi |
| 1619 | |
| 1620 | vpxor %xmm2,%xmm0,%xmm0 |
| 1621 | vmovdqa -32(%rcx),%xmm1 |
| 1622 | call GFMUL |
| 1623 | |
| 1624 | jmp .L128_dec_loop2 |
| 1625 | |
| 1626 | .L128_dec_out: |
| 1627 | vmovdqu %xmm0,(%rdx) |
| 1628 | .byte 0xf3,0xc3 |
| 1629 | .cfi_endproc |
| 1630 | .size aes128gcmsiv_dec, .-aes128gcmsiv_dec |
| 1631 | .globl aes128gcmsiv_ecb_enc_block |
| 1632 | .hidden aes128gcmsiv_ecb_enc_block |
| 1633 | .type aes128gcmsiv_ecb_enc_block,@function |
| 1634 | .align 16 |
| 1635 | aes128gcmsiv_ecb_enc_block: |
| 1636 | .cfi_startproc |
| 1637 | vmovdqa (%rdi),%xmm1 |
| 1638 | |
| 1639 | vpxor (%rdx),%xmm1,%xmm1 |
| 1640 | vaesenc 16(%rdx),%xmm1,%xmm1 |
| 1641 | vaesenc 32(%rdx),%xmm1,%xmm1 |
| 1642 | vaesenc 48(%rdx),%xmm1,%xmm1 |
| 1643 | vaesenc 64(%rdx),%xmm1,%xmm1 |
| 1644 | vaesenc 80(%rdx),%xmm1,%xmm1 |
| 1645 | vaesenc 96(%rdx),%xmm1,%xmm1 |
| 1646 | vaesenc 112(%rdx),%xmm1,%xmm1 |
| 1647 | vaesenc 128(%rdx),%xmm1,%xmm1 |
| 1648 | vaesenc 144(%rdx),%xmm1,%xmm1 |
| 1649 | vaesenclast 160(%rdx),%xmm1,%xmm1 |
| 1650 | |
| 1651 | vmovdqa %xmm1,(%rsi) |
| 1652 | |
| 1653 | .byte 0xf3,0xc3 |
| 1654 | .cfi_endproc |
| 1655 | .size aes128gcmsiv_ecb_enc_block,.-aes128gcmsiv_ecb_enc_block |
| 1656 | .globl aes256gcmsiv_aes_ks_enc_x1 |
| 1657 | .hidden aes256gcmsiv_aes_ks_enc_x1 |
| 1658 | .type aes256gcmsiv_aes_ks_enc_x1,@function |
| 1659 | .align 16 |
| 1660 | aes256gcmsiv_aes_ks_enc_x1: |
| 1661 | .cfi_startproc |
| 1662 | vmovdqa con1(%rip),%xmm0 |
| 1663 | vmovdqa mask(%rip),%xmm15 |
| 1664 | vmovdqa (%rdi),%xmm8 |
| 1665 | vmovdqa (%rcx),%xmm1 |
| 1666 | vmovdqa 16(%rcx),%xmm3 |
| 1667 | vpxor %xmm1,%xmm8,%xmm8 |
| 1668 | vaesenc %xmm3,%xmm8,%xmm8 |
| 1669 | vmovdqu %xmm1,(%rdx) |
| 1670 | vmovdqu %xmm3,16(%rdx) |
| 1671 | vpxor %xmm14,%xmm14,%xmm14 |
| 1672 | |
| 1673 | vpshufb %xmm15,%xmm3,%xmm2 |
| 1674 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 1675 | vpslld $1,%xmm0,%xmm0 |
| 1676 | vpslldq $4,%xmm1,%xmm4 |
| 1677 | vpxor %xmm4,%xmm1,%xmm1 |
| 1678 | vpslldq $4,%xmm4,%xmm4 |
| 1679 | vpxor %xmm4,%xmm1,%xmm1 |
| 1680 | vpslldq $4,%xmm4,%xmm4 |
| 1681 | vpxor %xmm4,%xmm1,%xmm1 |
| 1682 | vpxor %xmm2,%xmm1,%xmm1 |
| 1683 | vaesenc %xmm1,%xmm8,%xmm8 |
| 1684 | vmovdqu %xmm1,32(%rdx) |
| 1685 | |
| 1686 | vpshufd $0xff,%xmm1,%xmm2 |
| 1687 | vaesenclast %xmm14,%xmm2,%xmm2 |
| 1688 | vpslldq $4,%xmm3,%xmm4 |
| 1689 | vpxor %xmm4,%xmm3,%xmm3 |
| 1690 | vpslldq $4,%xmm4,%xmm4 |
| 1691 | vpxor %xmm4,%xmm3,%xmm3 |
| 1692 | vpslldq $4,%xmm4,%xmm4 |
| 1693 | vpxor %xmm4,%xmm3,%xmm3 |
| 1694 | vpxor %xmm2,%xmm3,%xmm3 |
| 1695 | vaesenc %xmm3,%xmm8,%xmm8 |
| 1696 | vmovdqu %xmm3,48(%rdx) |
| 1697 | |
| 1698 | vpshufb %xmm15,%xmm3,%xmm2 |
| 1699 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 1700 | vpslld $1,%xmm0,%xmm0 |
| 1701 | vpslldq $4,%xmm1,%xmm4 |
| 1702 | vpxor %xmm4,%xmm1,%xmm1 |
| 1703 | vpslldq $4,%xmm4,%xmm4 |
| 1704 | vpxor %xmm4,%xmm1,%xmm1 |
| 1705 | vpslldq $4,%xmm4,%xmm4 |
| 1706 | vpxor %xmm4,%xmm1,%xmm1 |
| 1707 | vpxor %xmm2,%xmm1,%xmm1 |
| 1708 | vaesenc %xmm1,%xmm8,%xmm8 |
| 1709 | vmovdqu %xmm1,64(%rdx) |
| 1710 | |
| 1711 | vpshufd $0xff,%xmm1,%xmm2 |
| 1712 | vaesenclast %xmm14,%xmm2,%xmm2 |
| 1713 | vpslldq $4,%xmm3,%xmm4 |
| 1714 | vpxor %xmm4,%xmm3,%xmm3 |
| 1715 | vpslldq $4,%xmm4,%xmm4 |
| 1716 | vpxor %xmm4,%xmm3,%xmm3 |
| 1717 | vpslldq $4,%xmm4,%xmm4 |
| 1718 | vpxor %xmm4,%xmm3,%xmm3 |
| 1719 | vpxor %xmm2,%xmm3,%xmm3 |
| 1720 | vaesenc %xmm3,%xmm8,%xmm8 |
| 1721 | vmovdqu %xmm3,80(%rdx) |
| 1722 | |
| 1723 | vpshufb %xmm15,%xmm3,%xmm2 |
| 1724 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 1725 | vpslld $1,%xmm0,%xmm0 |
| 1726 | vpslldq $4,%xmm1,%xmm4 |
| 1727 | vpxor %xmm4,%xmm1,%xmm1 |
| 1728 | vpslldq $4,%xmm4,%xmm4 |
| 1729 | vpxor %xmm4,%xmm1,%xmm1 |
| 1730 | vpslldq $4,%xmm4,%xmm4 |
| 1731 | vpxor %xmm4,%xmm1,%xmm1 |
| 1732 | vpxor %xmm2,%xmm1,%xmm1 |
| 1733 | vaesenc %xmm1,%xmm8,%xmm8 |
| 1734 | vmovdqu %xmm1,96(%rdx) |
| 1735 | |
| 1736 | vpshufd $0xff,%xmm1,%xmm2 |
| 1737 | vaesenclast %xmm14,%xmm2,%xmm2 |
| 1738 | vpslldq $4,%xmm3,%xmm4 |
| 1739 | vpxor %xmm4,%xmm3,%xmm3 |
| 1740 | vpslldq $4,%xmm4,%xmm4 |
| 1741 | vpxor %xmm4,%xmm3,%xmm3 |
| 1742 | vpslldq $4,%xmm4,%xmm4 |
| 1743 | vpxor %xmm4,%xmm3,%xmm3 |
| 1744 | vpxor %xmm2,%xmm3,%xmm3 |
| 1745 | vaesenc %xmm3,%xmm8,%xmm8 |
| 1746 | vmovdqu %xmm3,112(%rdx) |
| 1747 | |
| 1748 | vpshufb %xmm15,%xmm3,%xmm2 |
| 1749 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 1750 | vpslld $1,%xmm0,%xmm0 |
| 1751 | vpslldq $4,%xmm1,%xmm4 |
| 1752 | vpxor %xmm4,%xmm1,%xmm1 |
| 1753 | vpslldq $4,%xmm4,%xmm4 |
| 1754 | vpxor %xmm4,%xmm1,%xmm1 |
| 1755 | vpslldq $4,%xmm4,%xmm4 |
| 1756 | vpxor %xmm4,%xmm1,%xmm1 |
| 1757 | vpxor %xmm2,%xmm1,%xmm1 |
| 1758 | vaesenc %xmm1,%xmm8,%xmm8 |
| 1759 | vmovdqu %xmm1,128(%rdx) |
| 1760 | |
| 1761 | vpshufd $0xff,%xmm1,%xmm2 |
| 1762 | vaesenclast %xmm14,%xmm2,%xmm2 |
| 1763 | vpslldq $4,%xmm3,%xmm4 |
| 1764 | vpxor %xmm4,%xmm3,%xmm3 |
| 1765 | vpslldq $4,%xmm4,%xmm4 |
| 1766 | vpxor %xmm4,%xmm3,%xmm3 |
| 1767 | vpslldq $4,%xmm4,%xmm4 |
| 1768 | vpxor %xmm4,%xmm3,%xmm3 |
| 1769 | vpxor %xmm2,%xmm3,%xmm3 |
| 1770 | vaesenc %xmm3,%xmm8,%xmm8 |
| 1771 | vmovdqu %xmm3,144(%rdx) |
| 1772 | |
| 1773 | vpshufb %xmm15,%xmm3,%xmm2 |
| 1774 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 1775 | vpslld $1,%xmm0,%xmm0 |
| 1776 | vpslldq $4,%xmm1,%xmm4 |
| 1777 | vpxor %xmm4,%xmm1,%xmm1 |
| 1778 | vpslldq $4,%xmm4,%xmm4 |
| 1779 | vpxor %xmm4,%xmm1,%xmm1 |
| 1780 | vpslldq $4,%xmm4,%xmm4 |
| 1781 | vpxor %xmm4,%xmm1,%xmm1 |
| 1782 | vpxor %xmm2,%xmm1,%xmm1 |
| 1783 | vaesenc %xmm1,%xmm8,%xmm8 |
| 1784 | vmovdqu %xmm1,160(%rdx) |
| 1785 | |
| 1786 | vpshufd $0xff,%xmm1,%xmm2 |
| 1787 | vaesenclast %xmm14,%xmm2,%xmm2 |
| 1788 | vpslldq $4,%xmm3,%xmm4 |
| 1789 | vpxor %xmm4,%xmm3,%xmm3 |
| 1790 | vpslldq $4,%xmm4,%xmm4 |
| 1791 | vpxor %xmm4,%xmm3,%xmm3 |
| 1792 | vpslldq $4,%xmm4,%xmm4 |
| 1793 | vpxor %xmm4,%xmm3,%xmm3 |
| 1794 | vpxor %xmm2,%xmm3,%xmm3 |
| 1795 | vaesenc %xmm3,%xmm8,%xmm8 |
| 1796 | vmovdqu %xmm3,176(%rdx) |
| 1797 | |
| 1798 | vpshufb %xmm15,%xmm3,%xmm2 |
| 1799 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 1800 | vpslld $1,%xmm0,%xmm0 |
| 1801 | vpslldq $4,%xmm1,%xmm4 |
| 1802 | vpxor %xmm4,%xmm1,%xmm1 |
| 1803 | vpslldq $4,%xmm4,%xmm4 |
| 1804 | vpxor %xmm4,%xmm1,%xmm1 |
| 1805 | vpslldq $4,%xmm4,%xmm4 |
| 1806 | vpxor %xmm4,%xmm1,%xmm1 |
| 1807 | vpxor %xmm2,%xmm1,%xmm1 |
| 1808 | vaesenc %xmm1,%xmm8,%xmm8 |
| 1809 | vmovdqu %xmm1,192(%rdx) |
| 1810 | |
| 1811 | vpshufd $0xff,%xmm1,%xmm2 |
| 1812 | vaesenclast %xmm14,%xmm2,%xmm2 |
| 1813 | vpslldq $4,%xmm3,%xmm4 |
| 1814 | vpxor %xmm4,%xmm3,%xmm3 |
| 1815 | vpslldq $4,%xmm4,%xmm4 |
| 1816 | vpxor %xmm4,%xmm3,%xmm3 |
| 1817 | vpslldq $4,%xmm4,%xmm4 |
| 1818 | vpxor %xmm4,%xmm3,%xmm3 |
| 1819 | vpxor %xmm2,%xmm3,%xmm3 |
| 1820 | vaesenc %xmm3,%xmm8,%xmm8 |
| 1821 | vmovdqu %xmm3,208(%rdx) |
| 1822 | |
| 1823 | vpshufb %xmm15,%xmm3,%xmm2 |
| 1824 | vaesenclast %xmm0,%xmm2,%xmm2 |
| 1825 | vpslldq $4,%xmm1,%xmm4 |
| 1826 | vpxor %xmm4,%xmm1,%xmm1 |
| 1827 | vpslldq $4,%xmm4,%xmm4 |
| 1828 | vpxor %xmm4,%xmm1,%xmm1 |
| 1829 | vpslldq $4,%xmm4,%xmm4 |
| 1830 | vpxor %xmm4,%xmm1,%xmm1 |
| 1831 | vpxor %xmm2,%xmm1,%xmm1 |
| 1832 | vaesenclast %xmm1,%xmm8,%xmm8 |
| 1833 | vmovdqu %xmm1,224(%rdx) |
| 1834 | |
| 1835 | vmovdqa %xmm8,(%rsi) |
| 1836 | .byte 0xf3,0xc3 |
| 1837 | .cfi_endproc |
| 1838 | .size aes256gcmsiv_aes_ks_enc_x1,.-aes256gcmsiv_aes_ks_enc_x1 |
| 1839 | .globl aes256gcmsiv_ecb_enc_block |
| 1840 | .hidden aes256gcmsiv_ecb_enc_block |
| 1841 | .type aes256gcmsiv_ecb_enc_block,@function |
| 1842 | .align 16 |
| 1843 | aes256gcmsiv_ecb_enc_block: |
| 1844 | .cfi_startproc |
| 1845 | vmovdqa (%rdi),%xmm1 |
| 1846 | vpxor (%rdx),%xmm1,%xmm1 |
| 1847 | vaesenc 16(%rdx),%xmm1,%xmm1 |
| 1848 | vaesenc 32(%rdx),%xmm1,%xmm1 |
| 1849 | vaesenc 48(%rdx),%xmm1,%xmm1 |
| 1850 | vaesenc 64(%rdx),%xmm1,%xmm1 |
| 1851 | vaesenc 80(%rdx),%xmm1,%xmm1 |
| 1852 | vaesenc 96(%rdx),%xmm1,%xmm1 |
| 1853 | vaesenc 112(%rdx),%xmm1,%xmm1 |
| 1854 | vaesenc 128(%rdx),%xmm1,%xmm1 |
| 1855 | vaesenc 144(%rdx),%xmm1,%xmm1 |
| 1856 | vaesenc 160(%rdx),%xmm1,%xmm1 |
| 1857 | vaesenc 176(%rdx),%xmm1,%xmm1 |
| 1858 | vaesenc 192(%rdx),%xmm1,%xmm1 |
| 1859 | vaesenc 208(%rdx),%xmm1,%xmm1 |
| 1860 | vaesenclast 224(%rdx),%xmm1,%xmm1 |
| 1861 | vmovdqa %xmm1,(%rsi) |
| 1862 | .byte 0xf3,0xc3 |
| 1863 | .cfi_endproc |
| 1864 | .size aes256gcmsiv_ecb_enc_block,.-aes256gcmsiv_ecb_enc_block |
| 1865 | .globl aes256gcmsiv_enc_msg_x4 |
| 1866 | .hidden aes256gcmsiv_enc_msg_x4 |
| 1867 | .type aes256gcmsiv_enc_msg_x4,@function |
| 1868 | .align 16 |
| 1869 | aes256gcmsiv_enc_msg_x4: |
| 1870 | .cfi_startproc |
| 1871 | testq %r8,%r8 |
| 1872 | jnz .L256_enc_msg_x4_start |
| 1873 | .byte 0xf3,0xc3 |
| 1874 | |
| 1875 | .L256_enc_msg_x4_start: |
| 1876 | movq %r8,%r10 |
| 1877 | shrq $4,%r8 |
| 1878 | shlq $60,%r10 |
| 1879 | jz .L256_enc_msg_x4_start2 |
| 1880 | addq $1,%r8 |
| 1881 | |
| 1882 | .L256_enc_msg_x4_start2: |
| 1883 | movq %r8,%r10 |
| 1884 | shlq $62,%r10 |
| 1885 | shrq $62,%r10 |
| 1886 | |
| 1887 | |
| 1888 | vmovdqa (%rdx),%xmm15 |
| 1889 | vpor OR_MASK(%rip),%xmm15,%xmm15 |
| 1890 | |
| 1891 | vmovdqa four(%rip),%xmm4 |
| 1892 | vmovdqa %xmm15,%xmm0 |
| 1893 | vpaddd one(%rip),%xmm15,%xmm1 |
| 1894 | vpaddd two(%rip),%xmm15,%xmm2 |
| 1895 | vpaddd three(%rip),%xmm15,%xmm3 |
| 1896 | |
| 1897 | shrq $2,%r8 |
| 1898 | je .L256_enc_msg_x4_check_remainder |
| 1899 | |
| 1900 | subq $64,%rsi |
| 1901 | subq $64,%rdi |
| 1902 | |
| 1903 | .L256_enc_msg_x4_loop1: |
| 1904 | addq $64,%rsi |
| 1905 | addq $64,%rdi |
| 1906 | |
| 1907 | vmovdqa %xmm0,%xmm5 |
| 1908 | vmovdqa %xmm1,%xmm6 |
| 1909 | vmovdqa %xmm2,%xmm7 |
| 1910 | vmovdqa %xmm3,%xmm8 |
| 1911 | |
| 1912 | vpxor (%rcx),%xmm5,%xmm5 |
| 1913 | vpxor (%rcx),%xmm6,%xmm6 |
| 1914 | vpxor (%rcx),%xmm7,%xmm7 |
| 1915 | vpxor (%rcx),%xmm8,%xmm8 |
| 1916 | |
| 1917 | vmovdqu 16(%rcx),%xmm12 |
| 1918 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1919 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1920 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1921 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1922 | |
| 1923 | vpaddd %xmm4,%xmm0,%xmm0 |
| 1924 | vmovdqu 32(%rcx),%xmm12 |
| 1925 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1926 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1927 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1928 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1929 | |
| 1930 | vpaddd %xmm4,%xmm1,%xmm1 |
| 1931 | vmovdqu 48(%rcx),%xmm12 |
| 1932 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1933 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1934 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1935 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1936 | |
| 1937 | vpaddd %xmm4,%xmm2,%xmm2 |
| 1938 | vmovdqu 64(%rcx),%xmm12 |
| 1939 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1940 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1941 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1942 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1943 | |
| 1944 | vpaddd %xmm4,%xmm3,%xmm3 |
| 1945 | |
| 1946 | vmovdqu 80(%rcx),%xmm12 |
| 1947 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1948 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1949 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1950 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1951 | |
| 1952 | vmovdqu 96(%rcx),%xmm12 |
| 1953 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1954 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1955 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1956 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1957 | |
| 1958 | vmovdqu 112(%rcx),%xmm12 |
| 1959 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1960 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1961 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1962 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1963 | |
| 1964 | vmovdqu 128(%rcx),%xmm12 |
| 1965 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1966 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1967 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1968 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1969 | |
| 1970 | vmovdqu 144(%rcx),%xmm12 |
| 1971 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1972 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1973 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1974 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1975 | |
| 1976 | vmovdqu 160(%rcx),%xmm12 |
| 1977 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1978 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1979 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1980 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1981 | |
| 1982 | vmovdqu 176(%rcx),%xmm12 |
| 1983 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1984 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1985 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1986 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1987 | |
| 1988 | vmovdqu 192(%rcx),%xmm12 |
| 1989 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1990 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1991 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1992 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1993 | |
| 1994 | vmovdqu 208(%rcx),%xmm12 |
| 1995 | vaesenc %xmm12,%xmm5,%xmm5 |
| 1996 | vaesenc %xmm12,%xmm6,%xmm6 |
| 1997 | vaesenc %xmm12,%xmm7,%xmm7 |
| 1998 | vaesenc %xmm12,%xmm8,%xmm8 |
| 1999 | |
| 2000 | vmovdqu 224(%rcx),%xmm12 |
| 2001 | vaesenclast %xmm12,%xmm5,%xmm5 |
| 2002 | vaesenclast %xmm12,%xmm6,%xmm6 |
| 2003 | vaesenclast %xmm12,%xmm7,%xmm7 |
| 2004 | vaesenclast %xmm12,%xmm8,%xmm8 |
| 2005 | |
| 2006 | |
| 2007 | |
| 2008 | vpxor 0(%rdi),%xmm5,%xmm5 |
| 2009 | vpxor 16(%rdi),%xmm6,%xmm6 |
| 2010 | vpxor 32(%rdi),%xmm7,%xmm7 |
| 2011 | vpxor 48(%rdi),%xmm8,%xmm8 |
| 2012 | |
| 2013 | subq $1,%r8 |
| 2014 | |
| 2015 | vmovdqu %xmm5,0(%rsi) |
| 2016 | vmovdqu %xmm6,16(%rsi) |
| 2017 | vmovdqu %xmm7,32(%rsi) |
| 2018 | vmovdqu %xmm8,48(%rsi) |
| 2019 | |
| 2020 | jne .L256_enc_msg_x4_loop1 |
| 2021 | |
| 2022 | addq $64,%rsi |
| 2023 | addq $64,%rdi |
| 2024 | |
| 2025 | .L256_enc_msg_x4_check_remainder: |
| 2026 | cmpq $0,%r10 |
| 2027 | je .L256_enc_msg_x4_out |
| 2028 | |
| 2029 | .L256_enc_msg_x4_loop2: |
| 2030 | |
| 2031 | |
| 2032 | |
| 2033 | vmovdqa %xmm0,%xmm5 |
| 2034 | vpaddd one(%rip),%xmm0,%xmm0 |
| 2035 | vpxor (%rcx),%xmm5,%xmm5 |
| 2036 | vaesenc 16(%rcx),%xmm5,%xmm5 |
| 2037 | vaesenc 32(%rcx),%xmm5,%xmm5 |
| 2038 | vaesenc 48(%rcx),%xmm5,%xmm5 |
| 2039 | vaesenc 64(%rcx),%xmm5,%xmm5 |
| 2040 | vaesenc 80(%rcx),%xmm5,%xmm5 |
| 2041 | vaesenc 96(%rcx),%xmm5,%xmm5 |
| 2042 | vaesenc 112(%rcx),%xmm5,%xmm5 |
| 2043 | vaesenc 128(%rcx),%xmm5,%xmm5 |
| 2044 | vaesenc 144(%rcx),%xmm5,%xmm5 |
| 2045 | vaesenc 160(%rcx),%xmm5,%xmm5 |
| 2046 | vaesenc 176(%rcx),%xmm5,%xmm5 |
| 2047 | vaesenc 192(%rcx),%xmm5,%xmm5 |
| 2048 | vaesenc 208(%rcx),%xmm5,%xmm5 |
| 2049 | vaesenclast 224(%rcx),%xmm5,%xmm5 |
| 2050 | |
| 2051 | |
| 2052 | vpxor (%rdi),%xmm5,%xmm5 |
| 2053 | |
| 2054 | vmovdqu %xmm5,(%rsi) |
| 2055 | |
| 2056 | addq $16,%rdi |
| 2057 | addq $16,%rsi |
| 2058 | |
| 2059 | subq $1,%r10 |
| 2060 | jne .L256_enc_msg_x4_loop2 |
| 2061 | |
| 2062 | .L256_enc_msg_x4_out: |
| 2063 | .byte 0xf3,0xc3 |
| 2064 | .cfi_endproc |
| 2065 | .size aes256gcmsiv_enc_msg_x4,.-aes256gcmsiv_enc_msg_x4 |
| 2066 | .globl aes256gcmsiv_enc_msg_x8 |
| 2067 | .hidden aes256gcmsiv_enc_msg_x8 |
| 2068 | .type aes256gcmsiv_enc_msg_x8,@function |
| 2069 | .align 16 |
| 2070 | aes256gcmsiv_enc_msg_x8: |
| 2071 | .cfi_startproc |
| 2072 | testq %r8,%r8 |
| 2073 | jnz .L256_enc_msg_x8_start |
| 2074 | .byte 0xf3,0xc3 |
| 2075 | |
| 2076 | .L256_enc_msg_x8_start: |
| 2077 | |
| 2078 | movq %rsp,%r11 |
| 2079 | subq $16,%r11 |
| 2080 | andq $-64,%r11 |
| 2081 | |
| 2082 | movq %r8,%r10 |
| 2083 | shrq $4,%r8 |
| 2084 | shlq $60,%r10 |
| 2085 | jz .L256_enc_msg_x8_start2 |
| 2086 | addq $1,%r8 |
| 2087 | |
| 2088 | .L256_enc_msg_x8_start2: |
| 2089 | movq %r8,%r10 |
| 2090 | shlq $61,%r10 |
| 2091 | shrq $61,%r10 |
| 2092 | |
| 2093 | |
| 2094 | vmovdqa (%rdx),%xmm1 |
| 2095 | vpor OR_MASK(%rip),%xmm1,%xmm1 |
| 2096 | |
| 2097 | |
| 2098 | vpaddd seven(%rip),%xmm1,%xmm0 |
| 2099 | vmovdqa %xmm0,(%r11) |
| 2100 | vpaddd one(%rip),%xmm1,%xmm9 |
| 2101 | vpaddd two(%rip),%xmm1,%xmm10 |
| 2102 | vpaddd three(%rip),%xmm1,%xmm11 |
| 2103 | vpaddd four(%rip),%xmm1,%xmm12 |
| 2104 | vpaddd five(%rip),%xmm1,%xmm13 |
| 2105 | vpaddd six(%rip),%xmm1,%xmm14 |
| 2106 | vmovdqa %xmm1,%xmm0 |
| 2107 | |
| 2108 | shrq $3,%r8 |
| 2109 | jz .L256_enc_msg_x8_check_remainder |
| 2110 | |
| 2111 | subq $128,%rsi |
| 2112 | subq $128,%rdi |
| 2113 | |
| 2114 | .L256_enc_msg_x8_loop1: |
| 2115 | addq $128,%rsi |
| 2116 | addq $128,%rdi |
| 2117 | |
| 2118 | vmovdqa %xmm0,%xmm1 |
| 2119 | vmovdqa %xmm9,%xmm2 |
| 2120 | vmovdqa %xmm10,%xmm3 |
| 2121 | vmovdqa %xmm11,%xmm4 |
| 2122 | vmovdqa %xmm12,%xmm5 |
| 2123 | vmovdqa %xmm13,%xmm6 |
| 2124 | vmovdqa %xmm14,%xmm7 |
| 2125 | |
| 2126 | vmovdqa (%r11),%xmm8 |
| 2127 | |
| 2128 | vpxor (%rcx),%xmm1,%xmm1 |
| 2129 | vpxor (%rcx),%xmm2,%xmm2 |
| 2130 | vpxor (%rcx),%xmm3,%xmm3 |
| 2131 | vpxor (%rcx),%xmm4,%xmm4 |
| 2132 | vpxor (%rcx),%xmm5,%xmm5 |
| 2133 | vpxor (%rcx),%xmm6,%xmm6 |
| 2134 | vpxor (%rcx),%xmm7,%xmm7 |
| 2135 | vpxor (%rcx),%xmm8,%xmm8 |
| 2136 | |
| 2137 | vmovdqu 16(%rcx),%xmm15 |
| 2138 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2139 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2140 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2141 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2142 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2143 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2144 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2145 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2146 | |
| 2147 | vmovdqa (%r11),%xmm14 |
| 2148 | vpaddd eight(%rip),%xmm14,%xmm14 |
| 2149 | vmovdqa %xmm14,(%r11) |
| 2150 | vmovdqu 32(%rcx),%xmm15 |
| 2151 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2152 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2153 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2154 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2155 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2156 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2157 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2158 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2159 | |
| 2160 | vpsubd one(%rip),%xmm14,%xmm14 |
| 2161 | vmovdqu 48(%rcx),%xmm15 |
| 2162 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2163 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2164 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2165 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2166 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2167 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2168 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2169 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2170 | |
| 2171 | vpaddd eight(%rip),%xmm0,%xmm0 |
| 2172 | vmovdqu 64(%rcx),%xmm15 |
| 2173 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2174 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2175 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2176 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2177 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2178 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2179 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2180 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2181 | |
| 2182 | vpaddd eight(%rip),%xmm9,%xmm9 |
| 2183 | vmovdqu 80(%rcx),%xmm15 |
| 2184 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2185 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2186 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2187 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2188 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2189 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2190 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2191 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2192 | |
| 2193 | vpaddd eight(%rip),%xmm10,%xmm10 |
| 2194 | vmovdqu 96(%rcx),%xmm15 |
| 2195 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2196 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2197 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2198 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2199 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2200 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2201 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2202 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2203 | |
| 2204 | vpaddd eight(%rip),%xmm11,%xmm11 |
| 2205 | vmovdqu 112(%rcx),%xmm15 |
| 2206 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2207 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2208 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2209 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2210 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2211 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2212 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2213 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2214 | |
| 2215 | vpaddd eight(%rip),%xmm12,%xmm12 |
| 2216 | vmovdqu 128(%rcx),%xmm15 |
| 2217 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2218 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2219 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2220 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2221 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2222 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2223 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2224 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2225 | |
| 2226 | vpaddd eight(%rip),%xmm13,%xmm13 |
| 2227 | vmovdqu 144(%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 160(%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 176(%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 192(%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 208(%rcx),%xmm15 |
| 2268 | vaesenc %xmm15,%xmm1,%xmm1 |
| 2269 | vaesenc %xmm15,%xmm2,%xmm2 |
| 2270 | vaesenc %xmm15,%xmm3,%xmm3 |
| 2271 | vaesenc %xmm15,%xmm4,%xmm4 |
| 2272 | vaesenc %xmm15,%xmm5,%xmm5 |
| 2273 | vaesenc %xmm15,%xmm6,%xmm6 |
| 2274 | vaesenc %xmm15,%xmm7,%xmm7 |
| 2275 | vaesenc %xmm15,%xmm8,%xmm8 |
| 2276 | |
| 2277 | vmovdqu 224(%rcx),%xmm15 |
| 2278 | vaesenclast %xmm15,%xmm1,%xmm1 |
| 2279 | vaesenclast %xmm15,%xmm2,%xmm2 |
| 2280 | vaesenclast %xmm15,%xmm3,%xmm3 |
| 2281 | vaesenclast %xmm15,%xmm4,%xmm4 |
| 2282 | vaesenclast %xmm15,%xmm5,%xmm5 |
| 2283 | vaesenclast %xmm15,%xmm6,%xmm6 |
| 2284 | vaesenclast %xmm15,%xmm7,%xmm7 |
| 2285 | vaesenclast %xmm15,%xmm8,%xmm8 |
| 2286 | |
| 2287 | |
| 2288 | |
| 2289 | vpxor 0(%rdi),%xmm1,%xmm1 |
| 2290 | vpxor 16(%rdi),%xmm2,%xmm2 |
| 2291 | vpxor 32(%rdi),%xmm3,%xmm3 |
| 2292 | vpxor 48(%rdi),%xmm4,%xmm4 |
| 2293 | vpxor 64(%rdi),%xmm5,%xmm5 |
| 2294 | vpxor 80(%rdi),%xmm6,%xmm6 |
| 2295 | vpxor 96(%rdi),%xmm7,%xmm7 |
| 2296 | vpxor 112(%rdi),%xmm8,%xmm8 |
| 2297 | |
| 2298 | subq $1,%r8 |
| 2299 | |
| 2300 | vmovdqu %xmm1,0(%rsi) |
| 2301 | vmovdqu %xmm2,16(%rsi) |
| 2302 | vmovdqu %xmm3,32(%rsi) |
| 2303 | vmovdqu %xmm4,48(%rsi) |
| 2304 | vmovdqu %xmm5,64(%rsi) |
| 2305 | vmovdqu %xmm6,80(%rsi) |
| 2306 | vmovdqu %xmm7,96(%rsi) |
| 2307 | vmovdqu %xmm8,112(%rsi) |
| 2308 | |
| 2309 | jne .L256_enc_msg_x8_loop1 |
| 2310 | |
| 2311 | addq $128,%rsi |
| 2312 | addq $128,%rdi |
| 2313 | |
| 2314 | .L256_enc_msg_x8_check_remainder: |
| 2315 | cmpq $0,%r10 |
| 2316 | je .L256_enc_msg_x8_out |
| 2317 | |
| 2318 | .L256_enc_msg_x8_loop2: |
| 2319 | |
| 2320 | |
| 2321 | vmovdqa %xmm0,%xmm1 |
| 2322 | vpaddd one(%rip),%xmm0,%xmm0 |
| 2323 | |
| 2324 | vpxor (%rcx),%xmm1,%xmm1 |
| 2325 | vaesenc 16(%rcx),%xmm1,%xmm1 |
| 2326 | vaesenc 32(%rcx),%xmm1,%xmm1 |
| 2327 | vaesenc 48(%rcx),%xmm1,%xmm1 |
| 2328 | vaesenc 64(%rcx),%xmm1,%xmm1 |
| 2329 | vaesenc 80(%rcx),%xmm1,%xmm1 |
| 2330 | vaesenc 96(%rcx),%xmm1,%xmm1 |
| 2331 | vaesenc 112(%rcx),%xmm1,%xmm1 |
| 2332 | vaesenc 128(%rcx),%xmm1,%xmm1 |
| 2333 | vaesenc 144(%rcx),%xmm1,%xmm1 |
| 2334 | vaesenc 160(%rcx),%xmm1,%xmm1 |
| 2335 | vaesenc 176(%rcx),%xmm1,%xmm1 |
| 2336 | vaesenc 192(%rcx),%xmm1,%xmm1 |
| 2337 | vaesenc 208(%rcx),%xmm1,%xmm1 |
| 2338 | vaesenclast 224(%rcx),%xmm1,%xmm1 |
| 2339 | |
| 2340 | |
| 2341 | vpxor (%rdi),%xmm1,%xmm1 |
| 2342 | |
| 2343 | vmovdqu %xmm1,(%rsi) |
| 2344 | |
| 2345 | addq $16,%rdi |
| 2346 | addq $16,%rsi |
| 2347 | subq $1,%r10 |
| 2348 | jnz .L256_enc_msg_x8_loop2 |
| 2349 | |
| 2350 | .L256_enc_msg_x8_out: |
| 2351 | .byte 0xf3,0xc3 |
| 2352 | |
| 2353 | .cfi_endproc |
| 2354 | .size aes256gcmsiv_enc_msg_x8,.-aes256gcmsiv_enc_msg_x8 |
| 2355 | .globl aes256gcmsiv_dec |
| 2356 | .hidden aes256gcmsiv_dec |
| 2357 | .type aes256gcmsiv_dec,@function |
| 2358 | .align 16 |
| 2359 | aes256gcmsiv_dec: |
| 2360 | .cfi_startproc |
| 2361 | testq $~15,%r9 |
| 2362 | jnz .L256_dec_start |
| 2363 | .byte 0xf3,0xc3 |
| 2364 | |
| 2365 | .L256_dec_start: |
| 2366 | vzeroupper |
| 2367 | vmovdqa (%rdx),%xmm0 |
| 2368 | movq %rdx,%rax |
| 2369 | |
| 2370 | leaq 32(%rax),%rax |
| 2371 | leaq 32(%rcx),%rcx |
| 2372 | |
| 2373 | |
| 2374 | vmovdqu (%rdi,%r9,1),%xmm15 |
| 2375 | vpor OR_MASK(%rip),%xmm15,%xmm15 |
| 2376 | andq $~15,%r9 |
| 2377 | |
| 2378 | |
| 2379 | cmpq $96,%r9 |
| 2380 | jb .L256_dec_loop2 |
| 2381 | |
| 2382 | |
| 2383 | subq $96,%r9 |
| 2384 | vmovdqa %xmm15,%xmm7 |
| 2385 | vpaddd one(%rip),%xmm7,%xmm8 |
| 2386 | vpaddd two(%rip),%xmm7,%xmm9 |
| 2387 | vpaddd one(%rip),%xmm9,%xmm10 |
| 2388 | vpaddd two(%rip),%xmm9,%xmm11 |
| 2389 | vpaddd one(%rip),%xmm11,%xmm12 |
| 2390 | vpaddd two(%rip),%xmm11,%xmm15 |
| 2391 | |
| 2392 | vpxor (%r8),%xmm7,%xmm7 |
| 2393 | vpxor (%r8),%xmm8,%xmm8 |
| 2394 | vpxor (%r8),%xmm9,%xmm9 |
| 2395 | vpxor (%r8),%xmm10,%xmm10 |
| 2396 | vpxor (%r8),%xmm11,%xmm11 |
| 2397 | vpxor (%r8),%xmm12,%xmm12 |
| 2398 | |
| 2399 | vmovdqu 16(%r8),%xmm4 |
| 2400 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2401 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2402 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2403 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2404 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2405 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2406 | |
| 2407 | vmovdqu 32(%r8),%xmm4 |
| 2408 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2409 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2410 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2411 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2412 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2413 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2414 | |
| 2415 | vmovdqu 48(%r8),%xmm4 |
| 2416 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2417 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2418 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2419 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2420 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2421 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2422 | |
| 2423 | vmovdqu 64(%r8),%xmm4 |
| 2424 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2425 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2426 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2427 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2428 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2429 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2430 | |
| 2431 | vmovdqu 80(%r8),%xmm4 |
| 2432 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2433 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2434 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2435 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2436 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2437 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2438 | |
| 2439 | vmovdqu 96(%r8),%xmm4 |
| 2440 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2441 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2442 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2443 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2444 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2445 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2446 | |
| 2447 | vmovdqu 112(%r8),%xmm4 |
| 2448 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2449 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2450 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2451 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2452 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2453 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2454 | |
| 2455 | vmovdqu 128(%r8),%xmm4 |
| 2456 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2457 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2458 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2459 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2460 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2461 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2462 | |
| 2463 | vmovdqu 144(%r8),%xmm4 |
| 2464 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2465 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2466 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2467 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2468 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2469 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2470 | |
| 2471 | vmovdqu 160(%r8),%xmm4 |
| 2472 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2473 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2474 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2475 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2476 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2477 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2478 | |
| 2479 | vmovdqu 176(%r8),%xmm4 |
| 2480 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2481 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2482 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2483 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2484 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2485 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2486 | |
| 2487 | vmovdqu 192(%r8),%xmm4 |
| 2488 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2489 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2490 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2491 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2492 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2493 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2494 | |
| 2495 | vmovdqu 208(%r8),%xmm4 |
| 2496 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2497 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2498 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2499 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2500 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2501 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2502 | |
| 2503 | vmovdqu 224(%r8),%xmm4 |
| 2504 | vaesenclast %xmm4,%xmm7,%xmm7 |
| 2505 | vaesenclast %xmm4,%xmm8,%xmm8 |
| 2506 | vaesenclast %xmm4,%xmm9,%xmm9 |
| 2507 | vaesenclast %xmm4,%xmm10,%xmm10 |
| 2508 | vaesenclast %xmm4,%xmm11,%xmm11 |
| 2509 | vaesenclast %xmm4,%xmm12,%xmm12 |
| 2510 | |
| 2511 | |
| 2512 | vpxor 0(%rdi),%xmm7,%xmm7 |
| 2513 | vpxor 16(%rdi),%xmm8,%xmm8 |
| 2514 | vpxor 32(%rdi),%xmm9,%xmm9 |
| 2515 | vpxor 48(%rdi),%xmm10,%xmm10 |
| 2516 | vpxor 64(%rdi),%xmm11,%xmm11 |
| 2517 | vpxor 80(%rdi),%xmm12,%xmm12 |
| 2518 | |
| 2519 | vmovdqu %xmm7,0(%rsi) |
| 2520 | vmovdqu %xmm8,16(%rsi) |
| 2521 | vmovdqu %xmm9,32(%rsi) |
| 2522 | vmovdqu %xmm10,48(%rsi) |
| 2523 | vmovdqu %xmm11,64(%rsi) |
| 2524 | vmovdqu %xmm12,80(%rsi) |
| 2525 | |
| 2526 | addq $96,%rdi |
| 2527 | addq $96,%rsi |
| 2528 | jmp .L256_dec_loop1 |
| 2529 | |
| 2530 | |
| 2531 | .align 64 |
| 2532 | .L256_dec_loop1: |
| 2533 | cmpq $96,%r9 |
| 2534 | jb .L256_dec_finish_96 |
| 2535 | subq $96,%r9 |
| 2536 | |
| 2537 | vmovdqa %xmm12,%xmm6 |
| 2538 | vmovdqa %xmm11,16-32(%rax) |
| 2539 | vmovdqa %xmm10,32-32(%rax) |
| 2540 | vmovdqa %xmm9,48-32(%rax) |
| 2541 | vmovdqa %xmm8,64-32(%rax) |
| 2542 | vmovdqa %xmm7,80-32(%rax) |
| 2543 | |
| 2544 | vmovdqa %xmm15,%xmm7 |
| 2545 | vpaddd one(%rip),%xmm7,%xmm8 |
| 2546 | vpaddd two(%rip),%xmm7,%xmm9 |
| 2547 | vpaddd one(%rip),%xmm9,%xmm10 |
| 2548 | vpaddd two(%rip),%xmm9,%xmm11 |
| 2549 | vpaddd one(%rip),%xmm11,%xmm12 |
| 2550 | vpaddd two(%rip),%xmm11,%xmm15 |
| 2551 | |
| 2552 | vmovdqa (%r8),%xmm4 |
| 2553 | vpxor %xmm4,%xmm7,%xmm7 |
| 2554 | vpxor %xmm4,%xmm8,%xmm8 |
| 2555 | vpxor %xmm4,%xmm9,%xmm9 |
| 2556 | vpxor %xmm4,%xmm10,%xmm10 |
| 2557 | vpxor %xmm4,%xmm11,%xmm11 |
| 2558 | vpxor %xmm4,%xmm12,%xmm12 |
| 2559 | |
| 2560 | vmovdqu 0-32(%rcx),%xmm4 |
| 2561 | vpclmulqdq $0x11,%xmm4,%xmm6,%xmm2 |
| 2562 | vpclmulqdq $0x00,%xmm4,%xmm6,%xmm3 |
| 2563 | vpclmulqdq $0x01,%xmm4,%xmm6,%xmm1 |
| 2564 | vpclmulqdq $0x10,%xmm4,%xmm6,%xmm4 |
| 2565 | vpxor %xmm4,%xmm1,%xmm1 |
| 2566 | |
| 2567 | vmovdqu 16(%r8),%xmm4 |
| 2568 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2569 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2570 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2571 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2572 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2573 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2574 | |
| 2575 | vmovdqu -16(%rax),%xmm6 |
| 2576 | vmovdqu -16(%rcx),%xmm13 |
| 2577 | |
| 2578 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 2579 | vpxor %xmm4,%xmm1,%xmm1 |
| 2580 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 2581 | vpxor %xmm4,%xmm2,%xmm2 |
| 2582 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 2583 | vpxor %xmm4,%xmm3,%xmm3 |
| 2584 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 2585 | vpxor %xmm4,%xmm1,%xmm1 |
| 2586 | |
| 2587 | |
| 2588 | vmovdqu 32(%r8),%xmm4 |
| 2589 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2590 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2591 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2592 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2593 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2594 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2595 | |
| 2596 | vmovdqu 0(%rax),%xmm6 |
| 2597 | vmovdqu 0(%rcx),%xmm13 |
| 2598 | |
| 2599 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 2600 | vpxor %xmm4,%xmm1,%xmm1 |
| 2601 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 2602 | vpxor %xmm4,%xmm2,%xmm2 |
| 2603 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 2604 | vpxor %xmm4,%xmm3,%xmm3 |
| 2605 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 2606 | vpxor %xmm4,%xmm1,%xmm1 |
| 2607 | |
| 2608 | |
| 2609 | vmovdqu 48(%r8),%xmm4 |
| 2610 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2611 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2612 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2613 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2614 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2615 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2616 | |
| 2617 | vmovdqu 16(%rax),%xmm6 |
| 2618 | vmovdqu 16(%rcx),%xmm13 |
| 2619 | |
| 2620 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 2621 | vpxor %xmm4,%xmm1,%xmm1 |
| 2622 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 2623 | vpxor %xmm4,%xmm2,%xmm2 |
| 2624 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 2625 | vpxor %xmm4,%xmm3,%xmm3 |
| 2626 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 2627 | vpxor %xmm4,%xmm1,%xmm1 |
| 2628 | |
| 2629 | |
| 2630 | vmovdqu 64(%r8),%xmm4 |
| 2631 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2632 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2633 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2634 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2635 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2636 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2637 | |
| 2638 | vmovdqu 32(%rax),%xmm6 |
| 2639 | vmovdqu 32(%rcx),%xmm13 |
| 2640 | |
| 2641 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 2642 | vpxor %xmm4,%xmm1,%xmm1 |
| 2643 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 2644 | vpxor %xmm4,%xmm2,%xmm2 |
| 2645 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 2646 | vpxor %xmm4,%xmm3,%xmm3 |
| 2647 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 2648 | vpxor %xmm4,%xmm1,%xmm1 |
| 2649 | |
| 2650 | |
| 2651 | vmovdqu 80(%r8),%xmm4 |
| 2652 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2653 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2654 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2655 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2656 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2657 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2658 | |
| 2659 | vmovdqu 96(%r8),%xmm4 |
| 2660 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2661 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2662 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2663 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2664 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2665 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2666 | |
| 2667 | vmovdqu 112(%r8),%xmm4 |
| 2668 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2669 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2670 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2671 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2672 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2673 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2674 | |
| 2675 | |
| 2676 | vmovdqa 80-32(%rax),%xmm6 |
| 2677 | vpxor %xmm0,%xmm6,%xmm6 |
| 2678 | vmovdqu 80-32(%rcx),%xmm5 |
| 2679 | |
| 2680 | vpclmulqdq $0x01,%xmm5,%xmm6,%xmm4 |
| 2681 | vpxor %xmm4,%xmm1,%xmm1 |
| 2682 | vpclmulqdq $0x11,%xmm5,%xmm6,%xmm4 |
| 2683 | vpxor %xmm4,%xmm2,%xmm2 |
| 2684 | vpclmulqdq $0x00,%xmm5,%xmm6,%xmm4 |
| 2685 | vpxor %xmm4,%xmm3,%xmm3 |
| 2686 | vpclmulqdq $0x10,%xmm5,%xmm6,%xmm4 |
| 2687 | vpxor %xmm4,%xmm1,%xmm1 |
| 2688 | |
| 2689 | vmovdqu 128(%r8),%xmm4 |
| 2690 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2691 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2692 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2693 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2694 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2695 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2696 | |
| 2697 | |
| 2698 | vpsrldq $8,%xmm1,%xmm4 |
| 2699 | vpxor %xmm4,%xmm2,%xmm5 |
| 2700 | vpslldq $8,%xmm1,%xmm4 |
| 2701 | vpxor %xmm4,%xmm3,%xmm0 |
| 2702 | |
| 2703 | vmovdqa poly(%rip),%xmm3 |
| 2704 | |
| 2705 | vmovdqu 144(%r8),%xmm4 |
| 2706 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2707 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2708 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2709 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2710 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2711 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2712 | |
| 2713 | vmovdqu 160(%r8),%xmm4 |
| 2714 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2715 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2716 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2717 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2718 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2719 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2720 | |
| 2721 | vmovdqu 176(%r8),%xmm4 |
| 2722 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2723 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2724 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2725 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2726 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2727 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2728 | |
| 2729 | vmovdqu 192(%r8),%xmm4 |
| 2730 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2731 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2732 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2733 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2734 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2735 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2736 | |
| 2737 | vmovdqu 208(%r8),%xmm4 |
| 2738 | vaesenc %xmm4,%xmm7,%xmm7 |
| 2739 | vaesenc %xmm4,%xmm8,%xmm8 |
| 2740 | vaesenc %xmm4,%xmm9,%xmm9 |
| 2741 | vaesenc %xmm4,%xmm10,%xmm10 |
| 2742 | vaesenc %xmm4,%xmm11,%xmm11 |
| 2743 | vaesenc %xmm4,%xmm12,%xmm12 |
| 2744 | |
| 2745 | vmovdqu 224(%r8),%xmm6 |
| 2746 | vpalignr $8,%xmm0,%xmm0,%xmm2 |
| 2747 | vpclmulqdq $0x10,%xmm3,%xmm0,%xmm0 |
| 2748 | vpxor %xmm0,%xmm2,%xmm0 |
| 2749 | |
| 2750 | vpxor 0(%rdi),%xmm6,%xmm4 |
| 2751 | vaesenclast %xmm4,%xmm7,%xmm7 |
| 2752 | vpxor 16(%rdi),%xmm6,%xmm4 |
| 2753 | vaesenclast %xmm4,%xmm8,%xmm8 |
| 2754 | vpxor 32(%rdi),%xmm6,%xmm4 |
| 2755 | vaesenclast %xmm4,%xmm9,%xmm9 |
| 2756 | vpxor 48(%rdi),%xmm6,%xmm4 |
| 2757 | vaesenclast %xmm4,%xmm10,%xmm10 |
| 2758 | vpxor 64(%rdi),%xmm6,%xmm4 |
| 2759 | vaesenclast %xmm4,%xmm11,%xmm11 |
| 2760 | vpxor 80(%rdi),%xmm6,%xmm4 |
| 2761 | vaesenclast %xmm4,%xmm12,%xmm12 |
| 2762 | |
| 2763 | vpalignr $8,%xmm0,%xmm0,%xmm2 |
| 2764 | vpclmulqdq $0x10,%xmm3,%xmm0,%xmm0 |
| 2765 | vpxor %xmm0,%xmm2,%xmm0 |
| 2766 | |
| 2767 | vmovdqu %xmm7,0(%rsi) |
| 2768 | vmovdqu %xmm8,16(%rsi) |
| 2769 | vmovdqu %xmm9,32(%rsi) |
| 2770 | vmovdqu %xmm10,48(%rsi) |
| 2771 | vmovdqu %xmm11,64(%rsi) |
| 2772 | vmovdqu %xmm12,80(%rsi) |
| 2773 | |
| 2774 | vpxor %xmm5,%xmm0,%xmm0 |
| 2775 | |
| 2776 | leaq 96(%rdi),%rdi |
| 2777 | leaq 96(%rsi),%rsi |
| 2778 | jmp .L256_dec_loop1 |
| 2779 | |
| 2780 | .L256_dec_finish_96: |
| 2781 | vmovdqa %xmm12,%xmm6 |
| 2782 | vmovdqa %xmm11,16-32(%rax) |
| 2783 | vmovdqa %xmm10,32-32(%rax) |
| 2784 | vmovdqa %xmm9,48-32(%rax) |
| 2785 | vmovdqa %xmm8,64-32(%rax) |
| 2786 | vmovdqa %xmm7,80-32(%rax) |
| 2787 | |
| 2788 | vmovdqu 0-32(%rcx),%xmm4 |
| 2789 | vpclmulqdq $0x10,%xmm4,%xmm6,%xmm1 |
| 2790 | vpclmulqdq $0x11,%xmm4,%xmm6,%xmm2 |
| 2791 | vpclmulqdq $0x00,%xmm4,%xmm6,%xmm3 |
| 2792 | vpclmulqdq $0x01,%xmm4,%xmm6,%xmm4 |
| 2793 | vpxor %xmm4,%xmm1,%xmm1 |
| 2794 | |
| 2795 | vmovdqu -16(%rax),%xmm6 |
| 2796 | vmovdqu -16(%rcx),%xmm13 |
| 2797 | |
| 2798 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 2799 | vpxor %xmm4,%xmm1,%xmm1 |
| 2800 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 2801 | vpxor %xmm4,%xmm2,%xmm2 |
| 2802 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 2803 | vpxor %xmm4,%xmm3,%xmm3 |
| 2804 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 2805 | vpxor %xmm4,%xmm1,%xmm1 |
| 2806 | |
| 2807 | vmovdqu 0(%rax),%xmm6 |
| 2808 | vmovdqu 0(%rcx),%xmm13 |
| 2809 | |
| 2810 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 2811 | vpxor %xmm4,%xmm1,%xmm1 |
| 2812 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 2813 | vpxor %xmm4,%xmm2,%xmm2 |
| 2814 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 2815 | vpxor %xmm4,%xmm3,%xmm3 |
| 2816 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 2817 | vpxor %xmm4,%xmm1,%xmm1 |
| 2818 | |
| 2819 | vmovdqu 16(%rax),%xmm6 |
| 2820 | vmovdqu 16(%rcx),%xmm13 |
| 2821 | |
| 2822 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 2823 | vpxor %xmm4,%xmm1,%xmm1 |
| 2824 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 2825 | vpxor %xmm4,%xmm2,%xmm2 |
| 2826 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 2827 | vpxor %xmm4,%xmm3,%xmm3 |
| 2828 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 2829 | vpxor %xmm4,%xmm1,%xmm1 |
| 2830 | |
| 2831 | vmovdqu 32(%rax),%xmm6 |
| 2832 | vmovdqu 32(%rcx),%xmm13 |
| 2833 | |
| 2834 | vpclmulqdq $0x10,%xmm13,%xmm6,%xmm4 |
| 2835 | vpxor %xmm4,%xmm1,%xmm1 |
| 2836 | vpclmulqdq $0x11,%xmm13,%xmm6,%xmm4 |
| 2837 | vpxor %xmm4,%xmm2,%xmm2 |
| 2838 | vpclmulqdq $0x00,%xmm13,%xmm6,%xmm4 |
| 2839 | vpxor %xmm4,%xmm3,%xmm3 |
| 2840 | vpclmulqdq $0x01,%xmm13,%xmm6,%xmm4 |
| 2841 | vpxor %xmm4,%xmm1,%xmm1 |
| 2842 | |
| 2843 | |
| 2844 | vmovdqu 80-32(%rax),%xmm6 |
| 2845 | vpxor %xmm0,%xmm6,%xmm6 |
| 2846 | vmovdqu 80-32(%rcx),%xmm5 |
| 2847 | vpclmulqdq $0x11,%xmm5,%xmm6,%xmm4 |
| 2848 | vpxor %xmm4,%xmm2,%xmm2 |
| 2849 | vpclmulqdq $0x00,%xmm5,%xmm6,%xmm4 |
| 2850 | vpxor %xmm4,%xmm3,%xmm3 |
| 2851 | vpclmulqdq $0x10,%xmm5,%xmm6,%xmm4 |
| 2852 | vpxor %xmm4,%xmm1,%xmm1 |
| 2853 | vpclmulqdq $0x01,%xmm5,%xmm6,%xmm4 |
| 2854 | vpxor %xmm4,%xmm1,%xmm1 |
| 2855 | |
| 2856 | vpsrldq $8,%xmm1,%xmm4 |
| 2857 | vpxor %xmm4,%xmm2,%xmm5 |
| 2858 | vpslldq $8,%xmm1,%xmm4 |
| 2859 | vpxor %xmm4,%xmm3,%xmm0 |
| 2860 | |
| 2861 | vmovdqa poly(%rip),%xmm3 |
| 2862 | |
| 2863 | vpalignr $8,%xmm0,%xmm0,%xmm2 |
| 2864 | vpclmulqdq $0x10,%xmm3,%xmm0,%xmm0 |
| 2865 | vpxor %xmm0,%xmm2,%xmm0 |
| 2866 | |
| 2867 | vpalignr $8,%xmm0,%xmm0,%xmm2 |
| 2868 | vpclmulqdq $0x10,%xmm3,%xmm0,%xmm0 |
| 2869 | vpxor %xmm0,%xmm2,%xmm0 |
| 2870 | |
| 2871 | vpxor %xmm5,%xmm0,%xmm0 |
| 2872 | |
| 2873 | .L256_dec_loop2: |
| 2874 | |
| 2875 | |
| 2876 | |
| 2877 | cmpq $16,%r9 |
| 2878 | jb .L256_dec_out |
| 2879 | subq $16,%r9 |
| 2880 | |
| 2881 | vmovdqa %xmm15,%xmm2 |
| 2882 | vpaddd one(%rip),%xmm15,%xmm15 |
| 2883 | |
| 2884 | vpxor 0(%r8),%xmm2,%xmm2 |
| 2885 | vaesenc 16(%r8),%xmm2,%xmm2 |
| 2886 | vaesenc 32(%r8),%xmm2,%xmm2 |
| 2887 | vaesenc 48(%r8),%xmm2,%xmm2 |
| 2888 | vaesenc 64(%r8),%xmm2,%xmm2 |
| 2889 | vaesenc 80(%r8),%xmm2,%xmm2 |
| 2890 | vaesenc 96(%r8),%xmm2,%xmm2 |
| 2891 | vaesenc 112(%r8),%xmm2,%xmm2 |
| 2892 | vaesenc 128(%r8),%xmm2,%xmm2 |
| 2893 | vaesenc 144(%r8),%xmm2,%xmm2 |
| 2894 | vaesenc 160(%r8),%xmm2,%xmm2 |
| 2895 | vaesenc 176(%r8),%xmm2,%xmm2 |
| 2896 | vaesenc 192(%r8),%xmm2,%xmm2 |
| 2897 | vaesenc 208(%r8),%xmm2,%xmm2 |
| 2898 | vaesenclast 224(%r8),%xmm2,%xmm2 |
| 2899 | vpxor (%rdi),%xmm2,%xmm2 |
| 2900 | vmovdqu %xmm2,(%rsi) |
| 2901 | addq $16,%rdi |
| 2902 | addq $16,%rsi |
| 2903 | |
| 2904 | vpxor %xmm2,%xmm0,%xmm0 |
| 2905 | vmovdqa -32(%rcx),%xmm1 |
| 2906 | call GFMUL |
| 2907 | |
| 2908 | jmp .L256_dec_loop2 |
| 2909 | |
| 2910 | .L256_dec_out: |
| 2911 | vmovdqu %xmm0,(%rdx) |
| 2912 | .byte 0xf3,0xc3 |
| 2913 | .cfi_endproc |
| 2914 | .size aes256gcmsiv_dec, .-aes256gcmsiv_dec |
| 2915 | .globl aes256gcmsiv_kdf |
| 2916 | .hidden aes256gcmsiv_kdf |
| 2917 | .type aes256gcmsiv_kdf,@function |
| 2918 | .align 16 |
| 2919 | aes256gcmsiv_kdf: |
| 2920 | .cfi_startproc |
| 2921 | |
| 2922 | |
| 2923 | |
| 2924 | |
| 2925 | vmovdqa (%rdx),%xmm1 |
| 2926 | vmovdqa 0(%rdi),%xmm4 |
| 2927 | vmovdqa and_mask(%rip),%xmm11 |
| 2928 | vmovdqa one(%rip),%xmm8 |
| 2929 | vpshufd $0x90,%xmm4,%xmm4 |
| 2930 | vpand %xmm11,%xmm4,%xmm4 |
| 2931 | vpaddd %xmm8,%xmm4,%xmm6 |
| 2932 | vpaddd %xmm8,%xmm6,%xmm7 |
| 2933 | vpaddd %xmm8,%xmm7,%xmm11 |
| 2934 | vpaddd %xmm8,%xmm11,%xmm12 |
| 2935 | vpaddd %xmm8,%xmm12,%xmm13 |
| 2936 | |
| 2937 | vpxor %xmm1,%xmm4,%xmm4 |
| 2938 | vpxor %xmm1,%xmm6,%xmm6 |
| 2939 | vpxor %xmm1,%xmm7,%xmm7 |
| 2940 | vpxor %xmm1,%xmm11,%xmm11 |
| 2941 | vpxor %xmm1,%xmm12,%xmm12 |
| 2942 | vpxor %xmm1,%xmm13,%xmm13 |
| 2943 | |
| 2944 | vmovdqa 16(%rdx),%xmm1 |
| 2945 | vaesenc %xmm1,%xmm4,%xmm4 |
| 2946 | vaesenc %xmm1,%xmm6,%xmm6 |
| 2947 | vaesenc %xmm1,%xmm7,%xmm7 |
| 2948 | vaesenc %xmm1,%xmm11,%xmm11 |
| 2949 | vaesenc %xmm1,%xmm12,%xmm12 |
| 2950 | vaesenc %xmm1,%xmm13,%xmm13 |
| 2951 | |
| 2952 | vmovdqa 32(%rdx),%xmm2 |
| 2953 | vaesenc %xmm2,%xmm4,%xmm4 |
| 2954 | vaesenc %xmm2,%xmm6,%xmm6 |
| 2955 | vaesenc %xmm2,%xmm7,%xmm7 |
| 2956 | vaesenc %xmm2,%xmm11,%xmm11 |
| 2957 | vaesenc %xmm2,%xmm12,%xmm12 |
| 2958 | vaesenc %xmm2,%xmm13,%xmm13 |
| 2959 | |
| 2960 | vmovdqa 48(%rdx),%xmm1 |
| 2961 | vaesenc %xmm1,%xmm4,%xmm4 |
| 2962 | vaesenc %xmm1,%xmm6,%xmm6 |
| 2963 | vaesenc %xmm1,%xmm7,%xmm7 |
| 2964 | vaesenc %xmm1,%xmm11,%xmm11 |
| 2965 | vaesenc %xmm1,%xmm12,%xmm12 |
| 2966 | vaesenc %xmm1,%xmm13,%xmm13 |
| 2967 | |
| 2968 | vmovdqa 64(%rdx),%xmm2 |
| 2969 | vaesenc %xmm2,%xmm4,%xmm4 |
| 2970 | vaesenc %xmm2,%xmm6,%xmm6 |
| 2971 | vaesenc %xmm2,%xmm7,%xmm7 |
| 2972 | vaesenc %xmm2,%xmm11,%xmm11 |
| 2973 | vaesenc %xmm2,%xmm12,%xmm12 |
| 2974 | vaesenc %xmm2,%xmm13,%xmm13 |
| 2975 | |
| 2976 | vmovdqa 80(%rdx),%xmm1 |
| 2977 | vaesenc %xmm1,%xmm4,%xmm4 |
| 2978 | vaesenc %xmm1,%xmm6,%xmm6 |
| 2979 | vaesenc %xmm1,%xmm7,%xmm7 |
| 2980 | vaesenc %xmm1,%xmm11,%xmm11 |
| 2981 | vaesenc %xmm1,%xmm12,%xmm12 |
| 2982 | vaesenc %xmm1,%xmm13,%xmm13 |
| 2983 | |
| 2984 | vmovdqa 96(%rdx),%xmm2 |
| 2985 | vaesenc %xmm2,%xmm4,%xmm4 |
| 2986 | vaesenc %xmm2,%xmm6,%xmm6 |
| 2987 | vaesenc %xmm2,%xmm7,%xmm7 |
| 2988 | vaesenc %xmm2,%xmm11,%xmm11 |
| 2989 | vaesenc %xmm2,%xmm12,%xmm12 |
| 2990 | vaesenc %xmm2,%xmm13,%xmm13 |
| 2991 | |
| 2992 | vmovdqa 112(%rdx),%xmm1 |
| 2993 | vaesenc %xmm1,%xmm4,%xmm4 |
| 2994 | vaesenc %xmm1,%xmm6,%xmm6 |
| 2995 | vaesenc %xmm1,%xmm7,%xmm7 |
| 2996 | vaesenc %xmm1,%xmm11,%xmm11 |
| 2997 | vaesenc %xmm1,%xmm12,%xmm12 |
| 2998 | vaesenc %xmm1,%xmm13,%xmm13 |
| 2999 | |
| 3000 | vmovdqa 128(%rdx),%xmm2 |
| 3001 | vaesenc %xmm2,%xmm4,%xmm4 |
| 3002 | vaesenc %xmm2,%xmm6,%xmm6 |
| 3003 | vaesenc %xmm2,%xmm7,%xmm7 |
| 3004 | vaesenc %xmm2,%xmm11,%xmm11 |
| 3005 | vaesenc %xmm2,%xmm12,%xmm12 |
| 3006 | vaesenc %xmm2,%xmm13,%xmm13 |
| 3007 | |
| 3008 | vmovdqa 144(%rdx),%xmm1 |
| 3009 | vaesenc %xmm1,%xmm4,%xmm4 |
| 3010 | vaesenc %xmm1,%xmm6,%xmm6 |
| 3011 | vaesenc %xmm1,%xmm7,%xmm7 |
| 3012 | vaesenc %xmm1,%xmm11,%xmm11 |
| 3013 | vaesenc %xmm1,%xmm12,%xmm12 |
| 3014 | vaesenc %xmm1,%xmm13,%xmm13 |
| 3015 | |
| 3016 | vmovdqa 160(%rdx),%xmm2 |
| 3017 | vaesenc %xmm2,%xmm4,%xmm4 |
| 3018 | vaesenc %xmm2,%xmm6,%xmm6 |
| 3019 | vaesenc %xmm2,%xmm7,%xmm7 |
| 3020 | vaesenc %xmm2,%xmm11,%xmm11 |
| 3021 | vaesenc %xmm2,%xmm12,%xmm12 |
| 3022 | vaesenc %xmm2,%xmm13,%xmm13 |
| 3023 | |
| 3024 | vmovdqa 176(%rdx),%xmm1 |
| 3025 | vaesenc %xmm1,%xmm4,%xmm4 |
| 3026 | vaesenc %xmm1,%xmm6,%xmm6 |
| 3027 | vaesenc %xmm1,%xmm7,%xmm7 |
| 3028 | vaesenc %xmm1,%xmm11,%xmm11 |
| 3029 | vaesenc %xmm1,%xmm12,%xmm12 |
| 3030 | vaesenc %xmm1,%xmm13,%xmm13 |
| 3031 | |
| 3032 | vmovdqa 192(%rdx),%xmm2 |
| 3033 | vaesenc %xmm2,%xmm4,%xmm4 |
| 3034 | vaesenc %xmm2,%xmm6,%xmm6 |
| 3035 | vaesenc %xmm2,%xmm7,%xmm7 |
| 3036 | vaesenc %xmm2,%xmm11,%xmm11 |
| 3037 | vaesenc %xmm2,%xmm12,%xmm12 |
| 3038 | vaesenc %xmm2,%xmm13,%xmm13 |
| 3039 | |
| 3040 | vmovdqa 208(%rdx),%xmm1 |
| 3041 | vaesenc %xmm1,%xmm4,%xmm4 |
| 3042 | vaesenc %xmm1,%xmm6,%xmm6 |
| 3043 | vaesenc %xmm1,%xmm7,%xmm7 |
| 3044 | vaesenc %xmm1,%xmm11,%xmm11 |
| 3045 | vaesenc %xmm1,%xmm12,%xmm12 |
| 3046 | vaesenc %xmm1,%xmm13,%xmm13 |
| 3047 | |
| 3048 | vmovdqa 224(%rdx),%xmm2 |
| 3049 | vaesenclast %xmm2,%xmm4,%xmm4 |
| 3050 | vaesenclast %xmm2,%xmm6,%xmm6 |
| 3051 | vaesenclast %xmm2,%xmm7,%xmm7 |
| 3052 | vaesenclast %xmm2,%xmm11,%xmm11 |
| 3053 | vaesenclast %xmm2,%xmm12,%xmm12 |
| 3054 | vaesenclast %xmm2,%xmm13,%xmm13 |
| 3055 | |
| 3056 | |
| 3057 | vmovdqa %xmm4,0(%rsi) |
| 3058 | vmovdqa %xmm6,16(%rsi) |
| 3059 | vmovdqa %xmm7,32(%rsi) |
| 3060 | vmovdqa %xmm11,48(%rsi) |
| 3061 | vmovdqa %xmm12,64(%rsi) |
| 3062 | vmovdqa %xmm13,80(%rsi) |
| 3063 | .byte 0xf3,0xc3 |
| 3064 | .cfi_endproc |
| 3065 | .size aes256gcmsiv_kdf, .-aes256gcmsiv_kdf |
| 3066 | #endif |