ccosl.S 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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 "ccosl.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin ccosl
  41. .text
  42. .align 16,0x90
  43. .globl ccosl
  44. ccosl:
  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 $84, %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.5@GOTOFF(%ebx)
  63. movl %edx, 76(%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. ..B1.2:
  72. fnstcw 2(%esp)
  73. ..B1.3:
  74. movzwl 2(%esp), %ecx
  75. movl %ecx, %edx
  76. andl $768, %edx
  77. cmpl $768, %edx
  78. je ..B1.16
  79. ..B1.4:
  80. orl $-64768, %ecx
  81. movw %cx, (%esp)
  82. ..B1.5:
  83. fldcw (%esp)
  84. ..B1.6:
  85. movl $1, %edi
  86. ..B1.7:
  87. fldt 12(%ebp)
  88. movzwl 32(%ebp), %edx
  89. andl $32767, %edx
  90. fstpt 40(%esp)
  91. cmpl $32767, %edx
  92. fldt 24(%ebp)
  93. fstpt 28(%esp)
  94. jl ..B1.10
  95. ..B1.8:
  96. cmpl $-2147483648, 28(%ebp)
  97. jne ..B1.11
  98. ..B1.9:
  99. cmpl $0, 24(%ebp)
  100. jne ..B1.11
  101. ..B1.10:
  102. movzbl 33(%ebp), %ecx
  103. notl %ecx
  104. movzbl 37(%esp), %edx
  105. andl $128, %ecx
  106. andl $127, %edx
  107. orl %ecx, %edx
  108. movb %dl, 37(%esp)
  109. ..B1.11:
  110. addl $-32, %esp
  111. lea 84(%esp), %ecx
  112. movl %ecx, (%esp)
  113. lea 4(%esp), %edx
  114. movl -24(%ecx), %ecx
  115. movl %ecx, (%edx)
  116. movl 64(%esp), %ecx
  117. movl %ecx, 4(%edx)
  118. movl 68(%esp), %ecx
  119. movl %ecx, 8(%edx)
  120. movl 72(%esp), %ecx
  121. movl %ecx, 12(%edx)
  122. movl 76(%esp), %ecx
  123. movl %ecx, 16(%edx)
  124. movl 80(%esp), %ecx
  125. movl %ecx, 20(%edx)
  126. call ccoshl@PLT
  127. ..B1.19:
  128. addl $28, %esp
  129. fldt 52(%esp)
  130. testl %edi, %edi
  131. fstpt 4(%esp)
  132. fldt 64(%esp)
  133. fstpt 16(%esp)
  134. je ..B1.13
  135. ..B1.12:
  136. fldcw 2(%esp)
  137. ..B1.13:
  138. movl 4(%esp), %edx
  139. movl %edx, (%esi)
  140. movl 16(%esp), %edx
  141. movl %edx, 12(%esi)
  142. movl 20(%esp), %edx
  143. movl %edx, 16(%esi)
  144. movl 8(%esp), %ecx
  145. movl 12(%esp), %edi
  146. movl 24(%esp), %edx
  147. movl %ecx, 4(%esi)
  148. movl %edi, 8(%esi)
  149. movl %edx, 20(%esi)
  150. movl 76(%esp), %edx
  151. xorl %esp, %edx
  152. cmpl %gs:20, %edx
  153. jne ..B1.15
  154. ..B1.14:
  155. movl %esi, %eax
  156. addl $84, %esp
  157. popl %ebx
  158. popl %edi
  159. popl %esi
  160. movl %ebp, %esp
  161. popl %ebp
  162. ret $4
  163. ..B1.15:
  164. call __stack_chk_fail@PLT
  165. ..B1.16:
  166. xorl %edi, %edi
  167. jmp ..B1.7
  168. .align 16,0x90
  169. .type ccosl,@function
  170. .size ccosl,.-ccosl
  171. .data
  172. # -- End ccosl
  173. .section .rodata, "a"
  174. .align 16
  175. .align 16
  176. .L_2il0floatpacket.5:
  177. .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
  178. .type .L_2il0floatpacket.5,@object
  179. .size .L_2il0floatpacket.5,12
  180. .data
  181. .section .note.GNU-stack, ""
  182. # End