ccos.S 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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 "ccos.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin ccos
  41. .text
  42. .align 16,0x90
  43. .globl ccos
  44. ccos:
  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 $36, %esp
  55. fldl 12(%ebp)
  56. fldl 20(%ebp)
  57. movzwl 26(%ebp), %ecx
  58. andl $32752, %ecx
  59. movl %gs:20, %edx
  60. movl 8(%ebp), %edi
  61. xorl %esp, %edx
  62. movl %edx, 32(%esp)
  63. cmpl $32752, %ecx
  64. fstpl 16(%esp)
  65. fstpl 24(%esp)
  66. jl ..B1.4
  67. ..B1.2:
  68. testl $1048575, 24(%ebp)
  69. jne ..B1.5
  70. ..B1.3:
  71. cmpl $0, 20(%ebp)
  72. jne ..B1.5
  73. ..B1.4:
  74. movzbl 27(%ebp), %esi
  75. notl %esi
  76. movzbl 23(%esp), %edx
  77. andl $128, %esi
  78. andl $127, %edx
  79. orl %esi, %edx
  80. movb %dl, 23(%esp)
  81. ..B1.5:
  82. addl $-32, %esp
  83. movl 48(%esp), %ecx
  84. lea 32(%esp), %esi
  85. call ..L2
  86. ..L2:
  87. popl %ebx
  88. lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx
  89. movl %esi, (%esp)
  90. lea 4(%esp), %edx
  91. movl %ecx, (%edx)
  92. movl 20(%esi), %ecx
  93. movl %ecx, 4(%edx)
  94. movl 24(%esi), %ecx
  95. movl %ecx, 8(%edx)
  96. movl 28(%esi), %ecx
  97. movl %ecx, 12(%edx)
  98. call ccosh@PLT
  99. ..B1.10:
  100. movl (%esi), %edx
  101. addl $28, %esp
  102. movl %edx, (%edi)
  103. movl 4(%esi), %ecx
  104. movl 8(%esi), %edx
  105. movl 12(%esi), %esi
  106. movl %ecx, 4(%edi)
  107. movl %edx, 8(%edi)
  108. movl %esi, 12(%edi)
  109. movl 32(%esp), %edx
  110. xorl %esp, %edx
  111. cmpl %gs:20, %edx
  112. jne ..B1.7
  113. ..B1.6:
  114. movl %edi, %eax
  115. addl $36, %esp
  116. popl %ebx
  117. popl %edi
  118. popl %esi
  119. movl %ebp, %esp
  120. popl %ebp
  121. ret $4
  122. ..B1.7:
  123. call __stack_chk_fail@PLT
  124. .align 16,0x90
  125. .type ccos,@function
  126. .size ccos,.-ccos
  127. .data
  128. # -- End ccos
  129. .text
  130. # -- Begin ccosf
  131. .text
  132. .align 16,0x90
  133. .globl ccosf
  134. ccosf:
  135. # parameter 1: 32 + %esp
  136. ..B2.1:
  137. ..L3:
  138. pushl %ebx
  139. subl $24, %esp
  140. movzwl 38(%esp), %ecx
  141. andl $32640, %ecx
  142. movl 32(%esp), %eax
  143. cmpl $32640, %ecx
  144. movl 36(%esp), %edx
  145. movl %eax, 20(%esp)
  146. movl %edx, 16(%esp)
  147. jl ..B2.3
  148. ..B2.2:
  149. testl $8388607, 36(%esp)
  150. jne ..B2.4
  151. ..B2.3:
  152. movzbl 39(%esp), %eax
  153. notl %eax
  154. movzbl 19(%esp), %edx
  155. andl $128, %eax
  156. andl $127, %edx
  157. orl %eax, %edx
  158. movb %dl, 19(%esp)
  159. ..B2.4:
  160. addl $8, %esp
  161. call ..L4
  162. ..L4:
  163. popl %ebx
  164. lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx
  165. pushl 12(%esp)
  166. pushl 12(%esp)
  167. call ccoshf@PLT
  168. ..B2.7:
  169. addl $24, %esp
  170. popl %ebx
  171. ret
  172. .align 16,0x90
  173. .type ccosf,@function
  174. .size ccosf,.-ccosf
  175. .data
  176. # -- End ccosf
  177. .data
  178. .section .note.GNU-stack, ""
  179. # End