cprojl.S 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /*
  2. * Math library
  3. *
  4. * Copyright (C) 2016 Intel Corporation. All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. *
  10. * * Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * * Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in
  14. * the documentation and/or other materials provided with the
  15. * distribution.
  16. * * Neither the name of Intel Corporation nor the names of its
  17. * contributors may be used to endorse or promote products derived
  18. * from this software without specific prior written permission.
  19. *
  20. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  21. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  22. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  23. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  24. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  25. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  26. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  27. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  28. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  29. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  30. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. *
  32. *
  33. * Author Name <jingwei.zhang@intel.com>
  34. * History:
  35. * 03-14-2016 Initial version. numerics svn rev. 12864
  36. */
  37. .file "cprojl.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin cprojl
  41. .text
  42. .align 16,0x90
  43. .globl cprojl
  44. cprojl:
  45. # parameter 1: 48 + %rsp
  46. ..B1.1:
  47. .cfi_startproc
  48. ..___tag_value_cprojl.1:
  49. ..L2:
  50. subq $40, %rsp
  51. .cfi_def_cfa_offset 48
  52. movzwl 56(%rsp), %edx
  53. andl $32767, %edx
  54. movq %fs:40, %rax
  55. xorq %rsp, %rax
  56. movq %rax, 32(%rsp)
  57. cmpl $32767, %edx
  58. je ..B1.12
  59. ..B1.2:
  60. movzwl 72(%rsp), %eax
  61. andl $32767, %eax
  62. cmpl $32767, %eax
  63. je ..B1.9
  64. ..B1.3:
  65. fldt 48(%rsp)
  66. fstpt (%rsp)
  67. fldt 64(%rsp)
  68. fstpt 16(%rsp)
  69. ..B1.4:
  70. movq 32(%rsp), %rax
  71. xorq %rsp, %rax
  72. cmpq %fs:40, %rax
  73. jne ..B1.8
  74. ..B1.5:
  75. fldt (%rsp)
  76. fldt 16(%rsp)
  77. movq 32(%rsp), %rax
  78. xorq %rsp, %rax
  79. cmpq %fs:40, %rax
  80. jne ..B1.7
  81. ..B1.6:
  82. addq $40, %rsp
  83. .cfi_def_cfa_offset 8
  84. fxch %st(1)
  85. ret
  86. .cfi_def_cfa_offset 48
  87. ..B1.7:
  88. fstp %st(1)
  89. fstp %st(0)
  90. call __stack_chk_fail@PLT
  91. ..B1.8:
  92. call __stack_chk_fail@PLT
  93. ..B1.9:
  94. movq $0x8000000000000000, %rax
  95. cmpq 64(%rsp), %rax
  96. jne ..B1.3
  97. ..B1.10:
  98. fldt .L_2il0floatpacket.7(%rip)
  99. fstpt 16(%rsp)
  100. fldt .L_2il0floatpacket.7(%rip)
  101. fstpt (%rsp)
  102. ..B1.11:
  103. fldt .L_2il0floatpacket.8(%rip)
  104. movb 9+.L_2il0floatpacket.7(%rip), %cl
  105. movb 73(%rsp), %dl
  106. andb $127, %cl
  107. andb $-128, %dl
  108. movzwl 8+.L_2il0floatpacket.8(%rip), %eax
  109. orb %dl, %cl
  110. fstpt (%rsp)
  111. orl $-32769, %eax
  112. fldt .L_2il0floatpacket.7(%rip)
  113. fstpt 16(%rsp)
  114. movw %ax, 8(%rsp)
  115. movb %cl, 25(%rsp)
  116. jmp ..B1.4
  117. ..B1.12:
  118. movq $0x8000000000000000, %rax
  119. cmpq 48(%rsp), %rax
  120. jne ..B1.2
  121. ..B1.13:
  122. fldt .L_2il0floatpacket.7(%rip)
  123. fstpt 16(%rsp)
  124. fldt .L_2il0floatpacket.7(%rip)
  125. fstpt (%rsp)
  126. jmp ..B1.11
  127. .align 16,0x90
  128. .cfi_endproc
  129. .type cprojl,@function
  130. .size cprojl,.-cprojl
  131. .data
  132. # -- End cprojl
  133. .section .rodata, "a"
  134. .align 16
  135. .align 16
  136. .L_2il0floatpacket.7:
  137. .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
  138. .type .L_2il0floatpacket.7,@object
  139. .size .L_2il0floatpacket.7,16
  140. .align 16
  141. .L_2il0floatpacket.8:
  142. .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00
  143. .type .L_2il0floatpacket.8,@object
  144. .size .L_2il0floatpacket.8,16
  145. .data
  146. .section .note.GNU-stack, ""
  147. // -- Begin DWARF2 SEGMENT .eh_frame
  148. .section .eh_frame,"a",@progbits
  149. .eh_frame_seg:
  150. .align 1
  151. # End