Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1 | #if defined(__i386__) |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 2 | .text |
| 3 | .globl _bn_mul_add_words |
| 4 | .private_extern _bn_mul_add_words |
| 5 | .align 4 |
| 6 | _bn_mul_add_words: |
| 7 | L_bn_mul_add_words_begin: |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 8 | call L000PIC_me_up |
| 9 | L000PIC_me_up: |
| 10 | popl %eax |
| 11 | movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L000PIC_me_up(%eax),%eax |
| 12 | btl $26,(%eax) |
| 13 | jnc L001maw_non_sse2 |
| 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 L002maw_sse2_entry |
| 20 | .align 4,0x90 |
| 21 | L003maw_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 L004maw_sse2_exit |
| 82 | L002maw_sse2_entry: |
| 83 | testl $4294967288,%ecx |
| 84 | jnz L003maw_sse2_unrolled |
| 85 | .align 2,0x90 |
| 86 | L005maw_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 L005maw_sse2_loop |
| 98 | L004maw_sse2_exit: |
| 99 | movd %mm1,%eax |
| 100 | emms |
| 101 | ret |
| 102 | .align 4,0x90 |
| 103 | L001maw_non_sse2: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 104 | pushl %ebp |
| 105 | pushl %ebx |
| 106 | pushl %esi |
| 107 | pushl %edi |
| 108 | |
| 109 | xorl %esi,%esi |
| 110 | movl 20(%esp),%edi |
| 111 | movl 28(%esp),%ecx |
| 112 | movl 24(%esp),%ebx |
| 113 | andl $4294967288,%ecx |
| 114 | movl 32(%esp),%ebp |
| 115 | pushl %ecx |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 116 | jz L006maw_finish |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 117 | .align 4,0x90 |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 118 | L007maw_loop: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 119 | # Round 0 |
| 120 | movl (%ebx),%eax |
| 121 | mull %ebp |
| 122 | addl %esi,%eax |
| 123 | adcl $0,%edx |
| 124 | addl (%edi),%eax |
| 125 | adcl $0,%edx |
| 126 | movl %eax,(%edi) |
| 127 | movl %edx,%esi |
| 128 | # Round 4 |
| 129 | movl 4(%ebx),%eax |
| 130 | mull %ebp |
| 131 | addl %esi,%eax |
| 132 | adcl $0,%edx |
| 133 | addl 4(%edi),%eax |
| 134 | adcl $0,%edx |
| 135 | movl %eax,4(%edi) |
| 136 | movl %edx,%esi |
| 137 | # Round 8 |
| 138 | movl 8(%ebx),%eax |
| 139 | mull %ebp |
| 140 | addl %esi,%eax |
| 141 | adcl $0,%edx |
| 142 | addl 8(%edi),%eax |
| 143 | adcl $0,%edx |
| 144 | movl %eax,8(%edi) |
| 145 | movl %edx,%esi |
| 146 | # Round 12 |
| 147 | movl 12(%ebx),%eax |
| 148 | mull %ebp |
| 149 | addl %esi,%eax |
| 150 | adcl $0,%edx |
| 151 | addl 12(%edi),%eax |
| 152 | adcl $0,%edx |
| 153 | movl %eax,12(%edi) |
| 154 | movl %edx,%esi |
| 155 | # Round 16 |
| 156 | movl 16(%ebx),%eax |
| 157 | mull %ebp |
| 158 | addl %esi,%eax |
| 159 | adcl $0,%edx |
| 160 | addl 16(%edi),%eax |
| 161 | adcl $0,%edx |
| 162 | movl %eax,16(%edi) |
| 163 | movl %edx,%esi |
| 164 | # Round 20 |
| 165 | movl 20(%ebx),%eax |
| 166 | mull %ebp |
| 167 | addl %esi,%eax |
| 168 | adcl $0,%edx |
| 169 | addl 20(%edi),%eax |
| 170 | adcl $0,%edx |
| 171 | movl %eax,20(%edi) |
| 172 | movl %edx,%esi |
| 173 | # Round 24 |
| 174 | movl 24(%ebx),%eax |
| 175 | mull %ebp |
| 176 | addl %esi,%eax |
| 177 | adcl $0,%edx |
| 178 | addl 24(%edi),%eax |
| 179 | adcl $0,%edx |
| 180 | movl %eax,24(%edi) |
| 181 | movl %edx,%esi |
| 182 | # Round 28 |
| 183 | movl 28(%ebx),%eax |
| 184 | mull %ebp |
| 185 | addl %esi,%eax |
| 186 | adcl $0,%edx |
| 187 | addl 28(%edi),%eax |
| 188 | adcl $0,%edx |
| 189 | movl %eax,28(%edi) |
| 190 | movl %edx,%esi |
| 191 | |
| 192 | subl $8,%ecx |
| 193 | leal 32(%ebx),%ebx |
| 194 | leal 32(%edi),%edi |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 195 | jnz L007maw_loop |
| 196 | L006maw_finish: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 197 | movl 32(%esp),%ecx |
| 198 | andl $7,%ecx |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 199 | jnz L008maw_finish2 |
| 200 | jmp L009maw_end |
| 201 | L008maw_finish2: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 202 | # Tail Round 0 |
| 203 | movl (%ebx),%eax |
| 204 | mull %ebp |
| 205 | addl %esi,%eax |
| 206 | adcl $0,%edx |
| 207 | addl (%edi),%eax |
| 208 | adcl $0,%edx |
| 209 | decl %ecx |
| 210 | movl %eax,(%edi) |
| 211 | movl %edx,%esi |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 212 | jz L009maw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 213 | # Tail Round 1 |
| 214 | movl 4(%ebx),%eax |
| 215 | mull %ebp |
| 216 | addl %esi,%eax |
| 217 | adcl $0,%edx |
| 218 | addl 4(%edi),%eax |
| 219 | adcl $0,%edx |
| 220 | decl %ecx |
| 221 | movl %eax,4(%edi) |
| 222 | movl %edx,%esi |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 223 | jz L009maw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 224 | # Tail Round 2 |
| 225 | movl 8(%ebx),%eax |
| 226 | mull %ebp |
| 227 | addl %esi,%eax |
| 228 | adcl $0,%edx |
| 229 | addl 8(%edi),%eax |
| 230 | adcl $0,%edx |
| 231 | decl %ecx |
| 232 | movl %eax,8(%edi) |
| 233 | movl %edx,%esi |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 234 | jz L009maw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 235 | # Tail Round 3 |
| 236 | movl 12(%ebx),%eax |
| 237 | mull %ebp |
| 238 | addl %esi,%eax |
| 239 | adcl $0,%edx |
| 240 | addl 12(%edi),%eax |
| 241 | adcl $0,%edx |
| 242 | decl %ecx |
| 243 | movl %eax,12(%edi) |
| 244 | movl %edx,%esi |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 245 | jz L009maw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 246 | # Tail Round 4 |
| 247 | movl 16(%ebx),%eax |
| 248 | mull %ebp |
| 249 | addl %esi,%eax |
| 250 | adcl $0,%edx |
| 251 | addl 16(%edi),%eax |
| 252 | adcl $0,%edx |
| 253 | decl %ecx |
| 254 | movl %eax,16(%edi) |
| 255 | movl %edx,%esi |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 256 | jz L009maw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 257 | # Tail Round 5 |
| 258 | movl 20(%ebx),%eax |
| 259 | mull %ebp |
| 260 | addl %esi,%eax |
| 261 | adcl $0,%edx |
| 262 | addl 20(%edi),%eax |
| 263 | adcl $0,%edx |
| 264 | decl %ecx |
| 265 | movl %eax,20(%edi) |
| 266 | movl %edx,%esi |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 267 | jz L009maw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 268 | # Tail Round 6 |
| 269 | movl 24(%ebx),%eax |
| 270 | mull %ebp |
| 271 | addl %esi,%eax |
| 272 | adcl $0,%edx |
| 273 | addl 24(%edi),%eax |
| 274 | adcl $0,%edx |
| 275 | movl %eax,24(%edi) |
| 276 | movl %edx,%esi |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 277 | L009maw_end: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 278 | movl %esi,%eax |
| 279 | popl %ecx |
| 280 | popl %edi |
| 281 | popl %esi |
| 282 | popl %ebx |
| 283 | popl %ebp |
| 284 | ret |
| 285 | .globl _bn_mul_words |
| 286 | .private_extern _bn_mul_words |
| 287 | .align 4 |
| 288 | _bn_mul_words: |
| 289 | L_bn_mul_words_begin: |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 290 | call L010PIC_me_up |
| 291 | L010PIC_me_up: |
| 292 | popl %eax |
| 293 | movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L010PIC_me_up(%eax),%eax |
| 294 | btl $26,(%eax) |
| 295 | jnc L011mw_non_sse2 |
| 296 | movl 4(%esp),%eax |
| 297 | movl 8(%esp),%edx |
| 298 | movl 12(%esp),%ecx |
| 299 | movd 16(%esp),%mm0 |
| 300 | pxor %mm1,%mm1 |
| 301 | .align 4,0x90 |
| 302 | L012mw_sse2_loop: |
| 303 | movd (%edx),%mm2 |
| 304 | pmuludq %mm0,%mm2 |
| 305 | leal 4(%edx),%edx |
| 306 | paddq %mm2,%mm1 |
| 307 | movd %mm1,(%eax) |
| 308 | subl $1,%ecx |
| 309 | psrlq $32,%mm1 |
| 310 | leal 4(%eax),%eax |
| 311 | jnz L012mw_sse2_loop |
| 312 | movd %mm1,%eax |
| 313 | emms |
| 314 | ret |
| 315 | .align 4,0x90 |
| 316 | L011mw_non_sse2: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 317 | pushl %ebp |
| 318 | pushl %ebx |
| 319 | pushl %esi |
| 320 | pushl %edi |
| 321 | |
| 322 | xorl %esi,%esi |
| 323 | movl 20(%esp),%edi |
| 324 | movl 24(%esp),%ebx |
| 325 | movl 28(%esp),%ebp |
| 326 | movl 32(%esp),%ecx |
| 327 | andl $4294967288,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 328 | jz L013mw_finish |
| 329 | L014mw_loop: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 330 | # Round 0 |
| 331 | movl (%ebx),%eax |
| 332 | mull %ecx |
| 333 | addl %esi,%eax |
| 334 | adcl $0,%edx |
| 335 | movl %eax,(%edi) |
| 336 | movl %edx,%esi |
| 337 | # Round 4 |
| 338 | movl 4(%ebx),%eax |
| 339 | mull %ecx |
| 340 | addl %esi,%eax |
| 341 | adcl $0,%edx |
| 342 | movl %eax,4(%edi) |
| 343 | movl %edx,%esi |
| 344 | # Round 8 |
| 345 | movl 8(%ebx),%eax |
| 346 | mull %ecx |
| 347 | addl %esi,%eax |
| 348 | adcl $0,%edx |
| 349 | movl %eax,8(%edi) |
| 350 | movl %edx,%esi |
| 351 | # Round 12 |
| 352 | movl 12(%ebx),%eax |
| 353 | mull %ecx |
| 354 | addl %esi,%eax |
| 355 | adcl $0,%edx |
| 356 | movl %eax,12(%edi) |
| 357 | movl %edx,%esi |
| 358 | # Round 16 |
| 359 | movl 16(%ebx),%eax |
| 360 | mull %ecx |
| 361 | addl %esi,%eax |
| 362 | adcl $0,%edx |
| 363 | movl %eax,16(%edi) |
| 364 | movl %edx,%esi |
| 365 | # Round 20 |
| 366 | movl 20(%ebx),%eax |
| 367 | mull %ecx |
| 368 | addl %esi,%eax |
| 369 | adcl $0,%edx |
| 370 | movl %eax,20(%edi) |
| 371 | movl %edx,%esi |
| 372 | # Round 24 |
| 373 | movl 24(%ebx),%eax |
| 374 | mull %ecx |
| 375 | addl %esi,%eax |
| 376 | adcl $0,%edx |
| 377 | movl %eax,24(%edi) |
| 378 | movl %edx,%esi |
| 379 | # Round 28 |
| 380 | movl 28(%ebx),%eax |
| 381 | mull %ecx |
| 382 | addl %esi,%eax |
| 383 | adcl $0,%edx |
| 384 | movl %eax,28(%edi) |
| 385 | movl %edx,%esi |
| 386 | |
| 387 | addl $32,%ebx |
| 388 | addl $32,%edi |
| 389 | subl $8,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 390 | jz L013mw_finish |
| 391 | jmp L014mw_loop |
| 392 | L013mw_finish: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 393 | movl 28(%esp),%ebp |
| 394 | andl $7,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 395 | jnz L015mw_finish2 |
| 396 | jmp L016mw_end |
| 397 | L015mw_finish2: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 398 | # Tail Round 0 |
| 399 | movl (%ebx),%eax |
| 400 | mull %ecx |
| 401 | addl %esi,%eax |
| 402 | adcl $0,%edx |
| 403 | movl %eax,(%edi) |
| 404 | movl %edx,%esi |
| 405 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 406 | jz L016mw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 407 | # Tail Round 1 |
| 408 | movl 4(%ebx),%eax |
| 409 | mull %ecx |
| 410 | addl %esi,%eax |
| 411 | adcl $0,%edx |
| 412 | movl %eax,4(%edi) |
| 413 | movl %edx,%esi |
| 414 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 415 | jz L016mw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 416 | # Tail Round 2 |
| 417 | movl 8(%ebx),%eax |
| 418 | mull %ecx |
| 419 | addl %esi,%eax |
| 420 | adcl $0,%edx |
| 421 | movl %eax,8(%edi) |
| 422 | movl %edx,%esi |
| 423 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 424 | jz L016mw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 425 | # Tail Round 3 |
| 426 | movl 12(%ebx),%eax |
| 427 | mull %ecx |
| 428 | addl %esi,%eax |
| 429 | adcl $0,%edx |
| 430 | movl %eax,12(%edi) |
| 431 | movl %edx,%esi |
| 432 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 433 | jz L016mw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 434 | # Tail Round 4 |
| 435 | movl 16(%ebx),%eax |
| 436 | mull %ecx |
| 437 | addl %esi,%eax |
| 438 | adcl $0,%edx |
| 439 | movl %eax,16(%edi) |
| 440 | movl %edx,%esi |
| 441 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 442 | jz L016mw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 443 | # Tail Round 5 |
| 444 | movl 20(%ebx),%eax |
| 445 | mull %ecx |
| 446 | addl %esi,%eax |
| 447 | adcl $0,%edx |
| 448 | movl %eax,20(%edi) |
| 449 | movl %edx,%esi |
| 450 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 451 | jz L016mw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 452 | # Tail Round 6 |
| 453 | movl 24(%ebx),%eax |
| 454 | mull %ecx |
| 455 | addl %esi,%eax |
| 456 | adcl $0,%edx |
| 457 | movl %eax,24(%edi) |
| 458 | movl %edx,%esi |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 459 | L016mw_end: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 460 | movl %esi,%eax |
| 461 | popl %edi |
| 462 | popl %esi |
| 463 | popl %ebx |
| 464 | popl %ebp |
| 465 | ret |
| 466 | .globl _bn_sqr_words |
| 467 | .private_extern _bn_sqr_words |
| 468 | .align 4 |
| 469 | _bn_sqr_words: |
| 470 | L_bn_sqr_words_begin: |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 471 | call L017PIC_me_up |
| 472 | L017PIC_me_up: |
| 473 | popl %eax |
| 474 | movl L_OPENSSL_ia32cap_P$non_lazy_ptr-L017PIC_me_up(%eax),%eax |
| 475 | btl $26,(%eax) |
| 476 | jnc L018sqr_non_sse2 |
| 477 | movl 4(%esp),%eax |
| 478 | movl 8(%esp),%edx |
| 479 | movl 12(%esp),%ecx |
| 480 | .align 4,0x90 |
| 481 | L019sqr_sse2_loop: |
| 482 | movd (%edx),%mm0 |
| 483 | pmuludq %mm0,%mm0 |
| 484 | leal 4(%edx),%edx |
| 485 | movq %mm0,(%eax) |
| 486 | subl $1,%ecx |
| 487 | leal 8(%eax),%eax |
| 488 | jnz L019sqr_sse2_loop |
| 489 | emms |
| 490 | ret |
| 491 | .align 4,0x90 |
| 492 | L018sqr_non_sse2: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 493 | pushl %ebp |
| 494 | pushl %ebx |
| 495 | pushl %esi |
| 496 | pushl %edi |
| 497 | |
| 498 | movl 20(%esp),%esi |
| 499 | movl 24(%esp),%edi |
| 500 | movl 28(%esp),%ebx |
| 501 | andl $4294967288,%ebx |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 502 | jz L020sw_finish |
| 503 | L021sw_loop: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 504 | # Round 0 |
| 505 | movl (%edi),%eax |
| 506 | mull %eax |
| 507 | movl %eax,(%esi) |
| 508 | movl %edx,4(%esi) |
| 509 | # Round 4 |
| 510 | movl 4(%edi),%eax |
| 511 | mull %eax |
| 512 | movl %eax,8(%esi) |
| 513 | movl %edx,12(%esi) |
| 514 | # Round 8 |
| 515 | movl 8(%edi),%eax |
| 516 | mull %eax |
| 517 | movl %eax,16(%esi) |
| 518 | movl %edx,20(%esi) |
| 519 | # Round 12 |
| 520 | movl 12(%edi),%eax |
| 521 | mull %eax |
| 522 | movl %eax,24(%esi) |
| 523 | movl %edx,28(%esi) |
| 524 | # Round 16 |
| 525 | movl 16(%edi),%eax |
| 526 | mull %eax |
| 527 | movl %eax,32(%esi) |
| 528 | movl %edx,36(%esi) |
| 529 | # Round 20 |
| 530 | movl 20(%edi),%eax |
| 531 | mull %eax |
| 532 | movl %eax,40(%esi) |
| 533 | movl %edx,44(%esi) |
| 534 | # Round 24 |
| 535 | movl 24(%edi),%eax |
| 536 | mull %eax |
| 537 | movl %eax,48(%esi) |
| 538 | movl %edx,52(%esi) |
| 539 | # Round 28 |
| 540 | movl 28(%edi),%eax |
| 541 | mull %eax |
| 542 | movl %eax,56(%esi) |
| 543 | movl %edx,60(%esi) |
| 544 | |
| 545 | addl $32,%edi |
| 546 | addl $64,%esi |
| 547 | subl $8,%ebx |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 548 | jnz L021sw_loop |
| 549 | L020sw_finish: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 550 | movl 28(%esp),%ebx |
| 551 | andl $7,%ebx |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 552 | jz L022sw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 553 | # Tail Round 0 |
| 554 | movl (%edi),%eax |
| 555 | mull %eax |
| 556 | movl %eax,(%esi) |
| 557 | decl %ebx |
| 558 | movl %edx,4(%esi) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 559 | jz L022sw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 560 | # Tail Round 1 |
| 561 | movl 4(%edi),%eax |
| 562 | mull %eax |
| 563 | movl %eax,8(%esi) |
| 564 | decl %ebx |
| 565 | movl %edx,12(%esi) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 566 | jz L022sw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 567 | # Tail Round 2 |
| 568 | movl 8(%edi),%eax |
| 569 | mull %eax |
| 570 | movl %eax,16(%esi) |
| 571 | decl %ebx |
| 572 | movl %edx,20(%esi) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 573 | jz L022sw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 574 | # Tail Round 3 |
| 575 | movl 12(%edi),%eax |
| 576 | mull %eax |
| 577 | movl %eax,24(%esi) |
| 578 | decl %ebx |
| 579 | movl %edx,28(%esi) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 580 | jz L022sw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 581 | # Tail Round 4 |
| 582 | movl 16(%edi),%eax |
| 583 | mull %eax |
| 584 | movl %eax,32(%esi) |
| 585 | decl %ebx |
| 586 | movl %edx,36(%esi) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 587 | jz L022sw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 588 | # Tail Round 5 |
| 589 | movl 20(%edi),%eax |
| 590 | mull %eax |
| 591 | movl %eax,40(%esi) |
| 592 | decl %ebx |
| 593 | movl %edx,44(%esi) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 594 | jz L022sw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 595 | # Tail Round 6 |
| 596 | movl 24(%edi),%eax |
| 597 | mull %eax |
| 598 | movl %eax,48(%esi) |
| 599 | movl %edx,52(%esi) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 600 | L022sw_end: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 601 | popl %edi |
| 602 | popl %esi |
| 603 | popl %ebx |
| 604 | popl %ebp |
| 605 | ret |
| 606 | .globl _bn_div_words |
| 607 | .private_extern _bn_div_words |
| 608 | .align 4 |
| 609 | _bn_div_words: |
| 610 | L_bn_div_words_begin: |
| 611 | movl 4(%esp),%edx |
| 612 | movl 8(%esp),%eax |
| 613 | movl 12(%esp),%ecx |
| 614 | divl %ecx |
| 615 | ret |
| 616 | .globl _bn_add_words |
| 617 | .private_extern _bn_add_words |
| 618 | .align 4 |
| 619 | _bn_add_words: |
| 620 | L_bn_add_words_begin: |
| 621 | pushl %ebp |
| 622 | pushl %ebx |
| 623 | pushl %esi |
| 624 | pushl %edi |
| 625 | |
| 626 | movl 20(%esp),%ebx |
| 627 | movl 24(%esp),%esi |
| 628 | movl 28(%esp),%edi |
| 629 | movl 32(%esp),%ebp |
| 630 | xorl %eax,%eax |
| 631 | andl $4294967288,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 632 | jz L023aw_finish |
| 633 | L024aw_loop: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 634 | # Round 0 |
| 635 | movl (%esi),%ecx |
| 636 | movl (%edi),%edx |
| 637 | addl %eax,%ecx |
| 638 | movl $0,%eax |
| 639 | adcl %eax,%eax |
| 640 | addl %edx,%ecx |
| 641 | adcl $0,%eax |
| 642 | movl %ecx,(%ebx) |
| 643 | # Round 1 |
| 644 | movl 4(%esi),%ecx |
| 645 | movl 4(%edi),%edx |
| 646 | addl %eax,%ecx |
| 647 | movl $0,%eax |
| 648 | adcl %eax,%eax |
| 649 | addl %edx,%ecx |
| 650 | adcl $0,%eax |
| 651 | movl %ecx,4(%ebx) |
| 652 | # Round 2 |
| 653 | movl 8(%esi),%ecx |
| 654 | movl 8(%edi),%edx |
| 655 | addl %eax,%ecx |
| 656 | movl $0,%eax |
| 657 | adcl %eax,%eax |
| 658 | addl %edx,%ecx |
| 659 | adcl $0,%eax |
| 660 | movl %ecx,8(%ebx) |
| 661 | # Round 3 |
| 662 | movl 12(%esi),%ecx |
| 663 | movl 12(%edi),%edx |
| 664 | addl %eax,%ecx |
| 665 | movl $0,%eax |
| 666 | adcl %eax,%eax |
| 667 | addl %edx,%ecx |
| 668 | adcl $0,%eax |
| 669 | movl %ecx,12(%ebx) |
| 670 | # Round 4 |
| 671 | movl 16(%esi),%ecx |
| 672 | movl 16(%edi),%edx |
| 673 | addl %eax,%ecx |
| 674 | movl $0,%eax |
| 675 | adcl %eax,%eax |
| 676 | addl %edx,%ecx |
| 677 | adcl $0,%eax |
| 678 | movl %ecx,16(%ebx) |
| 679 | # Round 5 |
| 680 | movl 20(%esi),%ecx |
| 681 | movl 20(%edi),%edx |
| 682 | addl %eax,%ecx |
| 683 | movl $0,%eax |
| 684 | adcl %eax,%eax |
| 685 | addl %edx,%ecx |
| 686 | adcl $0,%eax |
| 687 | movl %ecx,20(%ebx) |
| 688 | # Round 6 |
| 689 | movl 24(%esi),%ecx |
| 690 | movl 24(%edi),%edx |
| 691 | addl %eax,%ecx |
| 692 | movl $0,%eax |
| 693 | adcl %eax,%eax |
| 694 | addl %edx,%ecx |
| 695 | adcl $0,%eax |
| 696 | movl %ecx,24(%ebx) |
| 697 | # Round 7 |
| 698 | movl 28(%esi),%ecx |
| 699 | movl 28(%edi),%edx |
| 700 | addl %eax,%ecx |
| 701 | movl $0,%eax |
| 702 | adcl %eax,%eax |
| 703 | addl %edx,%ecx |
| 704 | adcl $0,%eax |
| 705 | movl %ecx,28(%ebx) |
| 706 | |
| 707 | addl $32,%esi |
| 708 | addl $32,%edi |
| 709 | addl $32,%ebx |
| 710 | subl $8,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 711 | jnz L024aw_loop |
| 712 | L023aw_finish: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 713 | movl 32(%esp),%ebp |
| 714 | andl $7,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 715 | jz L025aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 716 | # Tail Round 0 |
| 717 | movl (%esi),%ecx |
| 718 | movl (%edi),%edx |
| 719 | addl %eax,%ecx |
| 720 | movl $0,%eax |
| 721 | adcl %eax,%eax |
| 722 | addl %edx,%ecx |
| 723 | adcl $0,%eax |
| 724 | decl %ebp |
| 725 | movl %ecx,(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 726 | jz L025aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 727 | # Tail Round 1 |
| 728 | movl 4(%esi),%ecx |
| 729 | movl 4(%edi),%edx |
| 730 | addl %eax,%ecx |
| 731 | movl $0,%eax |
| 732 | adcl %eax,%eax |
| 733 | addl %edx,%ecx |
| 734 | adcl $0,%eax |
| 735 | decl %ebp |
| 736 | movl %ecx,4(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 737 | jz L025aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 738 | # Tail Round 2 |
| 739 | movl 8(%esi),%ecx |
| 740 | movl 8(%edi),%edx |
| 741 | addl %eax,%ecx |
| 742 | movl $0,%eax |
| 743 | adcl %eax,%eax |
| 744 | addl %edx,%ecx |
| 745 | adcl $0,%eax |
| 746 | decl %ebp |
| 747 | movl %ecx,8(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 748 | jz L025aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 749 | # Tail Round 3 |
| 750 | movl 12(%esi),%ecx |
| 751 | movl 12(%edi),%edx |
| 752 | addl %eax,%ecx |
| 753 | movl $0,%eax |
| 754 | adcl %eax,%eax |
| 755 | addl %edx,%ecx |
| 756 | adcl $0,%eax |
| 757 | decl %ebp |
| 758 | movl %ecx,12(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 759 | jz L025aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 760 | # Tail Round 4 |
| 761 | movl 16(%esi),%ecx |
| 762 | movl 16(%edi),%edx |
| 763 | addl %eax,%ecx |
| 764 | movl $0,%eax |
| 765 | adcl %eax,%eax |
| 766 | addl %edx,%ecx |
| 767 | adcl $0,%eax |
| 768 | decl %ebp |
| 769 | movl %ecx,16(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 770 | jz L025aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 771 | # Tail Round 5 |
| 772 | movl 20(%esi),%ecx |
| 773 | movl 20(%edi),%edx |
| 774 | addl %eax,%ecx |
| 775 | movl $0,%eax |
| 776 | adcl %eax,%eax |
| 777 | addl %edx,%ecx |
| 778 | adcl $0,%eax |
| 779 | decl %ebp |
| 780 | movl %ecx,20(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 781 | jz L025aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 782 | # Tail Round 6 |
| 783 | movl 24(%esi),%ecx |
| 784 | movl 24(%edi),%edx |
| 785 | addl %eax,%ecx |
| 786 | movl $0,%eax |
| 787 | adcl %eax,%eax |
| 788 | addl %edx,%ecx |
| 789 | adcl $0,%eax |
| 790 | movl %ecx,24(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 791 | L025aw_end: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 792 | popl %edi |
| 793 | popl %esi |
| 794 | popl %ebx |
| 795 | popl %ebp |
| 796 | ret |
| 797 | .globl _bn_sub_words |
| 798 | .private_extern _bn_sub_words |
| 799 | .align 4 |
| 800 | _bn_sub_words: |
| 801 | L_bn_sub_words_begin: |
| 802 | pushl %ebp |
| 803 | pushl %ebx |
| 804 | pushl %esi |
| 805 | pushl %edi |
| 806 | |
| 807 | movl 20(%esp),%ebx |
| 808 | movl 24(%esp),%esi |
| 809 | movl 28(%esp),%edi |
| 810 | movl 32(%esp),%ebp |
| 811 | xorl %eax,%eax |
| 812 | andl $4294967288,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 813 | jz L026aw_finish |
| 814 | L027aw_loop: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 815 | # Round 0 |
| 816 | movl (%esi),%ecx |
| 817 | movl (%edi),%edx |
| 818 | subl %eax,%ecx |
| 819 | movl $0,%eax |
| 820 | adcl %eax,%eax |
| 821 | subl %edx,%ecx |
| 822 | adcl $0,%eax |
| 823 | movl %ecx,(%ebx) |
| 824 | # Round 1 |
| 825 | movl 4(%esi),%ecx |
| 826 | movl 4(%edi),%edx |
| 827 | subl %eax,%ecx |
| 828 | movl $0,%eax |
| 829 | adcl %eax,%eax |
| 830 | subl %edx,%ecx |
| 831 | adcl $0,%eax |
| 832 | movl %ecx,4(%ebx) |
| 833 | # Round 2 |
| 834 | movl 8(%esi),%ecx |
| 835 | movl 8(%edi),%edx |
| 836 | subl %eax,%ecx |
| 837 | movl $0,%eax |
| 838 | adcl %eax,%eax |
| 839 | subl %edx,%ecx |
| 840 | adcl $0,%eax |
| 841 | movl %ecx,8(%ebx) |
| 842 | # Round 3 |
| 843 | movl 12(%esi),%ecx |
| 844 | movl 12(%edi),%edx |
| 845 | subl %eax,%ecx |
| 846 | movl $0,%eax |
| 847 | adcl %eax,%eax |
| 848 | subl %edx,%ecx |
| 849 | adcl $0,%eax |
| 850 | movl %ecx,12(%ebx) |
| 851 | # Round 4 |
| 852 | movl 16(%esi),%ecx |
| 853 | movl 16(%edi),%edx |
| 854 | subl %eax,%ecx |
| 855 | movl $0,%eax |
| 856 | adcl %eax,%eax |
| 857 | subl %edx,%ecx |
| 858 | adcl $0,%eax |
| 859 | movl %ecx,16(%ebx) |
| 860 | # Round 5 |
| 861 | movl 20(%esi),%ecx |
| 862 | movl 20(%edi),%edx |
| 863 | subl %eax,%ecx |
| 864 | movl $0,%eax |
| 865 | adcl %eax,%eax |
| 866 | subl %edx,%ecx |
| 867 | adcl $0,%eax |
| 868 | movl %ecx,20(%ebx) |
| 869 | # Round 6 |
| 870 | movl 24(%esi),%ecx |
| 871 | movl 24(%edi),%edx |
| 872 | subl %eax,%ecx |
| 873 | movl $0,%eax |
| 874 | adcl %eax,%eax |
| 875 | subl %edx,%ecx |
| 876 | adcl $0,%eax |
| 877 | movl %ecx,24(%ebx) |
| 878 | # Round 7 |
| 879 | movl 28(%esi),%ecx |
| 880 | movl 28(%edi),%edx |
| 881 | subl %eax,%ecx |
| 882 | movl $0,%eax |
| 883 | adcl %eax,%eax |
| 884 | subl %edx,%ecx |
| 885 | adcl $0,%eax |
| 886 | movl %ecx,28(%ebx) |
| 887 | |
| 888 | addl $32,%esi |
| 889 | addl $32,%edi |
| 890 | addl $32,%ebx |
| 891 | subl $8,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 892 | jnz L027aw_loop |
| 893 | L026aw_finish: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 894 | movl 32(%esp),%ebp |
| 895 | andl $7,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 896 | jz L028aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 897 | # Tail Round 0 |
| 898 | movl (%esi),%ecx |
| 899 | movl (%edi),%edx |
| 900 | subl %eax,%ecx |
| 901 | movl $0,%eax |
| 902 | adcl %eax,%eax |
| 903 | subl %edx,%ecx |
| 904 | adcl $0,%eax |
| 905 | decl %ebp |
| 906 | movl %ecx,(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 907 | jz L028aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 908 | # Tail Round 1 |
| 909 | movl 4(%esi),%ecx |
| 910 | movl 4(%edi),%edx |
| 911 | subl %eax,%ecx |
| 912 | movl $0,%eax |
| 913 | adcl %eax,%eax |
| 914 | subl %edx,%ecx |
| 915 | adcl $0,%eax |
| 916 | decl %ebp |
| 917 | movl %ecx,4(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 918 | jz L028aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 919 | # Tail Round 2 |
| 920 | movl 8(%esi),%ecx |
| 921 | movl 8(%edi),%edx |
| 922 | subl %eax,%ecx |
| 923 | movl $0,%eax |
| 924 | adcl %eax,%eax |
| 925 | subl %edx,%ecx |
| 926 | adcl $0,%eax |
| 927 | decl %ebp |
| 928 | movl %ecx,8(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 929 | jz L028aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 930 | # Tail Round 3 |
| 931 | movl 12(%esi),%ecx |
| 932 | movl 12(%edi),%edx |
| 933 | subl %eax,%ecx |
| 934 | movl $0,%eax |
| 935 | adcl %eax,%eax |
| 936 | subl %edx,%ecx |
| 937 | adcl $0,%eax |
| 938 | decl %ebp |
| 939 | movl %ecx,12(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 940 | jz L028aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 941 | # Tail Round 4 |
| 942 | movl 16(%esi),%ecx |
| 943 | movl 16(%edi),%edx |
| 944 | subl %eax,%ecx |
| 945 | movl $0,%eax |
| 946 | adcl %eax,%eax |
| 947 | subl %edx,%ecx |
| 948 | adcl $0,%eax |
| 949 | decl %ebp |
| 950 | movl %ecx,16(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 951 | jz L028aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 952 | # Tail Round 5 |
| 953 | movl 20(%esi),%ecx |
| 954 | movl 20(%edi),%edx |
| 955 | subl %eax,%ecx |
| 956 | movl $0,%eax |
| 957 | adcl %eax,%eax |
| 958 | subl %edx,%ecx |
| 959 | adcl $0,%eax |
| 960 | decl %ebp |
| 961 | movl %ecx,20(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 962 | jz L028aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 963 | # Tail Round 6 |
| 964 | movl 24(%esi),%ecx |
| 965 | movl 24(%edi),%edx |
| 966 | subl %eax,%ecx |
| 967 | movl $0,%eax |
| 968 | adcl %eax,%eax |
| 969 | subl %edx,%ecx |
| 970 | adcl $0,%eax |
| 971 | movl %ecx,24(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 972 | L028aw_end: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 973 | popl %edi |
| 974 | popl %esi |
| 975 | popl %ebx |
| 976 | popl %ebp |
| 977 | ret |
| 978 | .globl _bn_sub_part_words |
| 979 | .private_extern _bn_sub_part_words |
| 980 | .align 4 |
| 981 | _bn_sub_part_words: |
| 982 | L_bn_sub_part_words_begin: |
| 983 | pushl %ebp |
| 984 | pushl %ebx |
| 985 | pushl %esi |
| 986 | pushl %edi |
| 987 | |
| 988 | movl 20(%esp),%ebx |
| 989 | movl 24(%esp),%esi |
| 990 | movl 28(%esp),%edi |
| 991 | movl 32(%esp),%ebp |
| 992 | xorl %eax,%eax |
| 993 | andl $4294967288,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 994 | jz L029aw_finish |
| 995 | L030aw_loop: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 996 | # Round 0 |
| 997 | movl (%esi),%ecx |
| 998 | movl (%edi),%edx |
| 999 | subl %eax,%ecx |
| 1000 | movl $0,%eax |
| 1001 | adcl %eax,%eax |
| 1002 | subl %edx,%ecx |
| 1003 | adcl $0,%eax |
| 1004 | movl %ecx,(%ebx) |
| 1005 | # Round 1 |
| 1006 | movl 4(%esi),%ecx |
| 1007 | movl 4(%edi),%edx |
| 1008 | subl %eax,%ecx |
| 1009 | movl $0,%eax |
| 1010 | adcl %eax,%eax |
| 1011 | subl %edx,%ecx |
| 1012 | adcl $0,%eax |
| 1013 | movl %ecx,4(%ebx) |
| 1014 | # Round 2 |
| 1015 | movl 8(%esi),%ecx |
| 1016 | movl 8(%edi),%edx |
| 1017 | subl %eax,%ecx |
| 1018 | movl $0,%eax |
| 1019 | adcl %eax,%eax |
| 1020 | subl %edx,%ecx |
| 1021 | adcl $0,%eax |
| 1022 | movl %ecx,8(%ebx) |
| 1023 | # Round 3 |
| 1024 | movl 12(%esi),%ecx |
| 1025 | movl 12(%edi),%edx |
| 1026 | subl %eax,%ecx |
| 1027 | movl $0,%eax |
| 1028 | adcl %eax,%eax |
| 1029 | subl %edx,%ecx |
| 1030 | adcl $0,%eax |
| 1031 | movl %ecx,12(%ebx) |
| 1032 | # Round 4 |
| 1033 | movl 16(%esi),%ecx |
| 1034 | movl 16(%edi),%edx |
| 1035 | subl %eax,%ecx |
| 1036 | movl $0,%eax |
| 1037 | adcl %eax,%eax |
| 1038 | subl %edx,%ecx |
| 1039 | adcl $0,%eax |
| 1040 | movl %ecx,16(%ebx) |
| 1041 | # Round 5 |
| 1042 | movl 20(%esi),%ecx |
| 1043 | movl 20(%edi),%edx |
| 1044 | subl %eax,%ecx |
| 1045 | movl $0,%eax |
| 1046 | adcl %eax,%eax |
| 1047 | subl %edx,%ecx |
| 1048 | adcl $0,%eax |
| 1049 | movl %ecx,20(%ebx) |
| 1050 | # Round 6 |
| 1051 | movl 24(%esi),%ecx |
| 1052 | movl 24(%edi),%edx |
| 1053 | subl %eax,%ecx |
| 1054 | movl $0,%eax |
| 1055 | adcl %eax,%eax |
| 1056 | subl %edx,%ecx |
| 1057 | adcl $0,%eax |
| 1058 | movl %ecx,24(%ebx) |
| 1059 | # Round 7 |
| 1060 | movl 28(%esi),%ecx |
| 1061 | movl 28(%edi),%edx |
| 1062 | subl %eax,%ecx |
| 1063 | movl $0,%eax |
| 1064 | adcl %eax,%eax |
| 1065 | subl %edx,%ecx |
| 1066 | adcl $0,%eax |
| 1067 | movl %ecx,28(%ebx) |
| 1068 | |
| 1069 | addl $32,%esi |
| 1070 | addl $32,%edi |
| 1071 | addl $32,%ebx |
| 1072 | subl $8,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1073 | jnz L030aw_loop |
| 1074 | L029aw_finish: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1075 | movl 32(%esp),%ebp |
| 1076 | andl $7,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1077 | jz L031aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1078 | # Tail Round 0 |
| 1079 | movl (%esi),%ecx |
| 1080 | movl (%edi),%edx |
| 1081 | subl %eax,%ecx |
| 1082 | movl $0,%eax |
| 1083 | adcl %eax,%eax |
| 1084 | subl %edx,%ecx |
| 1085 | adcl $0,%eax |
| 1086 | movl %ecx,(%ebx) |
| 1087 | addl $4,%esi |
| 1088 | addl $4,%edi |
| 1089 | addl $4,%ebx |
| 1090 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1091 | jz L031aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1092 | # Tail Round 1 |
| 1093 | movl (%esi),%ecx |
| 1094 | movl (%edi),%edx |
| 1095 | subl %eax,%ecx |
| 1096 | movl $0,%eax |
| 1097 | adcl %eax,%eax |
| 1098 | subl %edx,%ecx |
| 1099 | adcl $0,%eax |
| 1100 | movl %ecx,(%ebx) |
| 1101 | addl $4,%esi |
| 1102 | addl $4,%edi |
| 1103 | addl $4,%ebx |
| 1104 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1105 | jz L031aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1106 | # Tail Round 2 |
| 1107 | movl (%esi),%ecx |
| 1108 | movl (%edi),%edx |
| 1109 | subl %eax,%ecx |
| 1110 | movl $0,%eax |
| 1111 | adcl %eax,%eax |
| 1112 | subl %edx,%ecx |
| 1113 | adcl $0,%eax |
| 1114 | movl %ecx,(%ebx) |
| 1115 | addl $4,%esi |
| 1116 | addl $4,%edi |
| 1117 | addl $4,%ebx |
| 1118 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1119 | jz L031aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1120 | # Tail Round 3 |
| 1121 | movl (%esi),%ecx |
| 1122 | movl (%edi),%edx |
| 1123 | subl %eax,%ecx |
| 1124 | movl $0,%eax |
| 1125 | adcl %eax,%eax |
| 1126 | subl %edx,%ecx |
| 1127 | adcl $0,%eax |
| 1128 | movl %ecx,(%ebx) |
| 1129 | addl $4,%esi |
| 1130 | addl $4,%edi |
| 1131 | addl $4,%ebx |
| 1132 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1133 | jz L031aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1134 | # Tail Round 4 |
| 1135 | movl (%esi),%ecx |
| 1136 | movl (%edi),%edx |
| 1137 | subl %eax,%ecx |
| 1138 | movl $0,%eax |
| 1139 | adcl %eax,%eax |
| 1140 | subl %edx,%ecx |
| 1141 | adcl $0,%eax |
| 1142 | movl %ecx,(%ebx) |
| 1143 | addl $4,%esi |
| 1144 | addl $4,%edi |
| 1145 | addl $4,%ebx |
| 1146 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1147 | jz L031aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1148 | # Tail Round 5 |
| 1149 | movl (%esi),%ecx |
| 1150 | movl (%edi),%edx |
| 1151 | subl %eax,%ecx |
| 1152 | movl $0,%eax |
| 1153 | adcl %eax,%eax |
| 1154 | subl %edx,%ecx |
| 1155 | adcl $0,%eax |
| 1156 | movl %ecx,(%ebx) |
| 1157 | addl $4,%esi |
| 1158 | addl $4,%edi |
| 1159 | addl $4,%ebx |
| 1160 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1161 | jz L031aw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1162 | # Tail Round 6 |
| 1163 | movl (%esi),%ecx |
| 1164 | movl (%edi),%edx |
| 1165 | subl %eax,%ecx |
| 1166 | movl $0,%eax |
| 1167 | adcl %eax,%eax |
| 1168 | subl %edx,%ecx |
| 1169 | adcl $0,%eax |
| 1170 | movl %ecx,(%ebx) |
| 1171 | addl $4,%esi |
| 1172 | addl $4,%edi |
| 1173 | addl $4,%ebx |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1174 | L031aw_end: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1175 | cmpl $0,36(%esp) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1176 | je L032pw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1177 | movl 36(%esp),%ebp |
| 1178 | cmpl $0,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1179 | je L032pw_end |
| 1180 | jge L033pw_pos |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1181 | # pw_neg |
| 1182 | movl $0,%edx |
| 1183 | subl %ebp,%edx |
| 1184 | movl %edx,%ebp |
| 1185 | andl $4294967288,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1186 | jz L034pw_neg_finish |
| 1187 | L035pw_neg_loop: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1188 | # dl<0 Round 0 |
| 1189 | movl $0,%ecx |
| 1190 | movl (%edi),%edx |
| 1191 | subl %eax,%ecx |
| 1192 | movl $0,%eax |
| 1193 | adcl %eax,%eax |
| 1194 | subl %edx,%ecx |
| 1195 | adcl $0,%eax |
| 1196 | movl %ecx,(%ebx) |
| 1197 | # dl<0 Round 1 |
| 1198 | movl $0,%ecx |
| 1199 | movl 4(%edi),%edx |
| 1200 | subl %eax,%ecx |
| 1201 | movl $0,%eax |
| 1202 | adcl %eax,%eax |
| 1203 | subl %edx,%ecx |
| 1204 | adcl $0,%eax |
| 1205 | movl %ecx,4(%ebx) |
| 1206 | # dl<0 Round 2 |
| 1207 | movl $0,%ecx |
| 1208 | movl 8(%edi),%edx |
| 1209 | subl %eax,%ecx |
| 1210 | movl $0,%eax |
| 1211 | adcl %eax,%eax |
| 1212 | subl %edx,%ecx |
| 1213 | adcl $0,%eax |
| 1214 | movl %ecx,8(%ebx) |
| 1215 | # dl<0 Round 3 |
| 1216 | movl $0,%ecx |
| 1217 | movl 12(%edi),%edx |
| 1218 | subl %eax,%ecx |
| 1219 | movl $0,%eax |
| 1220 | adcl %eax,%eax |
| 1221 | subl %edx,%ecx |
| 1222 | adcl $0,%eax |
| 1223 | movl %ecx,12(%ebx) |
| 1224 | # dl<0 Round 4 |
| 1225 | movl $0,%ecx |
| 1226 | movl 16(%edi),%edx |
| 1227 | subl %eax,%ecx |
| 1228 | movl $0,%eax |
| 1229 | adcl %eax,%eax |
| 1230 | subl %edx,%ecx |
| 1231 | adcl $0,%eax |
| 1232 | movl %ecx,16(%ebx) |
| 1233 | # dl<0 Round 5 |
| 1234 | movl $0,%ecx |
| 1235 | movl 20(%edi),%edx |
| 1236 | subl %eax,%ecx |
| 1237 | movl $0,%eax |
| 1238 | adcl %eax,%eax |
| 1239 | subl %edx,%ecx |
| 1240 | adcl $0,%eax |
| 1241 | movl %ecx,20(%ebx) |
| 1242 | # dl<0 Round 6 |
| 1243 | movl $0,%ecx |
| 1244 | movl 24(%edi),%edx |
| 1245 | subl %eax,%ecx |
| 1246 | movl $0,%eax |
| 1247 | adcl %eax,%eax |
| 1248 | subl %edx,%ecx |
| 1249 | adcl $0,%eax |
| 1250 | movl %ecx,24(%ebx) |
| 1251 | # dl<0 Round 7 |
| 1252 | movl $0,%ecx |
| 1253 | movl 28(%edi),%edx |
| 1254 | subl %eax,%ecx |
| 1255 | movl $0,%eax |
| 1256 | adcl %eax,%eax |
| 1257 | subl %edx,%ecx |
| 1258 | adcl $0,%eax |
| 1259 | movl %ecx,28(%ebx) |
| 1260 | |
| 1261 | addl $32,%edi |
| 1262 | addl $32,%ebx |
| 1263 | subl $8,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1264 | jnz L035pw_neg_loop |
| 1265 | L034pw_neg_finish: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1266 | movl 36(%esp),%edx |
| 1267 | movl $0,%ebp |
| 1268 | subl %edx,%ebp |
| 1269 | andl $7,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1270 | jz L032pw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1271 | # dl<0 Tail Round 0 |
| 1272 | movl $0,%ecx |
| 1273 | movl (%edi),%edx |
| 1274 | subl %eax,%ecx |
| 1275 | movl $0,%eax |
| 1276 | adcl %eax,%eax |
| 1277 | subl %edx,%ecx |
| 1278 | adcl $0,%eax |
| 1279 | decl %ebp |
| 1280 | movl %ecx,(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1281 | jz L032pw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1282 | # dl<0 Tail Round 1 |
| 1283 | movl $0,%ecx |
| 1284 | movl 4(%edi),%edx |
| 1285 | subl %eax,%ecx |
| 1286 | movl $0,%eax |
| 1287 | adcl %eax,%eax |
| 1288 | subl %edx,%ecx |
| 1289 | adcl $0,%eax |
| 1290 | decl %ebp |
| 1291 | movl %ecx,4(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1292 | jz L032pw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1293 | # dl<0 Tail Round 2 |
| 1294 | movl $0,%ecx |
| 1295 | movl 8(%edi),%edx |
| 1296 | subl %eax,%ecx |
| 1297 | movl $0,%eax |
| 1298 | adcl %eax,%eax |
| 1299 | subl %edx,%ecx |
| 1300 | adcl $0,%eax |
| 1301 | decl %ebp |
| 1302 | movl %ecx,8(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1303 | jz L032pw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1304 | # dl<0 Tail Round 3 |
| 1305 | movl $0,%ecx |
| 1306 | movl 12(%edi),%edx |
| 1307 | subl %eax,%ecx |
| 1308 | movl $0,%eax |
| 1309 | adcl %eax,%eax |
| 1310 | subl %edx,%ecx |
| 1311 | adcl $0,%eax |
| 1312 | decl %ebp |
| 1313 | movl %ecx,12(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1314 | jz L032pw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1315 | # dl<0 Tail Round 4 |
| 1316 | movl $0,%ecx |
| 1317 | movl 16(%edi),%edx |
| 1318 | subl %eax,%ecx |
| 1319 | movl $0,%eax |
| 1320 | adcl %eax,%eax |
| 1321 | subl %edx,%ecx |
| 1322 | adcl $0,%eax |
| 1323 | decl %ebp |
| 1324 | movl %ecx,16(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1325 | jz L032pw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1326 | # dl<0 Tail Round 5 |
| 1327 | movl $0,%ecx |
| 1328 | movl 20(%edi),%edx |
| 1329 | subl %eax,%ecx |
| 1330 | movl $0,%eax |
| 1331 | adcl %eax,%eax |
| 1332 | subl %edx,%ecx |
| 1333 | adcl $0,%eax |
| 1334 | decl %ebp |
| 1335 | movl %ecx,20(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1336 | jz L032pw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1337 | # dl<0 Tail Round 6 |
| 1338 | movl $0,%ecx |
| 1339 | movl 24(%edi),%edx |
| 1340 | subl %eax,%ecx |
| 1341 | movl $0,%eax |
| 1342 | adcl %eax,%eax |
| 1343 | subl %edx,%ecx |
| 1344 | adcl $0,%eax |
| 1345 | movl %ecx,24(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1346 | jmp L032pw_end |
| 1347 | L033pw_pos: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1348 | andl $4294967288,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1349 | jz L036pw_pos_finish |
| 1350 | L037pw_pos_loop: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1351 | # dl>0 Round 0 |
| 1352 | movl (%esi),%ecx |
| 1353 | subl %eax,%ecx |
| 1354 | movl %ecx,(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1355 | jnc L038pw_nc0 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1356 | # dl>0 Round 1 |
| 1357 | movl 4(%esi),%ecx |
| 1358 | subl %eax,%ecx |
| 1359 | movl %ecx,4(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1360 | jnc L039pw_nc1 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1361 | # dl>0 Round 2 |
| 1362 | movl 8(%esi),%ecx |
| 1363 | subl %eax,%ecx |
| 1364 | movl %ecx,8(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1365 | jnc L040pw_nc2 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1366 | # dl>0 Round 3 |
| 1367 | movl 12(%esi),%ecx |
| 1368 | subl %eax,%ecx |
| 1369 | movl %ecx,12(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1370 | jnc L041pw_nc3 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1371 | # dl>0 Round 4 |
| 1372 | movl 16(%esi),%ecx |
| 1373 | subl %eax,%ecx |
| 1374 | movl %ecx,16(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1375 | jnc L042pw_nc4 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1376 | # dl>0 Round 5 |
| 1377 | movl 20(%esi),%ecx |
| 1378 | subl %eax,%ecx |
| 1379 | movl %ecx,20(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1380 | jnc L043pw_nc5 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1381 | # dl>0 Round 6 |
| 1382 | movl 24(%esi),%ecx |
| 1383 | subl %eax,%ecx |
| 1384 | movl %ecx,24(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1385 | jnc L044pw_nc6 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1386 | # dl>0 Round 7 |
| 1387 | movl 28(%esi),%ecx |
| 1388 | subl %eax,%ecx |
| 1389 | movl %ecx,28(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1390 | jnc L045pw_nc7 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1391 | |
| 1392 | addl $32,%esi |
| 1393 | addl $32,%ebx |
| 1394 | subl $8,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1395 | jnz L037pw_pos_loop |
| 1396 | L036pw_pos_finish: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1397 | movl 36(%esp),%ebp |
| 1398 | andl $7,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1399 | jz L032pw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1400 | # dl>0 Tail Round 0 |
| 1401 | movl (%esi),%ecx |
| 1402 | subl %eax,%ecx |
| 1403 | movl %ecx,(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1404 | jnc L046pw_tail_nc0 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1405 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1406 | jz L032pw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1407 | # dl>0 Tail Round 1 |
| 1408 | movl 4(%esi),%ecx |
| 1409 | subl %eax,%ecx |
| 1410 | movl %ecx,4(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1411 | jnc L047pw_tail_nc1 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1412 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1413 | jz L032pw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1414 | # dl>0 Tail Round 2 |
| 1415 | movl 8(%esi),%ecx |
| 1416 | subl %eax,%ecx |
| 1417 | movl %ecx,8(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1418 | jnc L048pw_tail_nc2 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1419 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1420 | jz L032pw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1421 | # dl>0 Tail Round 3 |
| 1422 | movl 12(%esi),%ecx |
| 1423 | subl %eax,%ecx |
| 1424 | movl %ecx,12(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1425 | jnc L049pw_tail_nc3 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1426 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1427 | jz L032pw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1428 | # dl>0 Tail Round 4 |
| 1429 | movl 16(%esi),%ecx |
| 1430 | subl %eax,%ecx |
| 1431 | movl %ecx,16(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1432 | jnc L050pw_tail_nc4 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1433 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1434 | jz L032pw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1435 | # dl>0 Tail Round 5 |
| 1436 | movl 20(%esi),%ecx |
| 1437 | subl %eax,%ecx |
| 1438 | movl %ecx,20(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1439 | jnc L051pw_tail_nc5 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1440 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1441 | jz L032pw_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1442 | # dl>0 Tail Round 6 |
| 1443 | movl 24(%esi),%ecx |
| 1444 | subl %eax,%ecx |
| 1445 | movl %ecx,24(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1446 | jnc L052pw_tail_nc6 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1447 | movl $1,%eax |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1448 | jmp L032pw_end |
| 1449 | L053pw_nc_loop: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1450 | movl (%esi),%ecx |
| 1451 | movl %ecx,(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1452 | L038pw_nc0: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1453 | movl 4(%esi),%ecx |
| 1454 | movl %ecx,4(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1455 | L039pw_nc1: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1456 | movl 8(%esi),%ecx |
| 1457 | movl %ecx,8(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1458 | L040pw_nc2: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1459 | movl 12(%esi),%ecx |
| 1460 | movl %ecx,12(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1461 | L041pw_nc3: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1462 | movl 16(%esi),%ecx |
| 1463 | movl %ecx,16(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1464 | L042pw_nc4: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1465 | movl 20(%esi),%ecx |
| 1466 | movl %ecx,20(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1467 | L043pw_nc5: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1468 | movl 24(%esi),%ecx |
| 1469 | movl %ecx,24(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1470 | L044pw_nc6: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1471 | movl 28(%esi),%ecx |
| 1472 | movl %ecx,28(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1473 | L045pw_nc7: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1474 | |
| 1475 | addl $32,%esi |
| 1476 | addl $32,%ebx |
| 1477 | subl $8,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1478 | jnz L053pw_nc_loop |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1479 | movl 36(%esp),%ebp |
| 1480 | andl $7,%ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1481 | jz L054pw_nc_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1482 | movl (%esi),%ecx |
| 1483 | movl %ecx,(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1484 | L046pw_tail_nc0: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1485 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1486 | jz L054pw_nc_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1487 | movl 4(%esi),%ecx |
| 1488 | movl %ecx,4(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1489 | L047pw_tail_nc1: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1490 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1491 | jz L054pw_nc_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1492 | movl 8(%esi),%ecx |
| 1493 | movl %ecx,8(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1494 | L048pw_tail_nc2: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1495 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1496 | jz L054pw_nc_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1497 | movl 12(%esi),%ecx |
| 1498 | movl %ecx,12(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1499 | L049pw_tail_nc3: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1500 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1501 | jz L054pw_nc_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1502 | movl 16(%esi),%ecx |
| 1503 | movl %ecx,16(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1504 | L050pw_tail_nc4: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1505 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1506 | jz L054pw_nc_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1507 | movl 20(%esi),%ecx |
| 1508 | movl %ecx,20(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1509 | L051pw_tail_nc5: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1510 | decl %ebp |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1511 | jz L054pw_nc_end |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1512 | movl 24(%esi),%ecx |
| 1513 | movl %ecx,24(%ebx) |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1514 | L052pw_tail_nc6: |
| 1515 | L054pw_nc_end: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1516 | movl $0,%eax |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1517 | L032pw_end: |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1518 | popl %edi |
| 1519 | popl %esi |
| 1520 | popl %ebx |
| 1521 | popl %ebp |
| 1522 | ret |
Adam Langley | e9ada86 | 2015-05-11 17:20:37 -0700 | [diff] [blame] | 1523 | .section __IMPORT,__pointers,non_lazy_symbol_pointers |
| 1524 | L_OPENSSL_ia32cap_P$non_lazy_ptr: |
| 1525 | .indirect_symbol _OPENSSL_ia32cap_P |
| 1526 | .long 0 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1527 | #endif |