1/* 2Copyright (c) 2014, Intel Corporation 3All rights reserved. 4 5Redistribution and use in source and binary forms, with or without 6modification, are permitted provided that the following conditions are met: 7 8 * Redistributions of source code must retain the above copyright notice, 9 * this list of conditions and the following disclaimer. 10 11 * Redistributions in binary form must reproduce the above copyright notice, 12 * this list of conditions and the following disclaimer in the documentation 13 * and/or other materials provided with the distribution. 14 15 * Neither the name of Intel Corporation nor the names of its contributors 16 * may be used to endorse or promote products derived from this software 17 * without specific prior written permission. 18 19THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 23ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 26ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29*/ 30 31# -- Begin __libm_tancot_huge 32 .text 33 .align 16,0x90 34 .hidden __libm_tancot_huge 35 .globl __libm_tancot_huge 36__libm_tancot_huge: 37# parameter 1: 8 + %ebp 38# parameter 2: 16 + %ebp 39# parameter 3: 20 + %ebp 40..B1.1: 41 pushl %ebp 42 movl %esp, %ebp 43 andl $-64, %esp 44 pushl %esi 45 pushl %edi 46 pushl %ebx 47 subl $52, %esp 48 movl 16(%ebp), %eax 49 movl 20(%ebp), %ebx 50 movl %eax, 40(%esp) 51..B1.2: 52 fnstcw 38(%esp) 53..B1.3: 54 movl 12(%ebp), %edx 55 movl %edx, %eax 56 andl $2147483647, %eax 57 shrl $31, %edx 58 movl %edx, 44(%esp) 59 cmpl $1104150528, %eax 60 call ..L2 61..L2: 62 popl %esi 63 lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%esi), %esi 64 jae ..B1.11 65..B1.4: 66 movsd 8(%ebp), %xmm1 67 movzwl 38(%esp), %ecx 68 movl %ecx, %edx 69 andl $768, %edx 70 andps .L_2il0floatpacket.0@GOTOFF(%esi), %xmm1 71 cmpl $768, %edx 72 movsd _Pi4Inv@GOTOFF(%esi), %xmm0 73 mulsd %xmm1, %xmm0 74 movsd %xmm1, 8(%ebp) 75 movsd %xmm0, (%esp) 76 je ..B1.39 77..B1.5: 78 orl $-64768, %ecx 79 movw %cx, 36(%esp) 80..B1.6: 81 fldcw 36(%esp) 82..B1.7: 83 movsd 8(%ebp), %xmm1 84 movl $1, %edi 85..B1.8: 86 movl %esi, 12(%esp) 87 movl 4(%esp), %esi 88 movl %esi, %edx 89 movl %edi, 24(%esp) 90 movl %esi, %edi 91 shrl $20, %edi 92 andl $1048575, %edx 93 movl %edi, %ecx 94 orl $1048576, %edx 95 negl %ecx 96 addl $13, %edi 97 movl %ebx, 8(%esp) 98 addl $19, %ecx 99 movl %edx, %ebx 100 movl %ecx, 28(%esp) 101 shrl %cl, %ebx 102 movl %edi, %ecx 103 shll %cl, %edx 104 movl 28(%esp), %ecx 105 movl (%esp), %edi 106 shrl %cl, %edi 107 orl %edi, %edx 108 cmpl $1094713344, %esi 109 movsd %xmm1, 16(%esp) 110 fldl 16(%esp) 111 cmovb %ebx, %edx 112 movl 24(%esp), %edi 113 movl 12(%esp), %esi 114 lea 1(%edx), %ebx 115 andl $-2, %ebx 116 movl %ebx, 16(%esp) 117 cmpl $1094713344, %eax 118 fildl 16(%esp) 119 movl 8(%esp), %ebx 120 jae ..B1.10 121..B1.9: 122 fldl _Pi4x3@GOTOFF(%esi) 123 fmul %st(1), %st 124 faddp %st, %st(2) 125 fldl 8+_Pi4x3@GOTOFF(%esi) 126 fmul %st(1), %st 127 faddp %st, %st(2) 128 fldl 16+_Pi4x3@GOTOFF(%esi) 129 fmulp %st, %st(1) 130 faddp %st, %st(1) 131 jmp ..B1.17 132..B1.10: 133 fldl _Pi4x4@GOTOFF(%esi) 134 fmul %st(1), %st 135 faddp %st, %st(2) 136 fldl 8+_Pi4x4@GOTOFF(%esi) 137 fmul %st(1), %st 138 faddp %st, %st(2) 139 fldl 16+_Pi4x4@GOTOFF(%esi) 140 fmul %st(1), %st 141 faddp %st, %st(2) 142 fldl 24+_Pi4x4@GOTOFF(%esi) 143 fmulp %st, %st(1) 144 faddp %st, %st(1) 145 jmp ..B1.17 146..B1.11: 147 movzwl 38(%esp), %edx 148 movl %edx, %eax 149 andl $768, %eax 150 cmpl $768, %eax 151 je ..B1.40 152..B1.12: 153 orl $-64768, %edx 154 movw %dx, 36(%esp) 155..B1.13: 156 fldcw 36(%esp) 157..B1.14: 158 movl $1, %edi 159..B1.15: 160 movsd 8(%ebp), %xmm0 161 addl $-32, %esp 162 andps .L_2il0floatpacket.0@GOTOFF(%esi), %xmm0 163 lea 32(%esp), %eax 164 movsd %xmm0, 16(%eax) 165 fldl 16(%eax) 166 fstpt (%esp) 167 movl $0, 12(%esp) 168 movl %eax, 16(%esp) 169 call __libm_reduce_pi04l 170..B1.43: 171 movl %eax, %edx 172 addl $32, %esp 173..B1.16: 174 fldl (%esp) 175 fldl 8(%esp) 176 faddp %st, %st(1) 177..B1.17: 178 movl %ebx, %eax 179 andl $3, %eax 180 cmpl $3, %eax 181 jne ..B1.24 182..B1.18: 183 fldl _ones@GOTOFF(%esi) 184 incl %edx 185 fdiv %st(1), %st 186 testb $2, %dl 187 fstpt 24(%esp) 188 fld %st(0) 189 fmul %st(1), %st 190 fld %st(0) 191 fmul %st(1), %st 192 fldt 36+_TP@GOTOFF(%esi) 193 fmul %st(2), %st 194 fldt 24+_TP@GOTOFF(%esi) 195 faddp %st, %st(1) 196 fmul %st(2), %st 197 fldt 12+_TP@GOTOFF(%esi) 198 faddp %st, %st(1) 199 fmul %st(2), %st 200 fldt 36+_TQ@GOTOFF(%esi) 201 fmul %st(3), %st 202 fldt 24+_TQ@GOTOFF(%esi) 203 faddp %st, %st(1) 204 fmul %st(3), %st 205 fldt 12+_TQ@GOTOFF(%esi) 206 faddp %st, %st(1) 207 fmul %st(3), %st 208 fldt _TQ@GOTOFF(%esi) 209 faddp %st, %st(1) 210 fldt _TP@GOTOFF(%esi) 211 faddp %st, %st(2) 212 fldt 132+_GP@GOTOFF(%esi) 213 fmul %st(3), %st 214 fldt 120+_GP@GOTOFF(%esi) 215 fmul %st(4), %st 216 fldt 108+_GP@GOTOFF(%esi) 217 faddp %st, %st(2) 218 fxch %st(1) 219 fmul %st(4), %st 220 fldt 96+_GP@GOTOFF(%esi) 221 faddp %st, %st(2) 222 fxch %st(1) 223 fmul %st(4), %st 224 fldt 84+_GP@GOTOFF(%esi) 225 faddp %st, %st(2) 226 fxch %st(1) 227 fmul %st(4), %st 228 fldt 72+_GP@GOTOFF(%esi) 229 faddp %st, %st(2) 230 fxch %st(1) 231 fmul %st(4), %st 232 fldt 60+_GP@GOTOFF(%esi) 233 faddp %st, %st(2) 234 fxch %st(1) 235 fmul %st(4), %st 236 fldt 48+_GP@GOTOFF(%esi) 237 faddp %st, %st(2) 238 fxch %st(1) 239 fmul %st(4), %st 240 fldt 36+_GP@GOTOFF(%esi) 241 faddp %st, %st(2) 242 fxch %st(1) 243 fmul %st(4), %st 244 fldt 24+_GP@GOTOFF(%esi) 245 faddp %st, %st(2) 246 fxch %st(1) 247 fmulp %st, %st(4) 248 fldt 12+_GP@GOTOFF(%esi) 249 faddp %st, %st(1) 250 fmul %st(4), %st 251 fmul %st(5), %st 252 fldt _GP@GOTOFF(%esi) 253 faddp %st, %st(4) 254 fxch %st(3) 255 fmul %st(5), %st 256 faddp %st, %st(3) 257 je ..B1.20 258..B1.19: 259 fldt 24(%esp) 260 fxch %st(1) 261 fdivrp %st, %st(2) 262 fxch %st(1) 263 fmulp %st, %st(3) 264 movl 44(%esp), %eax 265 xorl $1, %eax 266 fxch %st(2) 267 fmul %st(3), %st 268 fldl _ones@GOTOFF(%esi,%eax,8) 269 fmul %st, %st(2) 270 fmul %st, %st(3) 271 fxch %st(3) 272 faddp %st, %st(2) 273 fxch %st(1) 274 fstpl 16(%esp) 275 fmul %st(1), %st 276 fxch %st(1) 277 fmulp %st, %st(2) 278 movsd 16(%esp), %xmm0 279 faddp %st, %st(1) 280 fstpl 16(%esp) 281 movsd 16(%esp), %xmm1 282 jmp ..B1.21 283..B1.20: 284 fdivrp %st, %st(1) 285 fmulp %st, %st(2) 286 fxch %st(1) 287 fmul %st(2), %st 288 movl 44(%esp), %eax 289 fldl _ones@GOTOFF(%esi,%eax,8) 290 fmul %st, %st(1) 291 fmul %st, %st(3) 292 fxch %st(3) 293 faddp %st, %st(1) 294 fstpl 16(%esp) 295 fmul %st(1), %st 296 fldt 24(%esp) 297 fmulp %st, %st(2) 298 movsd 16(%esp), %xmm0 299 faddp %st, %st(1) 300 fstpl 16(%esp) 301 movsd 16(%esp), %xmm1 302..B1.21: 303 testl %edi, %edi 304 je ..B1.23 305..B1.22: 306 fldcw 38(%esp) 307..B1.23: 308 movl 40(%esp), %eax 309 movsd %xmm0, (%eax) 310 movsd %xmm1, 8(%eax) 311 addl $52, %esp 312 popl %ebx 313 popl %edi 314 popl %esi 315 movl %ebp, %esp 316 popl %ebp 317 ret 318..B1.24: 319 testb $2, %bl 320 je ..B1.31 321..B1.25: 322 incl %edx 323 fld %st(0) 324 fmul %st(1), %st 325 testb $2, %dl 326 je ..B1.27 327..B1.26: 328 fldl _ones@GOTOFF(%esi) 329 fdiv %st(2), %st 330 fld %st(1) 331 fmul %st(2), %st 332 fldt 132+_GP@GOTOFF(%esi) 333 fmul %st(1), %st 334 fldt 120+_GP@GOTOFF(%esi) 335 fmul %st(2), %st 336 fldt 108+_GP@GOTOFF(%esi) 337 movl 44(%esp), %eax 338 faddp %st, %st(2) 339 fxch %st(1) 340 fmul %st(2), %st 341 xorl $1, %eax 342 fldt 96+_GP@GOTOFF(%esi) 343 faddp %st, %st(2) 344 fxch %st(1) 345 fmul %st(2), %st 346 fldt 84+_GP@GOTOFF(%esi) 347 faddp %st, %st(2) 348 fxch %st(1) 349 fmul %st(2), %st 350 fldt 72+_GP@GOTOFF(%esi) 351 faddp %st, %st(2) 352 fxch %st(1) 353 fmul %st(2), %st 354 fldt 60+_GP@GOTOFF(%esi) 355 faddp %st, %st(2) 356 fxch %st(1) 357 fmul %st(2), %st 358 fldt 48+_GP@GOTOFF(%esi) 359 faddp %st, %st(2) 360 fxch %st(1) 361 fmul %st(2), %st 362 fldt 36+_GP@GOTOFF(%esi) 363 faddp %st, %st(2) 364 fxch %st(1) 365 fmul %st(2), %st 366 fldt 24+_GP@GOTOFF(%esi) 367 faddp %st, %st(2) 368 fxch %st(1) 369 fmulp %st, %st(2) 370 fldt 12+_GP@GOTOFF(%esi) 371 faddp %st, %st(1) 372 fmulp %st, %st(3) 373 fldt _GP@GOTOFF(%esi) 374 faddp %st, %st(1) 375 fmul %st(3), %st 376 fxch %st(2) 377 fmulp %st, %st(3) 378 fxch %st(1) 379 faddp %st, %st(2) 380 fldl _ones@GOTOFF(%esi,%eax,8) 381 fmul %st, %st(2) 382 fmulp %st, %st(1) 383 faddp %st, %st(1) 384 fstpl 16(%esp) 385 movsd 16(%esp), %xmm0 386 jmp ..B1.28 387..B1.27: 388 fldt 36+_TP@GOTOFF(%esi) 389 fmul %st(1), %st 390 fldt 24+_TP@GOTOFF(%esi) 391 movl 44(%esp), %eax 392 faddp %st, %st(1) 393 fmul %st(1), %st 394 fldt 36+_TQ@GOTOFF(%esi) 395 fmul %st(2), %st 396 fldt 24+_TQ@GOTOFF(%esi) 397 faddp %st, %st(1) 398 fmul %st(2), %st 399 fldt 12+_TQ@GOTOFF(%esi) 400 faddp %st, %st(1) 401 fmul %st(2), %st 402 fldt _TQ@GOTOFF(%esi) 403 faddp %st, %st(1) 404 fldt 12+_TP@GOTOFF(%esi) 405 faddp %st, %st(2) 406 fxch %st(1) 407 fmul %st(2), %st 408 fldt _TP@GOTOFF(%esi) 409 faddp %st, %st(1) 410 fdivp %st, %st(1) 411 fmulp %st, %st(1) 412 fmul %st(1), %st 413 fldl _ones@GOTOFF(%esi,%eax,8) 414 fmul %st, %st(1) 415 fmulp %st, %st(2) 416 faddp %st, %st(1) 417 fstpl 16(%esp) 418 movsd 16(%esp), %xmm0 419..B1.28: 420 testl %edi, %edi 421 je ..B1.30 422..B1.29: 423 fldcw 38(%esp) 424..B1.30: 425 movl 40(%esp), %eax 426 movsd %xmm0, (%eax) 427 addl $52, %esp 428 popl %ebx 429 popl %edi 430 popl %esi 431 movl %ebp, %esp 432 popl %ebp 433 ret 434..B1.31: 435 testb $1, %bl 436 je ..B1.38 437..B1.32: 438 incl %edx 439 fld %st(0) 440 fmul %st(1), %st 441 testb $2, %dl 442 je ..B1.34 443..B1.33: 444 fldt 36+_TP@GOTOFF(%esi) 445 fmul %st(1), %st 446 fldt 24+_TP@GOTOFF(%esi) 447 movl 44(%esp), %eax 448 faddp %st, %st(1) 449 fmul %st(1), %st 450 xorl $1, %eax 451 fldt 36+_TQ@GOTOFF(%esi) 452 fmul %st(2), %st 453 fldt 24+_TQ@GOTOFF(%esi) 454 faddp %st, %st(1) 455 fmul %st(2), %st 456 fldt 12+_TQ@GOTOFF(%esi) 457 faddp %st, %st(1) 458 fmul %st(2), %st 459 fldt _TQ@GOTOFF(%esi) 460 faddp %st, %st(1) 461 fldt 12+_TP@GOTOFF(%esi) 462 faddp %st, %st(2) 463 fxch %st(1) 464 fmul %st(2), %st 465 fldt _TP@GOTOFF(%esi) 466 faddp %st, %st(1) 467 fdivp %st, %st(1) 468 fmulp %st, %st(1) 469 fmul %st(1), %st 470 fldl _ones@GOTOFF(%esi,%eax,8) 471 fmul %st, %st(1) 472 fmulp %st, %st(2) 473 faddp %st, %st(1) 474 fstpl 16(%esp) 475 movsd 16(%esp), %xmm0 476 jmp ..B1.35 477..B1.34: 478 fldl _ones@GOTOFF(%esi) 479 fdiv %st(2), %st 480 fld %st(1) 481 fmul %st(2), %st 482 fldt 132+_GP@GOTOFF(%esi) 483 fmul %st(1), %st 484 fldt 120+_GP@GOTOFF(%esi) 485 fmul %st(2), %st 486 fldt 108+_GP@GOTOFF(%esi) 487 movl 44(%esp), %eax 488 faddp %st, %st(2) 489 fxch %st(1) 490 fmul %st(2), %st 491 fldt 96+_GP@GOTOFF(%esi) 492 faddp %st, %st(2) 493 fxch %st(1) 494 fmul %st(2), %st 495 fldt 84+_GP@GOTOFF(%esi) 496 faddp %st, %st(2) 497 fxch %st(1) 498 fmul %st(2), %st 499 fldt 72+_GP@GOTOFF(%esi) 500 faddp %st, %st(2) 501 fxch %st(1) 502 fmul %st(2), %st 503 fldt 60+_GP@GOTOFF(%esi) 504 faddp %st, %st(2) 505 fxch %st(1) 506 fmul %st(2), %st 507 fldt 48+_GP@GOTOFF(%esi) 508 faddp %st, %st(2) 509 fxch %st(1) 510 fmul %st(2), %st 511 fldt 36+_GP@GOTOFF(%esi) 512 faddp %st, %st(2) 513 fxch %st(1) 514 fmul %st(2), %st 515 fldt 24+_GP@GOTOFF(%esi) 516 faddp %st, %st(2) 517 fxch %st(1) 518 fmulp %st, %st(2) 519 fldt 12+_GP@GOTOFF(%esi) 520 faddp %st, %st(1) 521 fmulp %st, %st(3) 522 fldt _GP@GOTOFF(%esi) 523 faddp %st, %st(1) 524 fmul %st(3), %st 525 fxch %st(2) 526 fmulp %st, %st(3) 527 fxch %st(1) 528 faddp %st, %st(2) 529 fldl _ones@GOTOFF(%esi,%eax,8) 530 fmul %st, %st(2) 531 fmulp %st, %st(1) 532 faddp %st, %st(1) 533 fstpl 16(%esp) 534 movsd 16(%esp), %xmm0 535..B1.35: 536 testl %edi, %edi 537 je ..B1.37 538..B1.36: 539 fldcw 38(%esp) 540..B1.37: 541 movl 40(%esp), %eax 542 movsd %xmm0, 8(%eax) 543 addl $52, %esp 544 popl %ebx 545 popl %edi 546 popl %esi 547 movl %ebp, %esp 548 popl %ebp 549 ret 550..B1.38: 551 fstp %st(0) 552 addl $52, %esp 553 popl %ebx 554 popl %edi 555 popl %esi 556 movl %ebp, %esp 557 popl %ebp 558 ret 559..B1.39: 560 xorl %edi, %edi 561 jmp ..B1.8 562..B1.40: 563 xorl %edi, %edi 564 jmp ..B1.15 565 .align 16,0x90 566 .type __libm_tancot_huge,@function 567 .size __libm_tancot_huge,.-__libm_tancot_huge 568 .data 569# -- End __libm_tancot_huge 570 .section .rodata, "a" 571 .align 16 572 .align 16 573.L_2il0floatpacket.0: 574 .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 575 .type .L_2il0floatpacket.0,@object 576 .size .L_2il0floatpacket.0,16 577 .align 16 578_Pi4Inv: 579 .long 1841940611 580 .long 1072979760 581 .type _Pi4Inv,@object 582 .size _Pi4Inv,8 583 .space 8, 0x00 # pad 584 .align 16 585_Pi4x3: 586 .long 1413754880 587 .long 3219726843 588 .long 993632256 589 .long 1027030475 590 .long 3773204808 591 .long 3129236486 592 .type _Pi4x3,@object 593 .size _Pi4x3,24 594 .space 8, 0x00 # pad 595 .align 16 596_Pi4x4: 597 .long 1413480448 598 .long 3219726843 599 .long 442499072 600 .long 3183522913 601 .long 771751936 602 .long 3146979722 603 .long 622873025 604 .long 3110831002 605 .type _Pi4x4,@object 606 .size _Pi4x4,32 607 .align 16 608_ones: 609 .long 0 610 .long 1072693248 611 .long 0 612 .long 3220176896 613 .type _ones,@object 614 .size _ones,16 615 .align 16 616_TP: 617 .word 19670 618 .word 44908 619 .word 50960 620 .word 50786 621 .word 49149 622 .word 0 623 .word 19206 624 .word 45228 625 .word 54194 626 .word 52268 627 .word 16377 628 .word 0 629 .word 227 630 .word 51280 631 .word 43560 632 .word 38195 633 .word 49139 634 .word 0 635 .word 12272 636 .word 18029 637 .word 6715 638 .word 45670 639 .word 16357 640 .word 0 641 .type _TP,@object 642 .size _TP,48 643 .align 16 644_TQ: 645 .word 14748 646 .word 33681 647 .word 5452 648 .word 38090 649 .word 49151 650 .word 0 651 .word 46755 652 .word 50026 653 .word 17634 654 .word 35372 655 .word 16382 656 .word 0 657 .word 46863 658 .word 53352 659 .word 42702 660 .word 59869 661 .word 49145 662 .word 0 663 .word 33295 664 .word 20942 665 .word 32118 666 .word 39935 667 .word 16371 668 .word 0 669 .type _TQ,@object 670 .size _TQ,48 671 .align 16 672_GP: 673 .word 43691 674 .word 43690 675 .word 43690 676 .word 43690 677 .word 49149 678 .word 0 679 .word 46639 680 .word 2912 681 .word 24758 682 .word 46603 683 .word 49145 684 .word 0 685 .word 57255 686 .word 2218 687 .word 21984 688 .word 35507 689 .word 49142 690 .word 0 691 .word 34208 692 .word 43033 693 .word 48281 694 .word 56811 695 .word 49138 696 .word 0 697 .word 28773 698 .word 27191 699 .word 31071 700 .word 45908 701 .word 49135 702 .word 0 703 .word 43257 704 .word 33777 705 .word 11976 706 .word 37184 707 .word 49132 708 .word 0 709 .word 62410 710 .word 35990 711 .word 36363 712 .word 60269 713 .word 49128 714 .word 0 715 .word 13659 716 .word 55568 717 .word 26569 718 .word 48851 719 .word 49125 720 .word 0 721 .word 10347 722 .word 46238 723 .word 47188 724 .word 39576 725 .word 49122 726 .word 0 727 .word 2161 728 .word 6703 729 .word 25719 730 .word 64708 731 .word 49118 732 .word 0 733 .word 42329 734 .word 7593 735 .word 44754 736 .word 47734 737 .word 49115 738 .word 0 739 .word 163 740 .word 32746 741 .word 39875 742 .word 61957 743 .word 49112 744 .word 0 745 .type _GP,@object 746 .size _GP,144 747 .data 748 .hidden __libm_reduce_pi04l 749 .section .note.GNU-stack, "" 750# End 751