OLD | NEW |
(Empty) | |
| 1 #if defined(__x86_64__) |
| 2 .text |
| 3 |
| 4 |
| 5 |
| 6 .globl _bn_mul_mont |
| 7 |
| 8 .p2align 4 |
| 9 _bn_mul_mont: |
| 10 testl $3,%r9d |
| 11 jnz L$mul_enter |
| 12 cmpl $8,%r9d |
| 13 jb L$mul_enter |
| 14 cmpq %rsi,%rdx |
| 15 jne L$mul4x_enter |
| 16 testl $7,%r9d |
| 17 jz L$sqr8x_enter |
| 18 jmp L$mul4x_enter |
| 19 |
| 20 .p2align 4 |
| 21 L$mul_enter: |
| 22 pushq %rbx |
| 23 pushq %rbp |
| 24 pushq %r12 |
| 25 pushq %r13 |
| 26 pushq %r14 |
| 27 pushq %r15 |
| 28 |
| 29 movl %r9d,%r9d |
| 30 leaq 2(%r9),%r10 |
| 31 movq %rsp,%r11 |
| 32 negq %r10 |
| 33 leaq (%rsp,%r10,8),%rsp |
| 34 andq $-1024,%rsp |
| 35 |
| 36 movq %r11,8(%rsp,%r9,8) |
| 37 L$mul_body: |
| 38 movq %rdx,%r12 |
| 39 movq (%r8),%r8 |
| 40 movq (%r12),%rbx |
| 41 movq (%rsi),%rax |
| 42 |
| 43 xorq %r14,%r14 |
| 44 xorq %r15,%r15 |
| 45 |
| 46 movq %r8,%rbp |
| 47 mulq %rbx |
| 48 movq %rax,%r10 |
| 49 movq (%rcx),%rax |
| 50 |
| 51 imulq %r10,%rbp |
| 52 movq %rdx,%r11 |
| 53 |
| 54 mulq %rbp |
| 55 addq %rax,%r10 |
| 56 movq 8(%rsi),%rax |
| 57 adcq $0,%rdx |
| 58 movq %rdx,%r13 |
| 59 |
| 60 leaq 1(%r15),%r15 |
| 61 jmp L$1st_enter |
| 62 |
| 63 .p2align 4 |
| 64 L$1st: |
| 65 addq %rax,%r13 |
| 66 movq (%rsi,%r15,8),%rax |
| 67 adcq $0,%rdx |
| 68 addq %r11,%r13 |
| 69 movq %r10,%r11 |
| 70 adcq $0,%rdx |
| 71 movq %r13,-16(%rsp,%r15,8) |
| 72 movq %rdx,%r13 |
| 73 |
| 74 L$1st_enter: |
| 75 mulq %rbx |
| 76 addq %rax,%r11 |
| 77 movq (%rcx,%r15,8),%rax |
| 78 adcq $0,%rdx |
| 79 leaq 1(%r15),%r15 |
| 80 movq %rdx,%r10 |
| 81 |
| 82 mulq %rbp |
| 83 cmpq %r9,%r15 |
| 84 jne L$1st |
| 85 |
| 86 addq %rax,%r13 |
| 87 movq (%rsi),%rax |
| 88 adcq $0,%rdx |
| 89 addq %r11,%r13 |
| 90 adcq $0,%rdx |
| 91 movq %r13,-16(%rsp,%r15,8) |
| 92 movq %rdx,%r13 |
| 93 movq %r10,%r11 |
| 94 |
| 95 xorq %rdx,%rdx |
| 96 addq %r11,%r13 |
| 97 adcq $0,%rdx |
| 98 movq %r13,-8(%rsp,%r9,8) |
| 99 movq %rdx,(%rsp,%r9,8) |
| 100 |
| 101 leaq 1(%r14),%r14 |
| 102 jmp L$outer |
| 103 .p2align 4 |
| 104 L$outer: |
| 105 movq (%r12,%r14,8),%rbx |
| 106 xorq %r15,%r15 |
| 107 movq %r8,%rbp |
| 108 movq (%rsp),%r10 |
| 109 mulq %rbx |
| 110 addq %rax,%r10 |
| 111 movq (%rcx),%rax |
| 112 adcq $0,%rdx |
| 113 |
| 114 imulq %r10,%rbp |
| 115 movq %rdx,%r11 |
| 116 |
| 117 mulq %rbp |
| 118 addq %rax,%r10 |
| 119 movq 8(%rsi),%rax |
| 120 adcq $0,%rdx |
| 121 movq 8(%rsp),%r10 |
| 122 movq %rdx,%r13 |
| 123 |
| 124 leaq 1(%r15),%r15 |
| 125 jmp L$inner_enter |
| 126 |
| 127 .p2align 4 |
| 128 L$inner: |
| 129 addq %rax,%r13 |
| 130 movq (%rsi,%r15,8),%rax |
| 131 adcq $0,%rdx |
| 132 addq %r10,%r13 |
| 133 movq (%rsp,%r15,8),%r10 |
| 134 adcq $0,%rdx |
| 135 movq %r13,-16(%rsp,%r15,8) |
| 136 movq %rdx,%r13 |
| 137 |
| 138 L$inner_enter: |
| 139 mulq %rbx |
| 140 addq %rax,%r11 |
| 141 movq (%rcx,%r15,8),%rax |
| 142 adcq $0,%rdx |
| 143 addq %r11,%r10 |
| 144 movq %rdx,%r11 |
| 145 adcq $0,%r11 |
| 146 leaq 1(%r15),%r15 |
| 147 |
| 148 mulq %rbp |
| 149 cmpq %r9,%r15 |
| 150 jne L$inner |
| 151 |
| 152 addq %rax,%r13 |
| 153 movq (%rsi),%rax |
| 154 adcq $0,%rdx |
| 155 addq %r10,%r13 |
| 156 movq (%rsp,%r15,8),%r10 |
| 157 adcq $0,%rdx |
| 158 movq %r13,-16(%rsp,%r15,8) |
| 159 movq %rdx,%r13 |
| 160 |
| 161 xorq %rdx,%rdx |
| 162 addq %r11,%r13 |
| 163 adcq $0,%rdx |
| 164 addq %r10,%r13 |
| 165 adcq $0,%rdx |
| 166 movq %r13,-8(%rsp,%r9,8) |
| 167 movq %rdx,(%rsp,%r9,8) |
| 168 |
| 169 leaq 1(%r14),%r14 |
| 170 cmpq %r9,%r14 |
| 171 jb L$outer |
| 172 |
| 173 xorq %r14,%r14 |
| 174 movq (%rsp),%rax |
| 175 leaq (%rsp),%rsi |
| 176 movq %r9,%r15 |
| 177 jmp L$sub |
| 178 .p2align 4 |
| 179 L$sub: sbbq (%rcx,%r14,8),%rax |
| 180 movq %rax,(%rdi,%r14,8) |
| 181 movq 8(%rsi,%r14,8),%rax |
| 182 leaq 1(%r14),%r14 |
| 183 decq %r15 |
| 184 jnz L$sub |
| 185 |
| 186 sbbq $0,%rax |
| 187 xorq %r14,%r14 |
| 188 movq %r9,%r15 |
| 189 .p2align 4 |
| 190 L$copy: |
| 191 movq (%rsp,%r14,8),%rsi |
| 192 movq (%rdi,%r14,8),%rcx |
| 193 xorq %rcx,%rsi |
| 194 andq %rax,%rsi |
| 195 xorq %rcx,%rsi |
| 196 movq %r14,(%rsp,%r14,8) |
| 197 movq %rsi,(%rdi,%r14,8) |
| 198 leaq 1(%r14),%r14 |
| 199 subq $1,%r15 |
| 200 jnz L$copy |
| 201 |
| 202 movq 8(%rsp,%r9,8),%rsi |
| 203 movq $1,%rax |
| 204 movq (%rsi),%r15 |
| 205 movq 8(%rsi),%r14 |
| 206 movq 16(%rsi),%r13 |
| 207 movq 24(%rsi),%r12 |
| 208 movq 32(%rsi),%rbp |
| 209 movq 40(%rsi),%rbx |
| 210 leaq 48(%rsi),%rsp |
| 211 L$mul_epilogue: |
| 212 .byte 0xf3,0xc3 |
| 213 |
| 214 |
| 215 .p2align 4 |
| 216 bn_mul4x_mont: |
| 217 L$mul4x_enter: |
| 218 pushq %rbx |
| 219 pushq %rbp |
| 220 pushq %r12 |
| 221 pushq %r13 |
| 222 pushq %r14 |
| 223 pushq %r15 |
| 224 |
| 225 movl %r9d,%r9d |
| 226 leaq 4(%r9),%r10 |
| 227 movq %rsp,%r11 |
| 228 negq %r10 |
| 229 leaq (%rsp,%r10,8),%rsp |
| 230 andq $-1024,%rsp |
| 231 |
| 232 movq %r11,8(%rsp,%r9,8) |
| 233 L$mul4x_body: |
| 234 movq %rdi,16(%rsp,%r9,8) |
| 235 movq %rdx,%r12 |
| 236 movq (%r8),%r8 |
| 237 movq (%r12),%rbx |
| 238 movq (%rsi),%rax |
| 239 |
| 240 xorq %r14,%r14 |
| 241 xorq %r15,%r15 |
| 242 |
| 243 movq %r8,%rbp |
| 244 mulq %rbx |
| 245 movq %rax,%r10 |
| 246 movq (%rcx),%rax |
| 247 |
| 248 imulq %r10,%rbp |
| 249 movq %rdx,%r11 |
| 250 |
| 251 mulq %rbp |
| 252 addq %rax,%r10 |
| 253 movq 8(%rsi),%rax |
| 254 adcq $0,%rdx |
| 255 movq %rdx,%rdi |
| 256 |
| 257 mulq %rbx |
| 258 addq %rax,%r11 |
| 259 movq 8(%rcx),%rax |
| 260 adcq $0,%rdx |
| 261 movq %rdx,%r10 |
| 262 |
| 263 mulq %rbp |
| 264 addq %rax,%rdi |
| 265 movq 16(%rsi),%rax |
| 266 adcq $0,%rdx |
| 267 addq %r11,%rdi |
| 268 leaq 4(%r15),%r15 |
| 269 adcq $0,%rdx |
| 270 movq %rdi,(%rsp) |
| 271 movq %rdx,%r13 |
| 272 jmp L$1st4x |
| 273 .p2align 4 |
| 274 L$1st4x: |
| 275 mulq %rbx |
| 276 addq %rax,%r10 |
| 277 movq -16(%rcx,%r15,8),%rax |
| 278 adcq $0,%rdx |
| 279 movq %rdx,%r11 |
| 280 |
| 281 mulq %rbp |
| 282 addq %rax,%r13 |
| 283 movq -8(%rsi,%r15,8),%rax |
| 284 adcq $0,%rdx |
| 285 addq %r10,%r13 |
| 286 adcq $0,%rdx |
| 287 movq %r13,-24(%rsp,%r15,8) |
| 288 movq %rdx,%rdi |
| 289 |
| 290 mulq %rbx |
| 291 addq %rax,%r11 |
| 292 movq -8(%rcx,%r15,8),%rax |
| 293 adcq $0,%rdx |
| 294 movq %rdx,%r10 |
| 295 |
| 296 mulq %rbp |
| 297 addq %rax,%rdi |
| 298 movq (%rsi,%r15,8),%rax |
| 299 adcq $0,%rdx |
| 300 addq %r11,%rdi |
| 301 adcq $0,%rdx |
| 302 movq %rdi,-16(%rsp,%r15,8) |
| 303 movq %rdx,%r13 |
| 304 |
| 305 mulq %rbx |
| 306 addq %rax,%r10 |
| 307 movq (%rcx,%r15,8),%rax |
| 308 adcq $0,%rdx |
| 309 movq %rdx,%r11 |
| 310 |
| 311 mulq %rbp |
| 312 addq %rax,%r13 |
| 313 movq 8(%rsi,%r15,8),%rax |
| 314 adcq $0,%rdx |
| 315 addq %r10,%r13 |
| 316 adcq $0,%rdx |
| 317 movq %r13,-8(%rsp,%r15,8) |
| 318 movq %rdx,%rdi |
| 319 |
| 320 mulq %rbx |
| 321 addq %rax,%r11 |
| 322 movq 8(%rcx,%r15,8),%rax |
| 323 adcq $0,%rdx |
| 324 leaq 4(%r15),%r15 |
| 325 movq %rdx,%r10 |
| 326 |
| 327 mulq %rbp |
| 328 addq %rax,%rdi |
| 329 movq -16(%rsi,%r15,8),%rax |
| 330 adcq $0,%rdx |
| 331 addq %r11,%rdi |
| 332 adcq $0,%rdx |
| 333 movq %rdi,-32(%rsp,%r15,8) |
| 334 movq %rdx,%r13 |
| 335 cmpq %r9,%r15 |
| 336 jb L$1st4x |
| 337 |
| 338 mulq %rbx |
| 339 addq %rax,%r10 |
| 340 movq -16(%rcx,%r15,8),%rax |
| 341 adcq $0,%rdx |
| 342 movq %rdx,%r11 |
| 343 |
| 344 mulq %rbp |
| 345 addq %rax,%r13 |
| 346 movq -8(%rsi,%r15,8),%rax |
| 347 adcq $0,%rdx |
| 348 addq %r10,%r13 |
| 349 adcq $0,%rdx |
| 350 movq %r13,-24(%rsp,%r15,8) |
| 351 movq %rdx,%rdi |
| 352 |
| 353 mulq %rbx |
| 354 addq %rax,%r11 |
| 355 movq -8(%rcx,%r15,8),%rax |
| 356 adcq $0,%rdx |
| 357 movq %rdx,%r10 |
| 358 |
| 359 mulq %rbp |
| 360 addq %rax,%rdi |
| 361 movq (%rsi),%rax |
| 362 adcq $0,%rdx |
| 363 addq %r11,%rdi |
| 364 adcq $0,%rdx |
| 365 movq %rdi,-16(%rsp,%r15,8) |
| 366 movq %rdx,%r13 |
| 367 |
| 368 xorq %rdi,%rdi |
| 369 addq %r10,%r13 |
| 370 adcq $0,%rdi |
| 371 movq %r13,-8(%rsp,%r15,8) |
| 372 movq %rdi,(%rsp,%r15,8) |
| 373 |
| 374 leaq 1(%r14),%r14 |
| 375 .p2align 2 |
| 376 L$outer4x: |
| 377 movq (%r12,%r14,8),%rbx |
| 378 xorq %r15,%r15 |
| 379 movq (%rsp),%r10 |
| 380 movq %r8,%rbp |
| 381 mulq %rbx |
| 382 addq %rax,%r10 |
| 383 movq (%rcx),%rax |
| 384 adcq $0,%rdx |
| 385 |
| 386 imulq %r10,%rbp |
| 387 movq %rdx,%r11 |
| 388 |
| 389 mulq %rbp |
| 390 addq %rax,%r10 |
| 391 movq 8(%rsi),%rax |
| 392 adcq $0,%rdx |
| 393 movq %rdx,%rdi |
| 394 |
| 395 mulq %rbx |
| 396 addq %rax,%r11 |
| 397 movq 8(%rcx),%rax |
| 398 adcq $0,%rdx |
| 399 addq 8(%rsp),%r11 |
| 400 adcq $0,%rdx |
| 401 movq %rdx,%r10 |
| 402 |
| 403 mulq %rbp |
| 404 addq %rax,%rdi |
| 405 movq 16(%rsi),%rax |
| 406 adcq $0,%rdx |
| 407 addq %r11,%rdi |
| 408 leaq 4(%r15),%r15 |
| 409 adcq $0,%rdx |
| 410 movq %rdi,(%rsp) |
| 411 movq %rdx,%r13 |
| 412 jmp L$inner4x |
| 413 .p2align 4 |
| 414 L$inner4x: |
| 415 mulq %rbx |
| 416 addq %rax,%r10 |
| 417 movq -16(%rcx,%r15,8),%rax |
| 418 adcq $0,%rdx |
| 419 addq -16(%rsp,%r15,8),%r10 |
| 420 adcq $0,%rdx |
| 421 movq %rdx,%r11 |
| 422 |
| 423 mulq %rbp |
| 424 addq %rax,%r13 |
| 425 movq -8(%rsi,%r15,8),%rax |
| 426 adcq $0,%rdx |
| 427 addq %r10,%r13 |
| 428 adcq $0,%rdx |
| 429 movq %r13,-24(%rsp,%r15,8) |
| 430 movq %rdx,%rdi |
| 431 |
| 432 mulq %rbx |
| 433 addq %rax,%r11 |
| 434 movq -8(%rcx,%r15,8),%rax |
| 435 adcq $0,%rdx |
| 436 addq -8(%rsp,%r15,8),%r11 |
| 437 adcq $0,%rdx |
| 438 movq %rdx,%r10 |
| 439 |
| 440 mulq %rbp |
| 441 addq %rax,%rdi |
| 442 movq (%rsi,%r15,8),%rax |
| 443 adcq $0,%rdx |
| 444 addq %r11,%rdi |
| 445 adcq $0,%rdx |
| 446 movq %rdi,-16(%rsp,%r15,8) |
| 447 movq %rdx,%r13 |
| 448 |
| 449 mulq %rbx |
| 450 addq %rax,%r10 |
| 451 movq (%rcx,%r15,8),%rax |
| 452 adcq $0,%rdx |
| 453 addq (%rsp,%r15,8),%r10 |
| 454 adcq $0,%rdx |
| 455 movq %rdx,%r11 |
| 456 |
| 457 mulq %rbp |
| 458 addq %rax,%r13 |
| 459 movq 8(%rsi,%r15,8),%rax |
| 460 adcq $0,%rdx |
| 461 addq %r10,%r13 |
| 462 adcq $0,%rdx |
| 463 movq %r13,-8(%rsp,%r15,8) |
| 464 movq %rdx,%rdi |
| 465 |
| 466 mulq %rbx |
| 467 addq %rax,%r11 |
| 468 movq 8(%rcx,%r15,8),%rax |
| 469 adcq $0,%rdx |
| 470 addq 8(%rsp,%r15,8),%r11 |
| 471 adcq $0,%rdx |
| 472 leaq 4(%r15),%r15 |
| 473 movq %rdx,%r10 |
| 474 |
| 475 mulq %rbp |
| 476 addq %rax,%rdi |
| 477 movq -16(%rsi,%r15,8),%rax |
| 478 adcq $0,%rdx |
| 479 addq %r11,%rdi |
| 480 adcq $0,%rdx |
| 481 movq %rdi,-32(%rsp,%r15,8) |
| 482 movq %rdx,%r13 |
| 483 cmpq %r9,%r15 |
| 484 jb L$inner4x |
| 485 |
| 486 mulq %rbx |
| 487 addq %rax,%r10 |
| 488 movq -16(%rcx,%r15,8),%rax |
| 489 adcq $0,%rdx |
| 490 addq -16(%rsp,%r15,8),%r10 |
| 491 adcq $0,%rdx |
| 492 movq %rdx,%r11 |
| 493 |
| 494 mulq %rbp |
| 495 addq %rax,%r13 |
| 496 movq -8(%rsi,%r15,8),%rax |
| 497 adcq $0,%rdx |
| 498 addq %r10,%r13 |
| 499 adcq $0,%rdx |
| 500 movq %r13,-24(%rsp,%r15,8) |
| 501 movq %rdx,%rdi |
| 502 |
| 503 mulq %rbx |
| 504 addq %rax,%r11 |
| 505 movq -8(%rcx,%r15,8),%rax |
| 506 adcq $0,%rdx |
| 507 addq -8(%rsp,%r15,8),%r11 |
| 508 adcq $0,%rdx |
| 509 leaq 1(%r14),%r14 |
| 510 movq %rdx,%r10 |
| 511 |
| 512 mulq %rbp |
| 513 addq %rax,%rdi |
| 514 movq (%rsi),%rax |
| 515 adcq $0,%rdx |
| 516 addq %r11,%rdi |
| 517 adcq $0,%rdx |
| 518 movq %rdi,-16(%rsp,%r15,8) |
| 519 movq %rdx,%r13 |
| 520 |
| 521 xorq %rdi,%rdi |
| 522 addq %r10,%r13 |
| 523 adcq $0,%rdi |
| 524 addq (%rsp,%r9,8),%r13 |
| 525 adcq $0,%rdi |
| 526 movq %r13,-8(%rsp,%r15,8) |
| 527 movq %rdi,(%rsp,%r15,8) |
| 528 |
| 529 cmpq %r9,%r14 |
| 530 jb L$outer4x |
| 531 movq 16(%rsp,%r9,8),%rdi |
| 532 movq 0(%rsp),%rax |
| 533 movq 8(%rsp),%rdx |
| 534 shrq $2,%r9 |
| 535 leaq (%rsp),%rsi |
| 536 xorq %r14,%r14 |
| 537 |
| 538 subq 0(%rcx),%rax |
| 539 movq 16(%rsi),%rbx |
| 540 movq 24(%rsi),%rbp |
| 541 sbbq 8(%rcx),%rdx |
| 542 leaq -1(%r9),%r15 |
| 543 jmp L$sub4x |
| 544 .p2align 4 |
| 545 L$sub4x: |
| 546 movq %rax,0(%rdi,%r14,8) |
| 547 movq %rdx,8(%rdi,%r14,8) |
| 548 sbbq 16(%rcx,%r14,8),%rbx |
| 549 movq 32(%rsi,%r14,8),%rax |
| 550 movq 40(%rsi,%r14,8),%rdx |
| 551 sbbq 24(%rcx,%r14,8),%rbp |
| 552 movq %rbx,16(%rdi,%r14,8) |
| 553 movq %rbp,24(%rdi,%r14,8) |
| 554 sbbq 32(%rcx,%r14,8),%rax |
| 555 movq 48(%rsi,%r14,8),%rbx |
| 556 movq 56(%rsi,%r14,8),%rbp |
| 557 sbbq 40(%rcx,%r14,8),%rdx |
| 558 leaq 4(%r14),%r14 |
| 559 decq %r15 |
| 560 jnz L$sub4x |
| 561 |
| 562 movq %rax,0(%rdi,%r14,8) |
| 563 movq 32(%rsi,%r14,8),%rax |
| 564 sbbq 16(%rcx,%r14,8),%rbx |
| 565 movq %rdx,8(%rdi,%r14,8) |
| 566 sbbq 24(%rcx,%r14,8),%rbp |
| 567 movq %rbx,16(%rdi,%r14,8) |
| 568 |
| 569 sbbq $0,%rax |
| 570 movq %rax,%xmm0 |
| 571 punpcklqdq %xmm0,%xmm0 |
| 572 movq %rbp,24(%rdi,%r14,8) |
| 573 xorq %r14,%r14 |
| 574 |
| 575 movq %r9,%r15 |
| 576 pxor %xmm5,%xmm5 |
| 577 jmp L$copy4x |
| 578 .p2align 4 |
| 579 L$copy4x: |
| 580 movdqu (%rsp,%r14,1),%xmm2 |
| 581 movdqu 16(%rsp,%r14,1),%xmm4 |
| 582 movdqu (%rdi,%r14,1),%xmm1 |
| 583 movdqu 16(%rdi,%r14,1),%xmm3 |
| 584 pxor %xmm1,%xmm2 |
| 585 pxor %xmm3,%xmm4 |
| 586 pand %xmm0,%xmm2 |
| 587 pand %xmm0,%xmm4 |
| 588 pxor %xmm1,%xmm2 |
| 589 pxor %xmm3,%xmm4 |
| 590 movdqu %xmm2,(%rdi,%r14,1) |
| 591 movdqu %xmm4,16(%rdi,%r14,1) |
| 592 movdqa %xmm5,(%rsp,%r14,1) |
| 593 movdqa %xmm5,16(%rsp,%r14,1) |
| 594 |
| 595 leaq 32(%r14),%r14 |
| 596 decq %r15 |
| 597 jnz L$copy4x |
| 598 |
| 599 shlq $2,%r9 |
| 600 movq 8(%rsp,%r9,8),%rsi |
| 601 movq $1,%rax |
| 602 movq (%rsi),%r15 |
| 603 movq 8(%rsi),%r14 |
| 604 movq 16(%rsi),%r13 |
| 605 movq 24(%rsi),%r12 |
| 606 movq 32(%rsi),%rbp |
| 607 movq 40(%rsi),%rbx |
| 608 leaq 48(%rsi),%rsp |
| 609 L$mul4x_epilogue: |
| 610 .byte 0xf3,0xc3 |
| 611 |
| 612 |
| 613 |
| 614 |
| 615 |
| 616 .p2align 5 |
| 617 bn_sqr8x_mont: |
| 618 L$sqr8x_enter: |
| 619 movq %rsp,%rax |
| 620 pushq %rbx |
| 621 pushq %rbp |
| 622 pushq %r12 |
| 623 pushq %r13 |
| 624 pushq %r14 |
| 625 pushq %r15 |
| 626 |
| 627 movl %r9d,%r10d |
| 628 shll $3,%r9d |
| 629 shlq $3+2,%r10 |
| 630 negq %r9 |
| 631 |
| 632 |
| 633 |
| 634 |
| 635 |
| 636 |
| 637 leaq -64(%rsp,%r9,4),%r11 |
| 638 movq (%r8),%r8 |
| 639 subq %rsi,%r11 |
| 640 andq $4095,%r11 |
| 641 cmpq %r11,%r10 |
| 642 jb L$sqr8x_sp_alt |
| 643 subq %r11,%rsp |
| 644 leaq -64(%rsp,%r9,4),%rsp |
| 645 jmp L$sqr8x_sp_done |
| 646 |
| 647 .p2align 5 |
| 648 L$sqr8x_sp_alt: |
| 649 leaq 4096-64(,%r9,4),%r10 |
| 650 leaq -64(%rsp,%r9,4),%rsp |
| 651 subq %r10,%r11 |
| 652 movq $0,%r10 |
| 653 cmovcq %r10,%r11 |
| 654 subq %r11,%rsp |
| 655 L$sqr8x_sp_done: |
| 656 andq $-64,%rsp |
| 657 movq %r9,%r10 |
| 658 negq %r9 |
| 659 |
| 660 leaq 64(%rsp,%r9,2),%r11 |
| 661 movq %r8,32(%rsp) |
| 662 movq %rax,40(%rsp) |
| 663 L$sqr8x_body: |
| 664 |
| 665 movq %r9,%rbp |
| 666 .byte 102,73,15,110,211 |
| 667 shrq $3+2,%rbp |
| 668 movl _OPENSSL_ia32cap_P+8(%rip),%eax |
| 669 jmp L$sqr8x_copy_n |
| 670 |
| 671 .p2align 5 |
| 672 L$sqr8x_copy_n: |
| 673 movq 0(%rcx),%xmm0 |
| 674 movq 8(%rcx),%xmm1 |
| 675 movq 16(%rcx),%xmm3 |
| 676 movq 24(%rcx),%xmm4 |
| 677 leaq 32(%rcx),%rcx |
| 678 movdqa %xmm0,0(%r11) |
| 679 movdqa %xmm1,16(%r11) |
| 680 movdqa %xmm3,32(%r11) |
| 681 movdqa %xmm4,48(%r11) |
| 682 leaq 64(%r11),%r11 |
| 683 decq %rbp |
| 684 jnz L$sqr8x_copy_n |
| 685 |
| 686 pxor %xmm0,%xmm0 |
| 687 .byte 102,72,15,110,207 |
| 688 .byte 102,73,15,110,218 |
| 689 call _bn_sqr8x_internal |
| 690 |
| 691 pxor %xmm0,%xmm0 |
| 692 leaq 48(%rsp),%rax |
| 693 leaq 64(%rsp,%r9,2),%rdx |
| 694 shrq $3+2,%r9 |
| 695 movq 40(%rsp),%rsi |
| 696 jmp L$sqr8x_zero |
| 697 |
| 698 .p2align 5 |
| 699 L$sqr8x_zero: |
| 700 movdqa %xmm0,0(%rax) |
| 701 movdqa %xmm0,16(%rax) |
| 702 movdqa %xmm0,32(%rax) |
| 703 movdqa %xmm0,48(%rax) |
| 704 leaq 64(%rax),%rax |
| 705 movdqa %xmm0,0(%rdx) |
| 706 movdqa %xmm0,16(%rdx) |
| 707 movdqa %xmm0,32(%rdx) |
| 708 movdqa %xmm0,48(%rdx) |
| 709 leaq 64(%rdx),%rdx |
| 710 decq %r9 |
| 711 jnz L$sqr8x_zero |
| 712 |
| 713 movq $1,%rax |
| 714 movq -48(%rsi),%r15 |
| 715 movq -40(%rsi),%r14 |
| 716 movq -32(%rsi),%r13 |
| 717 movq -24(%rsi),%r12 |
| 718 movq -16(%rsi),%rbp |
| 719 movq -8(%rsi),%rbx |
| 720 leaq (%rsi),%rsp |
| 721 L$sqr8x_epilogue: |
| 722 .byte 0xf3,0xc3 |
| 723 |
| 724 .byte 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105,112,108,105
,99,97,116,105,111,110,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84
,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,10
8,46,111,114,103,62,0 |
| 725 .p2align 4 |
| 726 #endif |
OLD | NEW |