cexpf_gen.S 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  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 "cexpf_gen.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin __libm_internal_cexpf
  41. .text
  42. .align 16,0x90
  43. .hidden __libm_internal_cexpf
  44. .globl __libm_internal_cexpf
  45. __libm_internal_cexpf:
  46. # parameter 1: 64 + %esp
  47. ..B1.1:
  48. ..L1:
  49. pushl %ebx
  50. subl $56, %esp
  51. xorl %ecx, %ecx
  52. flds 64(%esp)
  53. flds 68(%esp)
  54. movl %gs:20, %edx
  55. xorl %esp, %edx
  56. movl %edx, 44(%esp)
  57. call ..L2
  58. ..L2:
  59. popl %ebx
  60. lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx
  61. fstpl 36(%esp)
  62. movl %ecx, 4(%esp)
  63. movl %ecx, 8(%esp)
  64. fstpl 28(%esp)
  65. addl $-32, %esp
  66. movl 60(%esp), %edx
  67. lea 44(%esp), %eax
  68. movl 20(%eax), %ecx
  69. movl %eax, (%esp)
  70. lea 4(%esp), %eax
  71. movl %edx, (%eax)
  72. movl %ecx, 4(%eax)
  73. movl 68(%esp), %edx
  74. movl 72(%esp), %ecx
  75. movl %edx, 8(%eax)
  76. movl %ecx, 12(%eax)
  77. call cexp@PLT
  78. ..B1.11:
  79. addl $28, %esp
  80. fldl 12(%esp)
  81. fsts 4(%esp)
  82. fldl 20(%esp)
  83. movzwl 6(%esp), %eax
  84. testl $32640, %eax
  85. fsts 8(%esp)
  86. jne ..B1.3
  87. ..B1.2:
  88. testl $8388607, 4(%esp)
  89. jne ..B1.5
  90. ..B1.3:
  91. movzwl 10(%esp), %eax
  92. testl $32640, %eax
  93. jne ..B1.6
  94. ..B1.4:
  95. testl $8388607, 8(%esp)
  96. je ..B1.6
  97. ..B1.5:
  98. fstp %st(0)
  99. fstp %st(0)
  100. flds .L_2il0floatpacket.4@GOTOFF(%ebx)
  101. fmul %st(0), %st
  102. fstps (%esp)
  103. flds 4(%esp)
  104. flds 8(%esp)
  105. ..B1.6:
  106. fxch %st(1)
  107. fstps 4(%esp)
  108. fstps 8(%esp)
  109. movl 44(%esp), %ecx
  110. xorl %esp, %ecx
  111. movl 4(%esp), %eax
  112. movl 8(%esp), %edx
  113. cmpl %gs:20, %ecx
  114. jne ..B1.8
  115. ..B1.7:
  116. addl $56, %esp
  117. popl %ebx
  118. ret
  119. ..B1.8:
  120. call __stack_chk_fail@PLT
  121. .align 16,0x90
  122. .type __libm_internal_cexpf,@function
  123. .size __libm_internal_cexpf,.-__libm_internal_cexpf
  124. .data
  125. # -- End __libm_internal_cexpf
  126. .text
  127. # -- Begin cexpf
  128. .text
  129. .align 16,0x90
  130. .globl cexpf
  131. cexpf:
  132. # parameter 1: 64 + %esp
  133. ..B2.1:
  134. ..L3:
  135. pushl %ebx
  136. subl $56, %esp
  137. xorl %ecx, %ecx
  138. flds 64(%esp)
  139. flds 68(%esp)
  140. movl %gs:20, %edx
  141. xorl %esp, %edx
  142. movl %edx, 44(%esp)
  143. call ..L4
  144. ..L4:
  145. popl %ebx
  146. lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx
  147. fstpl 36(%esp)
  148. movl %ecx, 4(%esp)
  149. movl %ecx, 8(%esp)
  150. fstpl 28(%esp)
  151. addl $-32, %esp
  152. movl 60(%esp), %edx
  153. lea 44(%esp), %eax
  154. movl 20(%eax), %ecx
  155. movl %eax, (%esp)
  156. lea 4(%esp), %eax
  157. movl %edx, (%eax)
  158. movl %ecx, 4(%eax)
  159. movl 68(%esp), %edx
  160. movl 72(%esp), %ecx
  161. movl %edx, 8(%eax)
  162. movl %ecx, 12(%eax)
  163. call cexp@PLT
  164. ..B2.11:
  165. addl $28, %esp
  166. fldl 12(%esp)
  167. fsts 4(%esp)
  168. fldl 20(%esp)
  169. movzwl 6(%esp), %eax
  170. testl $32640, %eax
  171. fsts 8(%esp)
  172. jne ..B2.3
  173. ..B2.2:
  174. testl $8388607, 4(%esp)
  175. jne ..B2.5
  176. ..B2.3:
  177. movzwl 10(%esp), %eax
  178. testl $32640, %eax
  179. jne ..B2.6
  180. ..B2.4:
  181. testl $8388607, 8(%esp)
  182. je ..B2.6
  183. ..B2.5:
  184. fstp %st(0)
  185. fstp %st(0)
  186. flds .L_2il0floatpacket.4@GOTOFF(%ebx)
  187. fmul %st(0), %st
  188. fstps (%esp)
  189. flds 4(%esp)
  190. flds 8(%esp)
  191. ..B2.6:
  192. fxch %st(1)
  193. fstps 4(%esp)
  194. fstps 8(%esp)
  195. movl 44(%esp), %ecx
  196. xorl %esp, %ecx
  197. movl 4(%esp), %eax
  198. movl 8(%esp), %edx
  199. cmpl %gs:20, %ecx
  200. jne ..B2.8
  201. ..B2.7:
  202. addl $56, %esp
  203. popl %ebx
  204. ret
  205. ..B2.8:
  206. call __stack_chk_fail@PLT
  207. .align 16,0x90
  208. .type cexpf,@function
  209. .size cexpf,.-cexpf
  210. .data
  211. # -- End cexpf
  212. .section .rodata, "a"
  213. .align 4
  214. .align 4
  215. .L_2il0floatpacket.4:
  216. .long 0x00800000
  217. .type .L_2il0floatpacket.4,@object
  218. .size .L_2il0floatpacket.4,4
  219. .data
  220. .section .note.GNU-stack, ""
  221. # End