cpowl.S 5.5 KB

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