casinl.S 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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 "casinl.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin casinl
  41. .text
  42. .align 16,0x90
  43. .globl casinl
  44. casinl:
  45. # parameter 1: 144 + %rsp
  46. ..B1.1:
  47. .cfi_startproc
  48. ..___tag_value_casinl.1:
  49. ..L2:
  50. pushq %r13
  51. .cfi_def_cfa_offset 16
  52. .cfi_offset 13, -16
  53. subq $128, %rsp
  54. .cfi_def_cfa_offset 144
  55. xorb %r13b, %r13b
  56. fldt .L_2il0floatpacket.8(%rip)
  57. movq %fs:40, %rax
  58. xorq %rsp, %rax
  59. movq %rax, 112(%rsp)
  60. fstpt 16(%rsp)
  61. fldt 16(%rsp)
  62. fstpt 32(%rsp)
  63. fldt 32(%rsp)
  64. fstpt 48(%rsp)
  65. fldt 48(%rsp)
  66. fstpt 64(%rsp)
  67. fldt 64(%rsp)
  68. fstpt 80(%rsp)
  69. fldt 80(%rsp)
  70. fstpt 96(%rsp)
  71. ..B1.2:
  72. fnstcw 2(%rsp)
  73. ..B1.3:
  74. movzwl 2(%rsp), %edx
  75. movl %edx, %eax
  76. andl $768, %eax
  77. cmpl $768, %eax
  78. je ..B1.7
  79. ..B1.4:
  80. orl $-64768, %edx
  81. movw %dx, (%rsp)
  82. ..B1.5:
  83. fldcw (%rsp)
  84. ..B1.6:
  85. movb $1, %r13b
  86. ..B1.7:
  87. fldt 160(%rsp)
  88. movzwl 168(%rsp), %eax
  89. andl $32767, %eax
  90. fstpt 80(%rsp)
  91. cmpl $32767, %eax
  92. fldt 144(%rsp)
  93. fstpt 96(%rsp)
  94. jl ..B1.9
  95. ..B1.8:
  96. movq $0x8000000000000000, %rax
  97. cmpq 160(%rsp), %rax
  98. jne ..B1.10
  99. ..B1.9:
  100. movb 169(%rsp), %al
  101. notb %al
  102. movb 89(%rsp), %dl
  103. andb $-128, %al
  104. andb $127, %dl
  105. orb %al, %dl
  106. movb %dl, 89(%rsp)
  107. ..B1.10:
  108. addq $-32, %rsp
  109. .cfi_def_cfa_offset 176
  110. movq %rsp, %rdi
  111. movq 112(%rsp), %rax
  112. movq 120(%rsp), %rdx
  113. movq 128(%rsp), %rcx
  114. movq 136(%rsp), %rsi
  115. movq %rax, (%rdi)
  116. movq %rdx, 8(%rdi)
  117. movq %rcx, 16(%rdi)
  118. movq %rsi, 24(%rdi)
  119. call casinhl@PLT
  120. ..B1.22:
  121. fxch %st(1)
  122. addq $32, %rsp
  123. .cfi_def_cfa_offset 144
  124. fxch %st(1)
  125. fstpt 16(%rsp)
  126. fldt 16(%rsp)
  127. movzwl 24(%rsp), %eax
  128. andl $32767, %eax
  129. fxch %st(1)
  130. fstpt 32(%rsp)
  131. fldt 32(%rsp)
  132. cmpl $32767, %eax
  133. fstpt 48(%rsp)
  134. fstpt 64(%rsp)
  135. jl ..B1.12
  136. ..B1.11:
  137. movq $0x8000000000000000, %rax
  138. cmpq 16(%rsp), %rax
  139. jne ..B1.13
  140. ..B1.12:
  141. movb 25(%rsp), %al
  142. notb %al
  143. movb 73(%rsp), %dl
  144. andb $-128, %al
  145. andb $127, %dl
  146. orb %al, %dl
  147. movb %dl, 73(%rsp)
  148. ..B1.13:
  149. testb %r13b, %r13b
  150. je ..B1.15
  151. ..B1.14:
  152. fldcw 2(%rsp)
  153. ..B1.15:
  154. movq 112(%rsp), %rax
  155. xorq %rsp, %rax
  156. cmpq %fs:40, %rax
  157. jne ..B1.19
  158. ..B1.16:
  159. fldt 48(%rsp)
  160. fldt 64(%rsp)
  161. movq 112(%rsp), %rax
  162. xorq %rsp, %rax
  163. cmpq %fs:40, %rax
  164. jne ..B1.18
  165. ..B1.17:
  166. addq $128, %rsp
  167. .cfi_def_cfa_offset 16
  168. .cfi_restore 13
  169. popq %r13
  170. .cfi_def_cfa_offset 8
  171. fxch %st(1)
  172. ret
  173. .cfi_def_cfa_offset 144
  174. .cfi_offset 13, -16
  175. ..B1.18:
  176. fstp %st(1)
  177. fstp %st(0)
  178. call __stack_chk_fail@PLT
  179. ..B1.19:
  180. call __stack_chk_fail@PLT
  181. .align 16,0x90
  182. .cfi_endproc
  183. .type casinl,@function
  184. .size casinl,.-casinl
  185. .data
  186. # -- End casinl
  187. .section .rodata, "a"
  188. .align 16
  189. .align 16
  190. .L_2il0floatpacket.8:
  191. .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
  192. .type .L_2il0floatpacket.8,@object
  193. .size .L_2il0floatpacket.8,16
  194. .data
  195. .section .note.GNU-stack, ""
  196. // -- Begin DWARF2 SEGMENT .eh_frame
  197. .section .eh_frame,"a",@progbits
  198. .eh_frame_seg:
  199. .align 1
  200. # End