libm_hypot2l_k80.S 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497
  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 "libm_hypot2l_k80.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin __libm_hypot2l_k80
  41. .text
  42. .align 16,0x90
  43. .hidden __libm_hypot2l_k80
  44. .globl __libm_hypot2l_k80
  45. __libm_hypot2l_k80:
  46. # parameter 1: 64 + %esp
  47. # parameter 2: 68 + %esp
  48. # parameter 3: 80 + %esp
  49. ..B1.1:
  50. ..L1:
  51. pushl %esi
  52. pushl %edi
  53. pushl %ebx
  54. subl $48, %esp
  55. movzwl 76(%esp), %eax
  56. testl $32767, %eax
  57. movl 64(%esp), %ecx
  58. call ..L2
  59. ..L2:
  60. popl %ebx
  61. lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx
  62. jne ..B1.8
  63. ..B1.2:
  64. cmpl $0, 72(%esp)
  65. jne ..B1.8
  66. ..B1.3:
  67. cmpl $0, 68(%esp)
  68. jne ..B1.8
  69. ..B1.4:
  70. movzwl 88(%esp), %eax
  71. testl $32767, %eax
  72. jne ..B1.8
  73. ..B1.5:
  74. cmpl $0, 84(%esp)
  75. jne ..B1.8
  76. ..B1.6:
  77. cmpl $0, 80(%esp)
  78. jne ..B1.8
  79. ..B1.7:
  80. fldt 68(%esp)
  81. fstpt (%ecx)
  82. fldt 80(%esp)
  83. fstpt 12(%ecx)
  84. fldt .L_2il0floatpacket.0@GOTOFF(%ebx)
  85. addl $48, %esp
  86. popl %ebx
  87. popl %edi
  88. popl %esi
  89. ret
  90. ..B1.8:
  91. fldt 68(%esp)
  92. fabs
  93. fstpt (%esp)
  94. fldt (%esp)
  95. fldt 80(%esp)
  96. fabs
  97. fstpt 12(%esp)
  98. fldt 12(%esp)
  99. movzwl 8(%esp), %edx
  100. movzwl 20(%esp), %eax
  101. andl $32767, %edx
  102. andl $32767, %eax
  103. cmpl %eax, %edx
  104. jg ..B1.13
  105. ..B1.9:
  106. jne ..B1.14
  107. ..B1.10:
  108. movl 4(%esp), %esi
  109. movl 16(%esp), %edi
  110. cmpl %edi, %esi
  111. ja ..B1.65
  112. ..B1.11:
  113. jne ..B1.64
  114. ..B1.12:
  115. movl (%esp), %esi
  116. cmpl 12(%esp), %esi
  117. jbe ..B1.64
  118. ..B1.65:
  119. cmpl %eax, %edx
  120. ..B1.13:
  121. fxch %st(1)
  122. fstpt 24(%esp)
  123. fldt 24(%esp)
  124. fld %st(0)
  125. fxch %st(2)
  126. fxch %st(1)
  127. fxch %st(2)
  128. jl ..B1.20
  129. jmp ..B1.16
  130. ..B1.14:
  131. fstpt 24(%esp)
  132. fldt 24(%esp)
  133. fld %st(0)
  134. ..B1.15:
  135. jl ..B1.20
  136. ..B1.16:
  137. jne ..B1.21
  138. ..B1.17:
  139. movl 4(%esp), %eax
  140. movl 16(%esp), %edx
  141. cmpl %edx, %eax
  142. jb ..B1.20
  143. ..B1.18:
  144. jne ..B1.21
  145. ..B1.19:
  146. movl (%esp), %eax
  147. cmpl 12(%esp), %eax
  148. jae ..B1.21
  149. ..B1.20:
  150. fstp %st(1)
  151. fxch %st(1)
  152. fstpt 12(%esp)
  153. fldt 12(%esp)
  154. jmp ..B1.22
  155. ..B1.21:
  156. fstp %st(2)
  157. fstpt 12(%esp)
  158. fldt 12(%esp)
  159. ..B1.22:
  160. movswl 20(%esp), %eax
  161. testl %eax, %eax
  162. je ..B1.24
  163. ..B1.23:
  164. addl $-16383, %eax
  165. jmp ..B1.29
  166. ..B1.24:
  167. movzwl 20(%esp), %eax
  168. testl $32767, %eax
  169. jne ..B1.28
  170. ..B1.25:
  171. cmpl $0, 16(%esp)
  172. jne ..B1.28
  173. ..B1.26:
  174. cmpl $0, 12(%esp)
  175. jne ..B1.28
  176. ..B1.27:
  177. movl $-16526, %eax
  178. jmp ..B1.29
  179. ..B1.28:
  180. fldt 72+_CONSTANTS@GOTOFF(%ebx)
  181. fmul %st(1), %st
  182. fldt 84+_CONSTANTS@GOTOFF(%ebx)
  183. fmulp %st, %st(1)
  184. fstpt (%esp)
  185. movswl 8(%esp), %eax
  186. addl $-32828, %eax
  187. ..B1.29:
  188. movswl 32(%esp), %edx
  189. testl %edx, %edx
  190. je ..B1.31
  191. ..B1.30:
  192. addl $-16383, %edx
  193. jmp ..B1.32
  194. ..B1.31:
  195. fldt 72+_CONSTANTS@GOTOFF(%ebx)
  196. fmul %st(2), %st
  197. fldt 84+_CONSTANTS@GOTOFF(%ebx)
  198. fmulp %st, %st(1)
  199. fstpt (%esp)
  200. movswl 8(%esp), %edx
  201. addl $-32828, %edx
  202. ..B1.32:
  203. addl $-67, %edx
  204. cmpl %edx, %eax
  205. jg ..B1.34
  206. ..B1.33:
  207. fstp %st(0)
  208. fldt .L_2il0floatpacket.0@GOTOFF(%ebx)
  209. ..B1.34:
  210. movzwl 32(%esp), %eax
  211. andl $32767, %eax
  212. cmpl $24709, %eax
  213. jg ..B1.39
  214. ..B1.35:
  215. jne ..B1.40
  216. ..B1.36:
  217. movl 28(%esp), %edx
  218. cmpl 4+_CONSTANTS@GOTOFF(%ebx), %edx
  219. ja ..B1.39
  220. ..B1.37:
  221. jne ..B1.40
  222. ..B1.38:
  223. movl 24(%esp), %edx
  224. cmpl _CONSTANTS@GOTOFF(%ebx), %edx
  225. jb ..B1.40
  226. ..B1.39:
  227. fldt 60+_CONSTANTS@GOTOFF(%ebx)
  228. fmul %st, %st(2)
  229. fmul %st, %st(2)
  230. fxch %st(2)
  231. fstpt 24(%esp)
  232. fldt 24(%esp)
  233. fxch %st(1)
  234. fmul %st(2), %st
  235. fmulp %st, %st(2)
  236. fxch %st(1)
  237. fstpt 12(%esp)
  238. fldt 12(%esp)
  239. fldt .L_2il0floatpacket.1@GOTOFF(%ebx)
  240. jmp ..B1.61
  241. ..B1.40:
  242. cmpl $24573, %eax
  243. jg ..B1.45
  244. ..B1.41:
  245. jne ..B1.46
  246. ..B1.42:
  247. movl 28(%esp), %edx
  248. cmpl 16+_CONSTANTS@GOTOFF(%ebx), %edx
  249. ja ..B1.45
  250. ..B1.43:
  251. jne ..B1.46
  252. ..B1.44:
  253. movl 24(%esp), %edx
  254. cmpl 12+_CONSTANTS@GOTOFF(%ebx), %edx
  255. jb ..B1.46
  256. ..B1.45:
  257. fldt 60+_CONSTANTS@GOTOFF(%ebx)
  258. fmul %st, %st(2)
  259. fxch %st(2)
  260. fstpt 24(%esp)
  261. fldt 24(%esp)
  262. fxch %st(2)
  263. fmulp %st, %st(1)
  264. fstpt 12(%esp)
  265. fldt 12(%esp)
  266. fldt .L_2il0floatpacket.4@GOTOFF(%ebx)
  267. jmp ..B1.61
  268. ..B1.46:
  269. cmpl $8127, %eax
  270. jl ..B1.51
  271. ..B1.47:
  272. jne ..B1.52
  273. ..B1.48:
  274. movl 28(%esp), %edx
  275. cmpl 28+_CONSTANTS@GOTOFF(%ebx), %edx
  276. jb ..B1.51
  277. ..B1.49:
  278. jne ..B1.52
  279. ..B1.50:
  280. movl 24(%esp), %edx
  281. cmpl 24+_CONSTANTS@GOTOFF(%ebx), %edx
  282. ja ..B1.52
  283. ..B1.51:
  284. fldt 48+_CONSTANTS@GOTOFF(%ebx)
  285. fmul %st, %st(2)
  286. fmul %st, %st(2)
  287. fxch %st(2)
  288. fstpt 24(%esp)
  289. fldt 24(%esp)
  290. fxch %st(1)
  291. fmul %st(2), %st
  292. fmulp %st, %st(2)
  293. fxch %st(1)
  294. fstpt 12(%esp)
  295. fldt 12(%esp)
  296. fldt .L_2il0floatpacket.5@GOTOFF(%ebx)
  297. jmp ..B1.61
  298. ..B1.52:
  299. cmpl $8323, %eax
  300. jl ..B1.57
  301. ..B1.53:
  302. jne ..B1.60
  303. ..B1.54:
  304. movl 28(%esp), %eax
  305. cmpl 40+_CONSTANTS@GOTOFF(%ebx), %eax
  306. jb ..B1.57
  307. ..B1.55:
  308. jne ..B1.60
  309. ..B1.56:
  310. movl 24(%esp), %eax
  311. cmpl 36+_CONSTANTS@GOTOFF(%ebx), %eax
  312. ja ..B1.60
  313. ..B1.57:
  314. fldt 48+_CONSTANTS@GOTOFF(%ebx)
  315. fmul %st, %st(2)
  316. fxch %st(2)
  317. fstpt 24(%esp)
  318. fldt 24(%esp)
  319. fxch %st(2)
  320. fmulp %st, %st(1)
  321. fstpt 12(%esp)
  322. fldt 12(%esp)
  323. fldt .L_2il0floatpacket.6@GOTOFF(%ebx)
  324. jmp ..B1.61
  325. ..B1.60:
  326. fldt .L_2il0floatpacket.0@GOTOFF(%ebx)
  327. ..B1.61:
  328. fldt .L_2il0floatpacket.2@GOTOFF(%ebx)
  329. fld %st(3)
  330. fmul %st(1), %st
  331. fld %st(4)
  332. fsubr %st(1), %st
  333. fsubrp %st, %st(1)
  334. fld %st(0)
  335. fmul %st(1), %st
  336. fld %st(4)
  337. fxch %st(2)
  338. fsubr %st, %st(6)
  339. fxch %st(3)
  340. fmul %st(5), %st
  341. fsub %st, %st(2)
  342. fsubp %st, %st(2)
  343. fld %st(1)
  344. fmul %st(2), %st
  345. fxch %st(2)
  346. fsubr %st, %st(5)
  347. fldt .L_2il0floatpacket.3@GOTOFF(%ebx)
  348. fmul %st, %st(4)
  349. fxch %st(4)
  350. fmul %st(7), %st
  351. fxch %st(4)
  352. fmulp %st, %st(1)
  353. fmul %st(5), %st
  354. fld %st(1)
  355. fadd %st(4), %st
  356. fsub %st, %st(2)
  357. fxch %st(2)
  358. fsubrp %st, %st(4)
  359. fxch %st(6)
  360. fmul %st(0), %st
  361. faddp %st, %st(3)
  362. fld %st(0)
  363. fadd %st(2), %st
  364. fld %st(0)
  365. fadd %st(7), %st
  366. fstpt (%ecx)
  367. fldt (%ecx)
  368. fxch %st(1)
  369. fsub %st, %st(2)
  370. fxch %st(2)
  371. fsubrp %st, %st(3)
  372. fxch %st(3)
  373. faddp %st, %st(2)
  374. fxch %st(4)
  375. fmul %st(0), %st
  376. fxch %st(2)
  377. fsubp %st, %st(4)
  378. fxch %st(3)
  379. fsubrp %st, %st(4)
  380. fxch %st(2)
  381. faddp %st, %st(3)
  382. fxch %st(1)
  383. faddp %st, %st(2)
  384. fxch %st(1)
  385. fstpt 12(%ecx)
  386. addl $48, %esp
  387. popl %ebx
  388. popl %edi
  389. popl %esi
  390. ret
  391. ..B1.64:
  392. cmpl %eax, %edx
  393. jmp ..B1.14
  394. .align 16,0x90
  395. .type __libm_hypot2l_k80,@function
  396. .size __libm_hypot2l_k80,.-__libm_hypot2l_k80
  397. .data
  398. # -- End __libm_hypot2l_k80
  399. .section .rodata, "a"
  400. .align 16
  401. .align 16
  402. .L_2il0floatpacket.0:
  403. .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
  404. .type .L_2il0floatpacket.0,@object
  405. .size .L_2il0floatpacket.0,12
  406. .space 4, 0x00 # pad
  407. .align 16
  408. .L_2il0floatpacket.1:
  409. .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x80,0x0e,0x40,0x00,0x00
  410. .type .L_2il0floatpacket.1,@object
  411. .size .L_2il0floatpacket.1,12
  412. .space 4, 0x00 # pad
  413. .align 16
  414. .L_2il0floatpacket.2:
  415. .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00
  416. .type .L_2il0floatpacket.2,@object
  417. .size .L_2il0floatpacket.2,12
  418. .space 4, 0x00 # pad
  419. .align 16
  420. .L_2il0floatpacket.3:
  421. .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00
  422. .type .L_2il0floatpacket.3,@object
  423. .size .L_2il0floatpacket.3,12
  424. .space 4, 0x00 # pad
  425. .align 16
  426. .L_2il0floatpacket.4:
  427. .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x80,0x0d,0x40,0x00,0x00
  428. .type .L_2il0floatpacket.4,@object
  429. .size .L_2il0floatpacket.4,12
  430. .space 4, 0x00 # pad
  431. .align 16
  432. .L_2il0floatpacket.5:
  433. .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x80,0x0e,0xc0,0x00,0x00
  434. .type .L_2il0floatpacket.5,@object
  435. .size .L_2il0floatpacket.5,12
  436. .space 4, 0x00 # pad
  437. .align 16
  438. .L_2il0floatpacket.6:
  439. .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x80,0x0d,0xc0,0x00,0x00
  440. .type .L_2il0floatpacket.6,@object
  441. .size .L_2il0floatpacket.6,12
  442. .align 2
  443. _CONSTANTS:
  444. .word 0
  445. .word 0
  446. .word 0
  447. .word 32768
  448. .word 24709
  449. .word 0
  450. .word 65535
  451. .word 65535
  452. .word 65535
  453. .word 65535
  454. .word 24573
  455. .word 0
  456. .word 65535
  457. .word 65535
  458. .word 65535
  459. .word 65535
  460. .word 8127
  461. .word 0
  462. .word 0
  463. .word 0
  464. .word 0
  465. .word 32768
  466. .word 8323
  467. .word 0
  468. .word 0
  469. .word 0
  470. .word 0
  471. .word 32768
  472. .word 24576
  473. .word 0
  474. .word 0
  475. .word 0
  476. .word 0
  477. .word 32768
  478. .word 8190
  479. .word 0
  480. .word 0
  481. .word 0
  482. .word 0
  483. .word 32768
  484. .word 32766
  485. .word 0
  486. .word 0
  487. .word 0
  488. .word 0
  489. .word 32768
  490. .word 16445
  491. .word 0
  492. .type _CONSTANTS,@object
  493. .size _CONSTANTS,96
  494. .data
  495. .section .note.GNU-stack, ""
  496. # End