complex_real.S 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  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 "complex_real.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin __libm_internal_isinf
  41. .text
  42. .align 16,0x90
  43. .hidden __libm_internal_isinf
  44. .globl __libm_internal_isinf
  45. __libm_internal_isinf:
  46. # parameter 1: 4 + %esp
  47. ..B1.1:
  48. ..L1:
  49. movl 8(%esp), %eax
  50. andl $2147483647, %eax
  51. cmpl $2146435072, %eax
  52. jne ..B1.4
  53. ..B1.2:
  54. cmpl $0, 4(%esp)
  55. jne ..B1.4
  56. ..B1.3:
  57. movl $1, %eax
  58. ret
  59. ..B1.4:
  60. xorl %eax, %eax
  61. ret
  62. .align 16,0x90
  63. .type __libm_internal_isinf,@function
  64. .size __libm_internal_isinf,.-__libm_internal_isinf
  65. .data
  66. # -- End __libm_internal_isinf
  67. .text
  68. # -- Begin __libm_internal_ispinf
  69. .text
  70. .align 16,0x90
  71. .hidden __libm_internal_ispinf
  72. .globl __libm_internal_ispinf
  73. __libm_internal_ispinf:
  74. # parameter 1: 4 + %esp
  75. ..B2.1:
  76. ..L2:
  77. cmpl $2146435072, 8(%esp)
  78. jne ..B2.4
  79. ..B2.2:
  80. cmpl $0, 4(%esp)
  81. jne ..B2.4
  82. ..B2.3:
  83. movl $1, %eax
  84. ret
  85. ..B2.4:
  86. xorl %eax, %eax
  87. ret
  88. .align 16,0x90
  89. .type __libm_internal_ispinf,@function
  90. .size __libm_internal_ispinf,.-__libm_internal_ispinf
  91. .data
  92. # -- End __libm_internal_ispinf
  93. .text
  94. # -- Begin __libm_internal_isninf
  95. .text
  96. .align 16,0x90
  97. .hidden __libm_internal_isninf
  98. .globl __libm_internal_isninf
  99. __libm_internal_isninf:
  100. # parameter 1: 4 + %esp
  101. ..B3.1:
  102. ..L3:
  103. cmpl $-1048576, 8(%esp)
  104. jne ..B3.4
  105. ..B3.2:
  106. cmpl $0, 4(%esp)
  107. jne ..B3.4
  108. ..B3.3:
  109. movl $1, %eax
  110. ret
  111. ..B3.4:
  112. xorl %eax, %eax
  113. ret
  114. .align 16,0x90
  115. .type __libm_internal_isninf,@function
  116. .size __libm_internal_isninf,.-__libm_internal_isninf
  117. .data
  118. # -- End __libm_internal_isninf
  119. .text
  120. # -- Begin __libm_internal_isnan
  121. .text
  122. .align 16,0x90
  123. .hidden __libm_internal_isnan
  124. .globl __libm_internal_isnan
  125. __libm_internal_isnan:
  126. # parameter 1: 4 + %esp
  127. ..B4.1:
  128. ..L4:
  129. movl 8(%esp), %edx
  130. movl %edx, %eax
  131. andl $2146435072, %eax
  132. cmpl $2146435072, %eax
  133. jne ..B4.5
  134. ..B4.2:
  135. testl $1048575, %edx
  136. jne ..B4.4
  137. ..B4.3:
  138. cmpl $0, 4(%esp)
  139. je ..B4.5
  140. ..B4.4:
  141. movl $1, %eax
  142. ret
  143. ..B4.5:
  144. xorl %eax, %eax
  145. ret
  146. .align 16,0x90
  147. .type __libm_internal_isnan,@function
  148. .size __libm_internal_isnan,.-__libm_internal_isnan
  149. .data
  150. # -- End __libm_internal_isnan
  151. .text
  152. # -- Begin __libm_internal_isposzero
  153. .text
  154. .align 16,0x90
  155. .hidden __libm_internal_isposzero
  156. .globl __libm_internal_isposzero
  157. __libm_internal_isposzero:
  158. # parameter 1: 4 + %esp
  159. ..B5.1:
  160. ..L5:
  161. cmpl $0, 8(%esp)
  162. jne ..B5.4
  163. ..B5.2:
  164. cmpl $0, 4(%esp)
  165. jne ..B5.4
  166. ..B5.3:
  167. movl $1, %eax
  168. ret
  169. ..B5.4:
  170. xorl %eax, %eax
  171. ret
  172. .align 16,0x90
  173. .type __libm_internal_isposzero,@function
  174. .size __libm_internal_isposzero,.-__libm_internal_isposzero
  175. .data
  176. # -- End __libm_internal_isposzero
  177. .text
  178. # -- Begin __libm_internal_iszero
  179. .text
  180. .align 16,0x90
  181. .hidden __libm_internal_iszero
  182. .globl __libm_internal_iszero
  183. __libm_internal_iszero:
  184. # parameter 1: 4 + %esp
  185. ..B6.1:
  186. ..L6:
  187. testl $2147483647, 8(%esp)
  188. jne ..B6.4
  189. ..B6.2:
  190. cmpl $0, 4(%esp)
  191. jne ..B6.4
  192. ..B6.3:
  193. movl $1, %eax
  194. ret
  195. ..B6.4:
  196. xorl %eax, %eax
  197. ret
  198. .align 16,0x90
  199. .type __libm_internal_iszero,@function
  200. .size __libm_internal_iszero,.-__libm_internal_iszero
  201. .data
  202. # -- End __libm_internal_iszero
  203. .text
  204. # -- Begin __libm_internal_isnegzero
  205. .text
  206. .align 16,0x90
  207. .hidden __libm_internal_isnegzero
  208. .globl __libm_internal_isnegzero
  209. __libm_internal_isnegzero:
  210. # parameter 1: 4 + %esp
  211. ..B7.1:
  212. ..L7:
  213. cmpl $-2147483648, 8(%esp)
  214. jne ..B7.4
  215. ..B7.2:
  216. cmpl $0, 4(%esp)
  217. jne ..B7.4
  218. ..B7.3:
  219. movl $1, %eax
  220. ret
  221. ..B7.4:
  222. xorl %eax, %eax
  223. ret
  224. .align 16,0x90
  225. .type __libm_internal_isnegzero,@function
  226. .size __libm_internal_isnegzero,.-__libm_internal_isnegzero
  227. .data
  228. # -- End __libm_internal_isnegzero
  229. .text
  230. # -- Begin __libm_internal_isnzfinite
  231. .text
  232. .align 16,0x90
  233. .hidden __libm_internal_isnzfinite
  234. .globl __libm_internal_isnzfinite
  235. __libm_internal_isnzfinite:
  236. # parameter 1: 4 + %esp
  237. ..B8.1:
  238. ..L8:
  239. movl 8(%esp), %edx
  240. movl %edx, %eax
  241. andl $2146435072, %eax
  242. cmpl $2146435072, %eax
  243. jae ..B8.3
  244. ..B8.2:
  245. andl $2147483647, %edx
  246. orl 4(%esp), %edx
  247. jne ..B8.4
  248. ..B8.3:
  249. xorl %eax, %eax
  250. ret
  251. ..B8.4:
  252. movl $1, %eax
  253. ret
  254. .align 16,0x90
  255. .type __libm_internal_isnzfinite,@function
  256. .size __libm_internal_isnzfinite,.-__libm_internal_isnzfinite
  257. .data
  258. # -- End __libm_internal_isnzfinite
  259. .text
  260. # -- Begin __libm_internal_isfinite
  261. .text
  262. .align 16,0x90
  263. .hidden __libm_internal_isfinite
  264. .globl __libm_internal_isfinite
  265. __libm_internal_isfinite:
  266. # parameter 1: 4 + %esp
  267. ..B9.1:
  268. ..L9:
  269. movl 8(%esp), %eax
  270. andl $2146435072, %eax
  271. cmpl $2146435072, %eax
  272. movl $0, %eax
  273. setb %al
  274. ret
  275. .align 16,0x90
  276. .type __libm_internal_isfinite,@function
  277. .size __libm_internal_isfinite,.-__libm_internal_isfinite
  278. .data
  279. # -- End __libm_internal_isfinite
  280. .data
  281. .section .note.GNU-stack, ""
  282. # End