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_sincos_huge 32 .text 33 .align 16,0x90 34 .hidden __libm_sincos_huge 35 .globl __libm_sincos_huge 36__libm_sincos_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), %edx 50 movl %eax, 32(%esp) 51 movl %edx, 36(%esp) 52..B1.2: 53 fnstcw 30(%esp) 54..B1.3: 55 call ..L2 56..L2: 57 popl %edi 58 lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edi), %edi 59 movsd 8(%ebp), %xmm1 60 movl 12(%ebp), %esi 61 movl %esi, %eax 62 andl $2147483647, %eax 63 andps .L_2il0floatpacket.0@GOTOFF(%edi), %xmm1 64 shrl $31, %esi 65 movl %eax, 40(%esp) 66 cmpl $1104150528, %eax 67 movsd %xmm1, 8(%ebp) 68 jae ..B1.11 69..B1.4: 70 movsd _Pi4Inv@GOTOFF(%edi), %xmm0 71 mulsd %xmm1, %xmm0 72 movzwl 30(%esp), %edx 73 movl %edx, %eax 74 andl $768, %eax 75 movsd %xmm0, (%esp) 76 cmpl $768, %eax 77 je ..B1.42 78..B1.5: 79 orl $-64768, %edx 80 movw %dx, 28(%esp) 81..B1.6: 82 fldcw 28(%esp) 83..B1.7: 84 movsd 8(%ebp), %xmm1 85 movl $1, %ebx 86..B1.8: 87 movl %ebx, 12(%esp) 88 movl 4(%esp), %ebx 89 movl %ebx, %eax 90 movl %esi, 8(%esp) 91 movl %ebx, %esi 92 shrl $20, %esi 93 andl $1048575, %eax 94 movl %esi, %ecx 95 orl $1048576, %eax 96 negl %ecx 97 movl %eax, %edx 98 addl $19, %ecx 99 addl $13, %esi 100 movl %ecx, 24(%esp) 101 shrl %cl, %edx 102 movl %esi, %ecx 103 shll %cl, %eax 104 movl 24(%esp), %ecx 105 movl (%esp), %esi 106 shrl %cl, %esi 107 orl %esi, %eax 108 cmpl $1094713344, %ebx 109 movsd %xmm1, 16(%esp) 110 fldl 16(%esp) 111 cmovb %edx, %eax 112 movl 8(%esp), %esi 113 lea 1(%eax), %edx 114 movl %edx, %ebx 115 andl $-2, %ebx 116 movl %ebx, 16(%esp) 117 fildl 16(%esp) 118 movl 12(%esp), %ebx 119 cmpl $1094713344, 40(%esp) 120 jae ..B1.10 121..B1.9: 122 fldl _Pi4x3@GOTOFF(%edi) 123 fmul %st(1), %st 124 faddp %st, %st(2) 125 fldl 8+_Pi4x3@GOTOFF(%edi) 126 fmul %st(1), %st 127 faddp %st, %st(2) 128 fldl 16+_Pi4x3@GOTOFF(%edi) 129 fmulp %st, %st(1) 130 faddp %st, %st(1) 131 jmp ..B1.17 132..B1.10: 133 fldl _Pi4x4@GOTOFF(%edi) 134 fmul %st(1), %st 135 faddp %st, %st(2) 136 fldl 8+_Pi4x4@GOTOFF(%edi) 137 fmul %st(1), %st 138 faddp %st, %st(2) 139 fldl 16+_Pi4x4@GOTOFF(%edi) 140 fmul %st(1), %st 141 faddp %st, %st(2) 142 fldl 24+_Pi4x4@GOTOFF(%edi) 143 fmulp %st, %st(1) 144 faddp %st, %st(1) 145 jmp ..B1.17 146..B1.11: 147 movzwl 30(%esp), %edx 148 movl %edx, %eax 149 andl $768, %eax 150 cmpl $768, %eax 151 je ..B1.43 152..B1.12: 153 orl $-64768, %edx 154 movw %dx, 28(%esp) 155..B1.13: 156 fldcw 28(%esp) 157..B1.14: 158 movsd 8(%ebp), %xmm1 159 movl $1, %ebx 160..B1.15: 161 movsd %xmm1, 16(%esp) 162 fldl 16(%esp) 163 addl $-32, %esp 164 lea 32(%esp), %eax 165 fstpt (%esp) 166 movl $0, 12(%esp) 167 movl %eax, 16(%esp) 168 call __libm_reduce_pi04l 169..B1.46: 170 addl $32, %esp 171..B1.16: 172 fldl (%esp) 173 lea 1(%eax), %edx 174 fldl 8(%esp) 175 faddp %st, %st(1) 176..B1.17: 177 movl %edx, %ecx 178 addl $3, %eax 179 shrl $2, %ecx 180 andl $1, %ecx 181 shrl $2, %eax 182 xorl %ecx, %esi 183 movl 36(%esp), %ecx 184 andl $1, %eax 185 andl $3, %ecx 186 cmpl $3, %ecx 187 jne ..B1.25 188..B1.18: 189 fldt 84+_SP@GOTOFF(%edi) 190 fld %st(1) 191 fmul %st(2), %st 192 testb $2, %dl 193 fmul %st, %st(1) 194 fldt 72+_SP@GOTOFF(%edi) 195 faddp %st, %st(2) 196 fmul %st, %st(1) 197 fldt 60+_SP@GOTOFF(%edi) 198 faddp %st, %st(2) 199 fmul %st, %st(1) 200 fldt 48+_SP@GOTOFF(%edi) 201 faddp %st, %st(2) 202 fmul %st, %st(1) 203 fldt 36+_SP@GOTOFF(%edi) 204 faddp %st, %st(2) 205 fmul %st, %st(1) 206 fldt 24+_SP@GOTOFF(%edi) 207 faddp %st, %st(2) 208 fmul %st, %st(1) 209 fldt 12+_SP@GOTOFF(%edi) 210 faddp %st, %st(2) 211 fmul %st, %st(1) 212 fldt _SP@GOTOFF(%edi) 213 faddp %st, %st(2) 214 fmul %st, %st(1) 215 fldt 84+_CP@GOTOFF(%edi) 216 fmul %st(1), %st 217 fldt 72+_CP@GOTOFF(%edi) 218 faddp %st, %st(1) 219 fmul %st(1), %st 220 fldt 60+_CP@GOTOFF(%edi) 221 faddp %st, %st(1) 222 fmul %st(1), %st 223 fldt 48+_CP@GOTOFF(%edi) 224 faddp %st, %st(1) 225 fmul %st(1), %st 226 fldt 36+_CP@GOTOFF(%edi) 227 faddp %st, %st(1) 228 fmul %st(1), %st 229 fldt 24+_CP@GOTOFF(%edi) 230 faddp %st, %st(1) 231 fmul %st(1), %st 232 fldt 12+_CP@GOTOFF(%edi) 233 faddp %st, %st(1) 234 fmul %st(1), %st 235 fldt _CP@GOTOFF(%edi) 236 faddp %st, %st(1) 237 fmulp %st, %st(1) 238 fldl _ones@GOTOFF(%edi,%esi,8) 239 fldl _ones@GOTOFF(%edi,%eax,8) 240 je ..B1.22 241..B1.19: 242 fmulp %st, %st(4) 243 testl %ebx, %ebx 244 fxch %st(2) 245 fmul %st(3), %st 246 movl 32(%esp), %eax 247 faddp %st, %st(3) 248 fxch %st(2) 249 fstpl (%eax) 250 fmul %st, %st(1) 251 faddp %st, %st(1) 252 fstpl 8(%eax) 253 je ..B1.21 254..B1.20: 255 fldcw 30(%esp) 256..B1.21: 257 addl $52, %esp 258 popl %ebx 259 popl %edi 260 popl %esi 261 movl %ebp, %esp 262 popl %ebp 263 ret 264..B1.22: 265 fxch %st(1) 266 fmulp %st, %st(4) 267 testl %ebx, %ebx 268 fxch %st(2) 269 fmul %st(3), %st 270 movl 32(%esp), %eax 271 faddp %st, %st(3) 272 fxch %st(2) 273 fstpl 8(%eax) 274 fmul %st, %st(1) 275 faddp %st, %st(1) 276 fstpl (%eax) 277 je ..B1.24 278..B1.23: 279 fldcw 30(%esp) 280..B1.24: 281 addl $52, %esp 282 popl %ebx 283 popl %edi 284 popl %esi 285 movl %ebp, %esp 286 popl %ebp 287 ret 288..B1.25: 289 testb $2, 36(%esp) 290 je ..B1.33 291..B1.26: 292 fld %st(0) 293 testb $2, %dl 294 fmul %st(1), %st 295 fld %st(0) 296 fmul %st(1), %st 297 je ..B1.30 298..B1.27: 299 fstp %st(2) 300 fldt 84+_CP@GOTOFF(%edi) 301 testl %ebx, %ebx 302 fmul %st(2), %st 303 fldt 72+_CP@GOTOFF(%edi) 304 fmul %st(3), %st 305 fldt 60+_CP@GOTOFF(%edi) 306 movl 32(%esp), %eax 307 faddp %st, %st(2) 308 fxch %st(1) 309 fmul %st(3), %st 310 fldt 48+_CP@GOTOFF(%edi) 311 faddp %st, %st(2) 312 fxch %st(1) 313 fmul %st(3), %st 314 fldt 36+_CP@GOTOFF(%edi) 315 faddp %st, %st(2) 316 fxch %st(1) 317 fmul %st(3), %st 318 fldt 24+_CP@GOTOFF(%edi) 319 faddp %st, %st(2) 320 fxch %st(1) 321 fmul %st(3), %st 322 fldt 12+_CP@GOTOFF(%edi) 323 faddp %st, %st(2) 324 fxch %st(1) 325 fmulp %st, %st(3) 326 fldt _CP@GOTOFF(%edi) 327 faddp %st, %st(1) 328 fmulp %st, %st(1) 329 faddp %st, %st(1) 330 fldl _ones@GOTOFF(%edi,%esi,8) 331 fmul %st, %st(1) 332 faddp %st, %st(1) 333 fstpl 8(%eax) 334 je ..B1.29 335..B1.28: 336 fldcw 30(%esp) 337..B1.29: 338 addl $52, %esp 339 popl %ebx 340 popl %edi 341 popl %esi 342 movl %ebp, %esp 343 popl %ebp 344 ret 345..B1.30: 346 fldt 84+_SP@GOTOFF(%edi) 347 testl %ebx, %ebx 348 fmul %st(1), %st 349 fldt 72+_SP@GOTOFF(%edi) 350 fmul %st(2), %st 351 fldt 60+_SP@GOTOFF(%edi) 352 movl 32(%esp), %eax 353 faddp %st, %st(2) 354 fxch %st(1) 355 fmul %st(2), %st 356 fldt 48+_SP@GOTOFF(%edi) 357 faddp %st, %st(2) 358 fxch %st(1) 359 fmul %st(2), %st 360 fldt 36+_SP@GOTOFF(%edi) 361 faddp %st, %st(2) 362 fxch %st(1) 363 fmul %st(2), %st 364 fldt 24+_SP@GOTOFF(%edi) 365 faddp %st, %st(2) 366 fxch %st(1) 367 fmul %st(2), %st 368 fldt 12+_SP@GOTOFF(%edi) 369 faddp %st, %st(2) 370 fxch %st(1) 371 fmulp %st, %st(2) 372 fldt _SP@GOTOFF(%edi) 373 faddp %st, %st(1) 374 fmulp %st, %st(2) 375 faddp %st, %st(1) 376 fldl _ones@GOTOFF(%edi,%esi,8) 377 fmulp %st, %st(2) 378 fmul %st(1), %st 379 faddp %st, %st(1) 380 fstpl 8(%eax) 381 je ..B1.32 382..B1.31: 383 fldcw 30(%esp) 384..B1.32: 385 addl $52, %esp 386 popl %ebx 387 popl %edi 388 popl %esi 389 movl %ebp, %esp 390 popl %ebp 391 ret 392..B1.33: 393 testb $1, 36(%esp) 394 je ..B1.41 395..B1.34: 396 fld %st(0) 397 testb $2, %dl 398 fmul %st(1), %st 399 fld %st(0) 400 fmul %st(1), %st 401 je ..B1.38 402..B1.35: 403 fldt 84+_SP@GOTOFF(%edi) 404 testl %ebx, %ebx 405 fmul %st(1), %st 406 fldt 72+_SP@GOTOFF(%edi) 407 fmul %st(2), %st 408 fldt 60+_SP@GOTOFF(%edi) 409 faddp %st, %st(2) 410 fxch %st(1) 411 fmul %st(2), %st 412 fldt 48+_SP@GOTOFF(%edi) 413 faddp %st, %st(2) 414 fxch %st(1) 415 fmul %st(2), %st 416 fldt 36+_SP@GOTOFF(%edi) 417 faddp %st, %st(2) 418 fxch %st(1) 419 fmul %st(2), %st 420 fldt 24+_SP@GOTOFF(%edi) 421 faddp %st, %st(2) 422 fxch %st(1) 423 fmul %st(2), %st 424 fldt 12+_SP@GOTOFF(%edi) 425 faddp %st, %st(2) 426 fxch %st(1) 427 fmulp %st, %st(2) 428 fldt _SP@GOTOFF(%edi) 429 faddp %st, %st(1) 430 fmulp %st, %st(2) 431 faddp %st, %st(1) 432 fldl _ones@GOTOFF(%edi,%eax,8) 433 fmulp %st, %st(2) 434 fmul %st(1), %st 435 movl 32(%esp), %eax 436 faddp %st, %st(1) 437 fstpl (%eax) 438 je ..B1.37 439..B1.36: 440 fldcw 30(%esp) 441..B1.37: 442 addl $52, %esp 443 popl %ebx 444 popl %edi 445 popl %esi 446 movl %ebp, %esp 447 popl %ebp 448 ret 449..B1.38: 450 fstp %st(2) 451 fldt 84+_CP@GOTOFF(%edi) 452 testl %ebx, %ebx 453 fmul %st(2), %st 454 fldt 72+_CP@GOTOFF(%edi) 455 fmul %st(3), %st 456 fldt 60+_CP@GOTOFF(%edi) 457 faddp %st, %st(2) 458 fxch %st(1) 459 fmul %st(3), %st 460 fldt 48+_CP@GOTOFF(%edi) 461 faddp %st, %st(2) 462 fxch %st(1) 463 fmul %st(3), %st 464 fldt 36+_CP@GOTOFF(%edi) 465 faddp %st, %st(2) 466 fxch %st(1) 467 fmul %st(3), %st 468 fldt 24+_CP@GOTOFF(%edi) 469 faddp %st, %st(2) 470 fxch %st(1) 471 fmul %st(3), %st 472 fldt 12+_CP@GOTOFF(%edi) 473 faddp %st, %st(2) 474 fxch %st(1) 475 fmulp %st, %st(3) 476 fldt _CP@GOTOFF(%edi) 477 faddp %st, %st(1) 478 fmulp %st, %st(1) 479 faddp %st, %st(1) 480 fldl _ones@GOTOFF(%edi,%eax,8) 481 fmul %st, %st(1) 482 movl 32(%esp), %eax 483 faddp %st, %st(1) 484 fstpl (%eax) 485 je ..B1.40 486..B1.39: 487 fldcw 30(%esp) 488..B1.40: 489 addl $52, %esp 490 popl %ebx 491 popl %edi 492 popl %esi 493 movl %ebp, %esp 494 popl %ebp 495 ret 496..B1.41: 497 fstp %st(0) 498 addl $52, %esp 499 popl %ebx 500 popl %edi 501 popl %esi 502 movl %ebp, %esp 503 popl %ebp 504 ret 505..B1.42: 506 xorl %ebx, %ebx 507 jmp ..B1.8 508..B1.43: 509 xorl %ebx, %ebx 510 jmp ..B1.15 511 .align 16,0x90 512 .type __libm_sincos_huge,@function 513 .size __libm_sincos_huge,.-__libm_sincos_huge 514 .data 515# -- End __libm_sincos_huge 516 .section .rodata, "a" 517 .align 16 518 .align 16 519.L_2il0floatpacket.0: 520 .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 521 .type .L_2il0floatpacket.0,@object 522 .size .L_2il0floatpacket.0,16 523 .align 16 524_Pi4Inv: 525 .long 1841940611 526 .long 1072979760 527 .type _Pi4Inv,@object 528 .size _Pi4Inv,8 529 .space 8, 0x00 # pad 530 .align 16 531_Pi4x3: 532 .long 1413754880 533 .long 3219726843 534 .long 993632256 535 .long 1027030475 536 .long 3773204808 537 .long 3129236486 538 .type _Pi4x3,@object 539 .size _Pi4x3,24 540 .space 8, 0x00 # pad 541 .align 16 542_Pi4x4: 543 .long 1413480448 544 .long 3219726843 545 .long 442499072 546 .long 3183522913 547 .long 771751936 548 .long 3146979722 549 .long 622873025 550 .long 3110831002 551 .type _Pi4x4,@object 552 .size _Pi4x4,32 553 .align 16 554_SP: 555 .word 43691 556 .word 43690 557 .word 43690 558 .word 43690 559 .word 49148 560 .word 0 561 .word 34951 562 .word 34952 563 .word 34952 564 .word 34952 565 .word 16376 566 .word 0 567 .word 50471 568 .word 3328 569 .word 208 570 .word 53261 571 .word 49138 572 .word 0 573 .word 17910 574 .word 46614 575 .word 7466 576 .word 47343 577 .word 16364 578 .word 0 579 .word 33371 580 .word 14743 581 .word 11071 582 .word 55090 583 .word 49125 584 .word 0 585 .word 48947 586 .word 35764 587 .word 12250 588 .word 45202 589 .word 16350 590 .word 0 591 .word 17574 592 .word 60698 593 .word 10735 594 .word 55102 595 .word 49110 596 .word 0 597 .word 34320 598 .word 12415 599 .word 25249 600 .word 51489 601 .word 16334 602 .word 0 603 .type _SP,@object 604 .size _SP,96 605 .align 16 606_CP: 607 .word 0 608 .word 0 609 .word 0 610 .word 32768 611 .word 49150 612 .word 0 613 .word 43685 614 .word 43690 615 .word 43690 616 .word 43690 617 .word 16378 618 .word 0 619 .word 39983 620 .word 2912 621 .word 24758 622 .word 46603 623 .word 49141 624 .word 0 625 .word 61476 626 .word 3244 627 .word 208 628 .word 53261 629 .word 16367 630 .word 0 631 .word 1022 632 .word 16229 633 .word 32187 634 .word 37874 635 .word 49129 636 .word 0 637 .word 55373 638 .word 44526 639 .word 50840 640 .word 36726 641 .word 16354 642 .word 0 643 .word 55994 644 .word 65145 645 .word 59958 646 .word 51657 647 .word 49114 648 .word 0 649 .word 15046 650 .word 2976 651 .word 1998 652 .word 54661 653 .word 16338 654 .word 0 655 .type _CP,@object 656 .size _CP,96 657 .align 16 658_ones: 659 .long 0 660 .long 1072693248 661 .long 0 662 .long 3220176896 663 .type _ones,@object 664 .size _ones,16 665 .data 666 .hidden __libm_reduce_pi04l 667 .section .note.GNU-stack, "" 668# End 669