ctanl.S 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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 "ctanl.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin ctanl
  41. .text
  42. .align 16,0x90
  43. .globl ctanl
  44. ctanl:
  45. # parameter 1: 12 + %ebp
  46. ..B1.1:
  47. ..L1:
  48. pushl %ebp
  49. movl %esp, %ebp
  50. andl $-16, %esp
  51. pushl %esi
  52. pushl %edi
  53. pushl %ebx
  54. subl $116, %esp
  55. call ..L2
  56. ..L2:
  57. popl %ebx
  58. lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx
  59. movl %gs:20, %edx
  60. movl 8(%ebp), %esi
  61. xorl %esp, %edx
  62. fldt .L_2il0floatpacket.8@GOTOFF(%ebx)
  63. movl %edx, 100(%esp)
  64. fstpt 4(%esp)
  65. fldt 4(%esp)
  66. fstpt 16(%esp)
  67. fldt 16(%esp)
  68. fstpt 28(%esp)
  69. fldt 28(%esp)
  70. fstpt 40(%esp)
  71. fldt 40(%esp)
  72. fstpt 52(%esp)
  73. fldt 52(%esp)
  74. fstpt 64(%esp)
  75. ..B1.2:
  76. fnstcw 2(%esp)
  77. ..B1.3:
  78. movzwl 2(%esp), %ecx
  79. movl %ecx, %edx
  80. andl $768, %edx
  81. cmpl $768, %edx
  82. je ..B1.20
  83. ..B1.4:
  84. orl $-64768, %ecx
  85. movw %cx, (%esp)
  86. ..B1.5:
  87. fldcw (%esp)
  88. ..B1.6:
  89. movl $1, %edi
  90. ..B1.7:
  91. fldt 24(%ebp)
  92. movzwl 32(%ebp), %edx
  93. andl $32767, %edx
  94. fstpt 52(%esp)
  95. cmpl $32767, %edx
  96. fldt 12(%ebp)
  97. fstpt 64(%esp)
  98. jl ..B1.10
  99. ..B1.8:
  100. cmpl $-2147483648, 28(%ebp)
  101. jne ..B1.11
  102. ..B1.9:
  103. cmpl $0, 24(%ebp)
  104. jne ..B1.11
  105. ..B1.10:
  106. movzbl 33(%ebp), %ecx
  107. notl %ecx
  108. movzbl 61(%esp), %edx
  109. andl $128, %ecx
  110. andl $127, %edx
  111. orl %ecx, %edx
  112. movb %dl, 61(%esp)
  113. ..B1.11:
  114. addl $-32, %esp
  115. lea 108(%esp), %ecx
  116. movl %ecx, (%esp)
  117. lea 4(%esp), %edx
  118. movl -24(%ecx), %ecx
  119. movl %ecx, (%edx)
  120. movl 88(%esp), %ecx
  121. movl %ecx, 4(%edx)
  122. movl 92(%esp), %ecx
  123. movl %ecx, 8(%edx)
  124. movl 96(%esp), %ecx
  125. movl %ecx, 12(%edx)
  126. movl 100(%esp), %ecx
  127. movl %ecx, 16(%edx)
  128. movl 104(%esp), %ecx
  129. movl %ecx, 20(%edx)
  130. call ctanhl@PLT
  131. ..B1.23:
  132. addl $28, %esp
  133. fldt 76(%esp)
  134. movzwl 84(%esp), %edx
  135. andl $32767, %edx
  136. fstpt 4(%esp)
  137. fldt 4(%esp)
  138. cmpl $32767, %edx
  139. fstpt 40(%esp)
  140. fldt 88(%esp)
  141. fstpt 16(%esp)
  142. fldt 16(%esp)
  143. fstpt 28(%esp)
  144. jl ..B1.14
  145. ..B1.12:
  146. cmpl $-2147483648, 8(%esp)
  147. jne ..B1.15
  148. ..B1.13:
  149. cmpl $0, 4(%esp)
  150. jne ..B1.15
  151. ..B1.14:
  152. movzbl 13(%esp), %ecx
  153. notl %ecx
  154. movzbl 49(%esp), %edx
  155. andl $128, %ecx
  156. andl $127, %edx
  157. orl %ecx, %edx
  158. movb %dl, 49(%esp)
  159. ..B1.15:
  160. testl %edi, %edi
  161. je ..B1.17
  162. ..B1.16:
  163. fldcw 2(%esp)
  164. ..B1.17:
  165. movl 28(%esp), %edx
  166. movl %edx, (%esi)
  167. movl 40(%esp), %edx
  168. movl %edx, 12(%esi)
  169. movl 44(%esp), %edx
  170. movl %edx, 16(%esi)
  171. movl 32(%esp), %ecx
  172. movl 36(%esp), %edi
  173. movl 48(%esp), %edx
  174. movl %ecx, 4(%esi)
  175. movl %edi, 8(%esi)
  176. movl %edx, 20(%esi)
  177. movl 100(%esp), %edx
  178. xorl %esp, %edx
  179. cmpl %gs:20, %edx
  180. jne ..B1.19
  181. ..B1.18:
  182. movl %esi, %eax
  183. addl $116, %esp
  184. popl %ebx
  185. popl %edi
  186. popl %esi
  187. movl %ebp, %esp
  188. popl %ebp
  189. ret $4
  190. ..B1.19:
  191. call __stack_chk_fail@PLT
  192. ..B1.20:
  193. xorl %edi, %edi
  194. jmp ..B1.7
  195. .align 16,0x90
  196. .type ctanl,@function
  197. .size ctanl,.-ctanl
  198. .data
  199. # -- End ctanl
  200. .section .rodata, "a"
  201. .align 16
  202. .align 16
  203. .L_2il0floatpacket.8:
  204. .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
  205. .type .L_2il0floatpacket.8,@object
  206. .size .L_2il0floatpacket.8,12
  207. .data
  208. .section .note.GNU-stack, ""
  209. # End