| 7 | .text |
| 8 | .globl bn_mul_add_words |
| 9 | .hidden bn_mul_add_words |
| 10 | .type bn_mul_add_words,@function |
| 11 | .align 16 |
| 12 | bn_mul_add_words: |
| 13 | .L_bn_mul_add_words_begin: |
| 14 | movl 4(%esp),%eax |
| 15 | movl 8(%esp),%edx |
| 16 | movl 12(%esp),%ecx |
| 17 | movd 16(%esp),%mm0 |
| 18 | pxor %mm1,%mm1 |
| 19 | jmp .L000maw_sse2_entry |
| 20 | .align 16 |
| 21 | .L001maw_sse2_unrolled: |
| 22 | movd (%eax),%mm3 |
| 23 | paddq %mm3,%mm1 |
| 24 | movd (%edx),%mm2 |
| 25 | pmuludq %mm0,%mm2 |
| 26 | movd 4(%edx),%mm4 |
| 27 | pmuludq %mm0,%mm4 |
| 28 | movd 8(%edx),%mm6 |
| 29 | pmuludq %mm0,%mm6 |
| 30 | movd 12(%edx),%mm7 |
| 31 | pmuludq %mm0,%mm7 |
| 32 | paddq %mm2,%mm1 |
| 33 | movd 4(%eax),%mm3 |
| 34 | paddq %mm4,%mm3 |
| 35 | movd 8(%eax),%mm5 |
| 36 | paddq %mm6,%mm5 |
| 37 | movd 12(%eax),%mm4 |
| 38 | paddq %mm4,%mm7 |
| 39 | movd %mm1,(%eax) |
| 40 | movd 16(%edx),%mm2 |
| 41 | pmuludq %mm0,%mm2 |
| 42 | psrlq $32,%mm1 |
| 43 | movd 20(%edx),%mm4 |
| 44 | pmuludq %mm0,%mm4 |
| 45 | paddq %mm3,%mm1 |
| 46 | movd 24(%edx),%mm6 |
| 47 | pmuludq %mm0,%mm6 |
| 48 | movd %mm1,4(%eax) |
| 49 | psrlq $32,%mm1 |
| 50 | movd 28(%edx),%mm3 |
| 51 | addl $32,%edx |
| 52 | pmuludq %mm0,%mm3 |
| 53 | paddq %mm5,%mm1 |
| 54 | movd 16(%eax),%mm5 |
| 55 | paddq %mm5,%mm2 |
| 56 | movd %mm1,8(%eax) |
| 57 | psrlq $32,%mm1 |
| 58 | paddq %mm7,%mm1 |
| 59 | movd 20(%eax),%mm5 |
| 60 | paddq %mm5,%mm4 |
| 61 | movd %mm1,12(%eax) |
| 62 | psrlq $32,%mm1 |
| 63 | paddq %mm2,%mm1 |
| 64 | movd 24(%eax),%mm5 |
| 65 | paddq %mm5,%mm6 |
| 66 | movd %mm1,16(%eax) |
| 67 | psrlq $32,%mm1 |
| 68 | paddq %mm4,%mm1 |
| 69 | movd 28(%eax),%mm5 |
| 70 | paddq %mm5,%mm3 |
| 71 | movd %mm1,20(%eax) |
| 72 | psrlq $32,%mm1 |
| 73 | paddq %mm6,%mm1 |
| 74 | movd %mm1,24(%eax) |
| 75 | psrlq $32,%mm1 |
| 76 | paddq %mm3,%mm1 |
| 77 | movd %mm1,28(%eax) |
| 78 | leal 32(%eax),%eax |
| 79 | psrlq $32,%mm1 |
| 80 | subl $8,%ecx |
| 81 | jz .L002maw_sse2_exit |
| 82 | .L000maw_sse2_entry: |
| 83 | testl $4294967288,%ecx |
| 84 | jnz .L001maw_sse2_unrolled |
| 85 | .align 4 |
| 86 | .L003maw_sse2_loop: |
| 87 | movd (%edx),%mm2 |
| 88 | movd (%eax),%mm3 |
| 89 | pmuludq %mm0,%mm2 |
| 90 | leal 4(%edx),%edx |
| 91 | paddq %mm3,%mm1 |
| 92 | paddq %mm2,%mm1 |
| 93 | movd %mm1,(%eax) |
| 94 | subl $1,%ecx |
| 95 | psrlq $32,%mm1 |
| 96 | leal 4(%eax),%eax |
| 97 | jnz .L003maw_sse2_loop |
| 98 | .L002maw_sse2_exit: |
| 99 | movd %mm1,%eax |
| 100 | emms |
| 101 | ret |
| 102 | popl %edi |
| 103 | popl %esi |
| 104 | popl %ebx |
| 105 | popl %ebp |
| 106 | ret |
| 107 | .size bn_mul_add_words,.-.L_bn_mul_add_words_begin |
| 108 | .globl bn_mul_words |
| 109 | .hidden bn_mul_words |
| 110 | .type bn_mul_words,@function |
| 111 | .align 16 |
| 112 | bn_mul_words: |
| 113 | .L_bn_mul_words_begin: |
| 114 | movl 4(%esp),%eax |
| 115 | movl 8(%esp),%edx |
| 116 | movl 12(%esp),%ecx |
| 117 | movd 16(%esp),%mm0 |
| 118 | pxor %mm1,%mm1 |
| 119 | .align 16 |
| 120 | .L004mw_sse2_loop: |
| 121 | movd (%edx),%mm2 |
| 122 | pmuludq %mm0,%mm2 |
| 123 | leal 4(%edx),%edx |
| 124 | paddq %mm2,%mm1 |
| 125 | movd %mm1,(%eax) |
| 126 | subl $1,%ecx |
| 127 | psrlq $32,%mm1 |
| 128 | leal 4(%eax),%eax |
| 129 | jnz .L004mw_sse2_loop |
| 130 | movd %mm1,%eax |
| 131 | emms |
| 132 | ret |
| 133 | popl %edi |
| 134 | popl %esi |
| 135 | popl %ebx |
| 136 | popl %ebp |
| 137 | ret |
| 138 | .size bn_mul_words,.-.L_bn_mul_words_begin |
| 139 | .globl bn_sqr_words |
| 140 | .hidden bn_sqr_words |
| 141 | .type bn_sqr_words,@function |
| 142 | .align 16 |
| 143 | bn_sqr_words: |
| 144 | .L_bn_sqr_words_begin: |
| 145 | movl 4(%esp),%eax |
| 146 | movl 8(%esp),%edx |
| 147 | movl 12(%esp),%ecx |
| 148 | .align 16 |
| 149 | .L005sqr_sse2_loop: |
| 150 | movd (%edx),%mm0 |
| 151 | pmuludq %mm0,%mm0 |
| 152 | leal 4(%edx),%edx |
| 153 | movq %mm0,(%eax) |
| 154 | subl $1,%ecx |
| 155 | leal 8(%eax),%eax |
| 156 | jnz .L005sqr_sse2_loop |
| 157 | emms |
| 158 | ret |
| 159 | popl %edi |
| 160 | popl %esi |
| 161 | popl %ebx |
| 162 | popl %ebp |
| 163 | ret |
| 164 | .size bn_sqr_words,.-.L_bn_sqr_words_begin |
| 165 | .globl bn_add_words |
| 166 | .hidden bn_add_words |
| 167 | .type bn_add_words,@function |
| 168 | .align 16 |
| 169 | bn_add_words: |
| 170 | .L_bn_add_words_begin: |
| 171 | pushl %ebp |
| 172 | pushl %ebx |
| 173 | pushl %esi |
| 174 | pushl %edi |
| 175 |
| 176 | movl 20(%esp),%ebx |
| 177 | movl 24(%esp),%esi |
| 178 | movl 28(%esp),%edi |
| 179 | movl 32(%esp),%ebp |
| 180 | xorl %eax,%eax |
| 181 | andl $4294967288,%ebp |
| 182 | jz .L006aw_finish |
| 183 | .L007aw_loop: |
| 184 |
| 185 | movl (%esi),%ecx |
| 186 | movl (%edi),%edx |
| 187 | addl %eax,%ecx |
| 188 | movl $0,%eax |
| 189 | adcl %eax,%eax |
| 190 | addl %edx,%ecx |
| 191 | adcl $0,%eax |
| 192 | movl %ecx,(%ebx) |
| 193 |
| 194 | movl 4(%esi),%ecx |
| 195 | movl 4(%edi),%edx |
| 196 | addl %eax,%ecx |
| 197 | movl $0,%eax |
| 198 | adcl %eax,%eax |
| 199 | addl %edx,%ecx |
| 200 | adcl $0,%eax |
| 201 | movl %ecx,4(%ebx) |
| 202 |
| 203 | movl 8(%esi),%ecx |
| 204 | movl 8(%edi),%edx |
| 205 | addl %eax,%ecx |
| 206 | movl $0,%eax |
| 207 | adcl %eax,%eax |
| 208 | addl %edx,%ecx |
| 209 | adcl $0,%eax |
| 210 | movl %ecx,8(%ebx) |
| 211 |
| 212 | movl 12(%esi),%ecx |
| 213 | movl 12(%edi),%edx |
| 214 | addl %eax,%ecx |
| 215 | movl $0,%eax |
| 216 | adcl %eax,%eax |
| 217 | addl %edx,%ecx |
| 218 | adcl $0,%eax |
| 219 | movl %ecx,12(%ebx) |
| 220 |
| 221 | movl 16(%esi),%ecx |
| 222 | movl 16(%edi),%edx |
| 223 | addl %eax,%ecx |
| 224 | movl $0,%eax |
| 225 | adcl %eax,%eax |
| 226 | addl %edx,%ecx |
| 227 | adcl $0,%eax |
| 228 | movl %ecx,16(%ebx) |
| 229 |
| 230 | movl 20(%esi),%ecx |
| 231 | movl 20(%edi),%edx |
| 232 | addl %eax,%ecx |
| 233 | movl $0,%eax |
| 234 | adcl %eax,%eax |
| 235 | addl %edx,%ecx |
| 236 | adcl $0,%eax |
| 237 | movl %ecx,20(%ebx) |
| 238 |
| 239 | movl 24(%esi),%ecx |
| 240 | movl 24(%edi),%edx |
| 241 | addl %eax,%ecx |
| 242 | movl $0,%eax |
| 243 | adcl %eax,%eax |
| 244 | addl %edx,%ecx |
| 245 | adcl $0,%eax |
| 246 | movl %ecx,24(%ebx) |
| 247 |
| 248 | movl 28(%esi),%ecx |
| 249 | movl 28(%edi),%edx |
| 250 | addl %eax,%ecx |
| 251 | movl $0,%eax |
| 252 | adcl %eax,%eax |
| 253 | addl %edx,%ecx |
| 254 | adcl $0,%eax |
| 255 | movl %ecx,28(%ebx) |
| 256 |
| 257 | addl $32,%esi |
| 258 | addl $32,%edi |
| 259 | addl $32,%ebx |
| 260 | subl $8,%ebp |
| 261 | jnz .L007aw_loop |
| 262 | .L006aw_finish: |
| 263 | movl 32(%esp),%ebp |
| 264 | andl $7,%ebp |
| 265 | jz .L008aw_end |
| 266 |
| 267 | movl (%esi),%ecx |
| 268 | movl (%edi),%edx |
| 269 | addl %eax,%ecx |
| 270 | movl $0,%eax |
| 271 | adcl %eax,%eax |
| 272 | addl %edx,%ecx |
| 273 | adcl $0,%eax |
| 274 | decl %ebp |
| 275 | movl %ecx,(%ebx) |
| 276 | jz .L008aw_end |
| 277 |
| 278 | movl 4(%esi),%ecx |
| 279 | movl 4(%edi),%edx |
| 280 | addl %eax,%ecx |
| 281 | movl $0,%eax |
| 282 | adcl %eax,%eax |
| 283 | addl %edx,%ecx |
| 284 | adcl $0,%eax |
| 285 | decl %ebp |
| 286 | movl %ecx,4(%ebx) |
| 287 | jz .L008aw_end |
| 288 |
| 289 | movl 8(%esi),%ecx |
| 290 | movl 8(%edi),%edx |
| 291 | addl %eax,%ecx |
| 292 | movl $0,%eax |
| 293 | adcl %eax,%eax |
| 294 | addl %edx,%ecx |
| 295 | adcl $0,%eax |
| 296 | decl %ebp |
| 297 | movl %ecx,8(%ebx) |
| 298 | jz .L008aw_end |
| 299 |
| 300 | movl 12(%esi),%ecx |
| 301 | movl 12(%edi),%edx |
| 302 | addl %eax,%ecx |
| 303 | movl $0,%eax |
| 304 | adcl %eax,%eax |
| 305 | addl %edx,%ecx |
| 306 | adcl $0,%eax |
| 307 | decl %ebp |
| 308 | movl %ecx,12(%ebx) |
| 309 | jz .L008aw_end |
| 310 |
| 311 | movl 16(%esi),%ecx |
| 312 | movl 16(%edi),%edx |
| 313 | addl %eax,%ecx |
| 314 | movl $0,%eax |
| 315 | adcl %eax,%eax |
| 316 | addl %edx,%ecx |
| 317 | adcl $0,%eax |
| 318 | decl %ebp |
| 319 | movl %ecx,16(%ebx) |
| 320 | jz .L008aw_end |
| 321 |
| 322 | movl 20(%esi),%ecx |
| 323 | movl 20(%edi),%edx |
| 324 | addl %eax,%ecx |
| 325 | movl $0,%eax |
| 326 | adcl %eax,%eax |
| 327 | addl %edx,%ecx |
| 328 | adcl $0,%eax |
| 329 | decl %ebp |
| 330 | movl %ecx,20(%ebx) |
| 331 | jz .L008aw_end |
| 332 |
| 333 | movl 24(%esi),%ecx |
| 334 | movl 24(%edi),%edx |
| 335 | addl %eax,%ecx |
| 336 | movl $0,%eax |
| 337 | adcl %eax,%eax |
| 338 | addl %edx,%ecx |
| 339 | adcl $0,%eax |
| 340 | movl %ecx,24(%ebx) |
| 341 | .L008aw_end: |
| 342 | popl %edi |
| 343 | popl %esi |
| 344 | popl %ebx |
| 345 | popl %ebp |
| 346 | ret |
| 347 | .size bn_add_words,.-.L_bn_add_words_begin |
| 348 | .globl bn_sub_words |
| 349 | .hidden bn_sub_words |
| 350 | .type bn_sub_words,@function |
| 351 | .align 16 |
| 352 | bn_sub_words: |
| 353 | .L_bn_sub_words_begin: |
| 354 | pushl %ebp |
| 355 | pushl %ebx |
| 356 | pushl %esi |
| 357 | pushl %edi |
| 358 |
| 359 | movl 20(%esp),%ebx |
| 360 | movl 24(%esp),%esi |
| 361 | movl 28(%esp),%edi |
| 362 | movl 32(%esp),%ebp |
| 363 | xorl %eax,%eax |
| 364 | andl $4294967288,%ebp |
| 365 | jz .L009aw_finish |
| 366 | .L010aw_loop: |
| 367 |
| 368 | movl (%esi),%ecx |
| 369 | movl (%edi),%edx |
| 370 | subl %eax,%ecx |
| 371 | movl $0,%eax |
| 372 | adcl %eax,%eax |
| 373 | subl %edx,%ecx |
| 374 | adcl $0,%eax |
| 375 | movl %ecx,(%ebx) |
| 376 |
| 377 | movl 4(%esi),%ecx |
| 378 | movl 4(%edi),%edx |
| 379 | subl %eax,%ecx |
| 380 | movl $0,%eax |
| 381 | adcl %eax,%eax |
| 382 | subl %edx,%ecx |
| 383 | adcl $0,%eax |
| 384 | movl %ecx,4(%ebx) |
| 385 |
| 386 | movl 8(%esi),%ecx |
| 387 | movl 8(%edi),%edx |
| 388 | subl %eax,%ecx |
| 389 | movl $0,%eax |
| 390 | adcl %eax,%eax |
| 391 | subl %edx,%ecx |
| 392 | adcl $0,%eax |
| 393 | movl %ecx,8(%ebx) |
| 394 |
| 395 | movl 12(%esi),%ecx |
| 396 | movl 12(%edi),%edx |
| 397 | subl %eax,%ecx |
| 398 | movl $0,%eax |
| 399 | adcl %eax,%eax |
| 400 | subl %edx,%ecx |
| 401 | adcl $0,%eax |
| 402 | movl %ecx,12(%ebx) |
| 403 |
| 404 | movl 16(%esi),%ecx |
| 405 | movl 16(%edi),%edx |
| 406 | subl %eax,%ecx |
| 407 | movl $0,%eax |
| 408 | adcl %eax,%eax |
| 409 | subl %edx,%ecx |
| 410 | adcl $0,%eax |
| 411 | movl %ecx,16(%ebx) |
| 412 |
| 413 | movl 20(%esi),%ecx |
| 414 | movl 20(%edi),%edx |
| 415 | subl %eax,%ecx |
| 416 | movl $0,%eax |
| 417 | adcl %eax,%eax |
| 418 | subl %edx,%ecx |
| 419 | adcl $0,%eax |
| 420 | movl %ecx,20(%ebx) |
| 421 |
| 422 | movl 24(%esi),%ecx |
| 423 | movl 24(%edi),%edx |
| 424 | subl %eax,%ecx |
| 425 | movl $0,%eax |
| 426 | adcl %eax,%eax |
| 427 | subl %edx,%ecx |
| 428 | adcl $0,%eax |
| 429 | movl %ecx,24(%ebx) |
| 430 |
| 431 | movl 28(%esi),%ecx |
| 432 | movl 28(%edi),%edx |
| 433 | subl %eax,%ecx |
| 434 | movl $0,%eax |
| 435 | adcl %eax,%eax |
| 436 | subl %edx,%ecx |
| 437 | adcl $0,%eax |
| 438 | movl %ecx,28(%ebx) |
| 439 |
| 440 | addl $32,%esi |
| 441 | addl $32,%edi |
| 442 | addl $32,%ebx |
| 443 | subl $8,%ebp |
| 444 | jnz .L010aw_loop |
| 445 | .L009aw_finish: |
| 446 | movl 32(%esp),%ebp |
| 447 | andl $7,%ebp |
| 448 | jz .L011aw_end |
| 449 |
| 450 | movl (%esi),%ecx |
| 451 | movl (%edi),%edx |
| 452 | subl %eax,%ecx |
| 453 | movl $0,%eax |
| 454 | adcl %eax,%eax |
| 455 | subl %edx,%ecx |
| 456 | adcl $0,%eax |
| 457 | decl %ebp |
| 458 | movl %ecx,(%ebx) |
| 459 | jz .L011aw_end |
| 460 |
| 461 | movl 4(%esi),%ecx |
| 462 | movl 4(%edi),%edx |
| 463 | subl %eax,%ecx |
| 464 | movl $0,%eax |
| 465 | adcl %eax,%eax |
| 466 | subl %edx,%ecx |
| 467 | adcl $0,%eax |
| 468 | decl %ebp |
| 469 | movl %ecx,4(%ebx) |
| 470 | jz .L011aw_end |
| 471 |
| 472 | movl 8(%esi),%ecx |
| 473 | movl 8(%edi),%edx |
| 474 | subl %eax,%ecx |
| 475 | movl $0,%eax |
| 476 | adcl %eax,%eax |
| 477 | subl %edx,%ecx |
| 478 | adcl $0,%eax |
| 479 | decl %ebp |
| 480 | movl %ecx,8(%ebx) |
| 481 | jz .L011aw_end |
| 482 |
| 483 | movl 12(%esi),%ecx |
| 484 | movl 12(%edi),%edx |
| 485 | subl %eax,%ecx |
| 486 | movl $0,%eax |
| 487 | adcl %eax,%eax |
| 488 | subl %edx,%ecx |
| 489 | adcl $0,%eax |
| 490 | decl %ebp |
| 491 | movl %ecx,12(%ebx) |
| 492 | jz .L011aw_end |
| 493 |
| 494 | movl 16(%esi),%ecx |
| 495 | movl 16(%edi),%edx |
| 496 | subl %eax,%ecx |
| 497 | movl $0,%eax |
| 498 | adcl %eax,%eax |
| 499 | subl %edx,%ecx |
| 500 | adcl $0,%eax |
| 501 | decl %ebp |
| 502 | movl %ecx,16(%ebx) |
| 503 | jz .L011aw_end |
| 504 |
| 505 | movl 20(%esi),%ecx |
| 506 | movl 20(%edi),%edx |
| 507 | subl %eax,%ecx |
| 508 | movl $0,%eax |
| 509 | adcl %eax,%eax |
| 510 | subl %edx,%ecx |
| 511 | adcl $0,%eax |
| 512 | decl %ebp |
| 513 | movl %ecx,20(%ebx) |
| 514 | jz .L011aw_end |
| 515 |
| 516 | movl 24(%esi),%ecx |
| 517 | movl 24(%edi),%edx |
| 518 | subl %eax,%ecx |
| 519 | movl $0,%eax |
| 520 | adcl %eax,%eax |
| 521 | subl %edx,%ecx |
| 522 | adcl $0,%eax |
| 523 | movl %ecx,24(%ebx) |
| 524 | .L011aw_end: |
| 525 | popl %edi |
| 526 | popl %esi |
| 527 | popl %ebx |
| 528 | popl %ebp |
| 529 | ret |
| 530 | .size bn_sub_words,.-.L_bn_sub_words_begin |
| 531 | #endif // !defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86) && defined(__ELF__) |
| 532 |