casinhl.S 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  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 "casinhl.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin casinhl
  41. .text
  42. .align 16,0x90
  43. .globl casinhl
  44. casinhl:
  45. # parameter 1: 512 + %rsp
  46. ..B1.1:
  47. .cfi_startproc
  48. ..___tag_value_casinhl.1:
  49. ..L2:
  50. pushq %r12
  51. .cfi_def_cfa_offset 16
  52. .cfi_offset 12, -16
  53. pushq %r13
  54. .cfi_def_cfa_offset 24
  55. .cfi_offset 13, -24
  56. pushq %r14
  57. .cfi_def_cfa_offset 32
  58. .cfi_offset 14, -32
  59. pushq %r15
  60. .cfi_def_cfa_offset 40
  61. .cfi_offset 15, -40
  62. pushq %rbp
  63. .cfi_def_cfa_offset 48
  64. .cfi_offset 6, -48
  65. subq $464, %rsp
  66. .cfi_def_cfa_offset 512
  67. xorb %r15b, %r15b
  68. fldt .L_2il0floatpacket.8(%rip)
  69. movq %fs:40, %rax
  70. xorq %rsp, %rax
  71. movq %rax, 448(%rsp)
  72. fstpt 8(%rsp)
  73. fldt 8(%rsp)
  74. fstpt 416(%rsp)
  75. fldt 416(%rsp)
  76. fstpt 432(%rsp)
  77. ..B1.2:
  78. fnstcw 26(%rsp)
  79. ..B1.3:
  80. movzwl 26(%rsp), %edx
  81. movl %edx, %eax
  82. andl $768, %eax
  83. cmpl $768, %eax
  84. je ..B1.7
  85. ..B1.4:
  86. orl $-64768, %edx
  87. movw %dx, 24(%rsp)
  88. ..B1.5:
  89. fldcw 24(%rsp)
  90. ..B1.6:
  91. movb $1, %r15b
  92. ..B1.7:
  93. movzwl 520(%rsp), %esi
  94. andl $32767, %esi
  95. cmpl $32767, %esi
  96. jge ..B1.15
  97. ..B1.8:
  98. testl %esi, %esi
  99. jle ..B1.36
  100. ..B1.9:
  101. movzwl 536(%rsp), %eax
  102. andl $32767, %eax
  103. cmpl $32767, %eax
  104. jge ..B1.15
  105. ..B1.10:
  106. testl %eax, %eax
  107. jle ..B1.34
  108. ..B1.11:
  109. lea 32(%rsp), %rbp
  110. lea 80(%rsp), %r12
  111. lea 176(%rsp), %r14
  112. lea 128(%rsp), %r13
  113. pushq %rbp
  114. .cfi_def_cfa_offset 520
  115. pushq %r12
  116. .cfi_def_cfa_offset 528
  117. pushq %r13
  118. .cfi_def_cfa_offset 536
  119. pushq %r14
  120. .cfi_def_cfa_offset 544
  121. lea 560(%rsp), %rdi
  122. lea 544(%rsp), %rsi
  123. lea 400(%rsp), %rdx
  124. lea 352(%rsp), %rcx
  125. lea 304(%rsp), %r8
  126. lea 256(%rsp), %r9
  127. ..___tag_value_casinhl.18:
  128. call __libm_carctrigprepare_k80@PLT
  129. ..___tag_value_casinhl.19:
  130. ..B1.58:
  131. addq $32, %rsp
  132. .cfi_def_cfa_offset 512
  133. ..B1.12:
  134. pushq %rbp
  135. .cfi_def_cfa_offset 520
  136. pushq %r12
  137. .cfi_def_cfa_offset 528
  138. pushq %r13
  139. .cfi_def_cfa_offset 536
  140. pushq %r14
  141. .cfi_def_cfa_offset 544
  142. lea 560(%rsp), %rdi
  143. lea 544(%rsp), %rsi
  144. lea 400(%rsp), %rdx
  145. lea 352(%rsp), %rcx
  146. lea 304(%rsp), %r8
  147. lea 256(%rsp), %r9
  148. ..___tag_value_casinhl.25:
  149. call __libm_recacoshl_k80@PLT
  150. ..___tag_value_casinhl.26:
  151. ..B1.59:
  152. addq $32, %rsp
  153. .cfi_def_cfa_offset 512
  154. ..B1.13:
  155. movb 521(%rsp), %al
  156. lea ones(%rip), %r10
  157. andb $-128, %al
  158. shrb $7, %al
  159. movzbl %al, %r11d
  160. fldl (%r10,%r11,8)
  161. fmulp %st, %st(1)
  162. fstpt 416(%rsp)
  163. pushq %rbp
  164. .cfi_def_cfa_offset 520
  165. pushq %r12
  166. .cfi_def_cfa_offset 528
  167. pushq %r13
  168. .cfi_def_cfa_offset 536
  169. pushq %r14
  170. .cfi_def_cfa_offset 544
  171. lea 560(%rsp), %rdi
  172. lea 544(%rsp), %rsi
  173. lea 400(%rsp), %rdx
  174. lea 352(%rsp), %rcx
  175. lea 304(%rsp), %r8
  176. lea 256(%rsp), %r9
  177. ..___tag_value_casinhl.32:
  178. call __libm_recasinl_k80@PLT
  179. ..___tag_value_casinhl.33:
  180. ..B1.60:
  181. addq $32, %rsp
  182. .cfi_def_cfa_offset 512
  183. ..B1.14:
  184. fstpt 432(%rsp)
  185. jmp ..B1.29
  186. ..B1.15:
  187. movq 528(%rsp), %rax
  188. testq %rax, %rax
  189. jne ..B1.17
  190. ..B1.16:
  191. addq $-16, %rsp
  192. .cfi_def_cfa_offset 528
  193. fldt 528(%rsp)
  194. fstpt (%rsp)
  195. call asinhl@PLT
  196. ..B1.61:
  197. addq $16, %rsp
  198. .cfi_def_cfa_offset 512
  199. fldt 528(%rsp)
  200. fstpt 432(%rsp)
  201. fstpt 416(%rsp)
  202. jmp ..B1.29
  203. ..B1.17:
  204. movzwl 536(%rsp), %ecx
  205. movq 512(%rsp), %rbp
  206. andl $32767, %ecx
  207. testq %rbp, %rbp
  208. jne ..B1.24
  209. ..B1.18:
  210. cmpl $32767, %ecx
  211. jge ..B1.23
  212. ..B1.19:
  213. fldt 528(%rsp)
  214. cmpl $16383, %ecx
  215. jl ..B1.21
  216. ..B1.20:
  217. movb 537(%rsp), %al
  218. lea ones(%rip), %rbp
  219. andb $-128, %al
  220. shrb $7, %al
  221. movzbl %al, %edx
  222. fldl (%rbp,%rdx,8)
  223. fstl (%rsp)
  224. addq $-16, %rsp
  225. .cfi_def_cfa_offset 528
  226. fmulp %st, %st(1)
  227. fstpt (%rsp)
  228. call acoshl@PLT
  229. ..B1.63:
  230. fstpt 24(%rsp)
  231. fldl 16(%rsp)
  232. fstpt (%rsp)
  233. call asinl@PLT
  234. ..B1.62:
  235. addq $16, %rsp
  236. .cfi_def_cfa_offset 512
  237. fstpt 432(%rsp)
  238. jmp ..B1.22
  239. ..B1.21:
  240. addq $-16, %rsp
  241. .cfi_def_cfa_offset 528
  242. fstpt (%rsp)
  243. call asinl@PLT
  244. ..B1.64:
  245. addq $16, %rsp
  246. .cfi_def_cfa_offset 512
  247. lea ones(%rip), %rbp
  248. fstpt 432(%rsp)
  249. ..B1.22:
  250. fldt 8(%rsp)
  251. movb 521(%rsp), %al
  252. andb $-128, %al
  253. shrb $7, %al
  254. movzbl %al, %edx
  255. fmull (%rbp,%rdx,8)
  256. fstpt 416(%rsp)
  257. jmp ..B1.29
  258. ..B1.23:
  259. movq $0x8000000000000000, %rdx
  260. cmpq %rdx, %rax
  261. je ..B1.19
  262. ..B1.24:
  263. cmpl $32767, %esi
  264. je ..B1.46
  265. ..B1.69:
  266. cmpl $32767, %ecx
  267. ..B1.25:
  268. je ..B1.42
  269. ..B1.67:
  270. cmpl $32767, %esi
  271. ..B1.26:
  272. je ..B1.40
  273. ..B1.27:
  274. fldt 528(%rsp)
  275. fld %st(0)
  276. fmul %st(1), %st
  277. fldt 512(%rsp)
  278. fxch %st(2)
  279. ..B1.28:
  280. movb 521(%rsp), %al
  281. lea ones(%rip), %rdx
  282. andb $-128, %al
  283. shrb $7, %al
  284. movzbl %al, %ecx
  285. fldl (%rdx,%rcx,8)
  286. fmul %st, %st(2)
  287. fxch %st(2)
  288. fstpt 416(%rsp)
  289. addq $-32, %rsp
  290. .cfi_def_cfa_offset 544
  291. fxch %st(2)
  292. fmulp %st, %st(1)
  293. fxch %st(1)
  294. fstpt (%rsp)
  295. fstpt 16(%rsp)
  296. call atan2l@PLT
  297. ..B1.65:
  298. addq $32, %rsp
  299. .cfi_def_cfa_offset 512
  300. fstpt 432(%rsp)
  301. ..B1.29:
  302. testb %r15b, %r15b
  303. je ..B1.31
  304. ..B1.30:
  305. fldcw 26(%rsp)
  306. ..B1.31:
  307. movq 448(%rsp), %rax
  308. xorq %rsp, %rax
  309. cmpq %fs:40, %rax
  310. jne ..B1.39
  311. ..B1.32:
  312. fldt 416(%rsp)
  313. fldt 432(%rsp)
  314. movq 448(%rsp), %rax
  315. xorq %rsp, %rax
  316. cmpq %fs:40, %rax
  317. jne ..B1.38
  318. ..B1.33:
  319. addq $464, %rsp
  320. .cfi_def_cfa_offset 48
  321. .cfi_restore 6
  322. popq %rbp
  323. .cfi_def_cfa_offset 40
  324. .cfi_restore 15
  325. popq %r15
  326. .cfi_def_cfa_offset 32
  327. .cfi_restore 14
  328. popq %r14
  329. .cfi_def_cfa_offset 24
  330. .cfi_restore 13
  331. popq %r13
  332. .cfi_def_cfa_offset 16
  333. .cfi_restore 12
  334. popq %r12
  335. .cfi_def_cfa_offset 8
  336. fxch %st(1)
  337. ret
  338. .cfi_def_cfa_offset 512
  339. .cfi_offset 6, -48
  340. .cfi_offset 12, -16
  341. .cfi_offset 13, -24
  342. .cfi_offset 14, -32
  343. .cfi_offset 15, -40
  344. ..B1.34:
  345. cmpl $0, 532(%rsp)
  346. jne ..B1.11
  347. ..B1.35:
  348. cmpl $0, 528(%rsp)
  349. jne ..B1.11
  350. jmp ..B1.15
  351. ..B1.36:
  352. cmpl $0, 516(%rsp)
  353. jne ..B1.9
  354. ..B1.37:
  355. cmpl $0, 512(%rsp)
  356. jne ..B1.9
  357. jmp ..B1.15
  358. ..B1.38:
  359. fstp %st(1)
  360. fstp %st(0)
  361. call __stack_chk_fail@PLT
  362. ..B1.39:
  363. call __stack_chk_fail@PLT
  364. ..B1.40:
  365. movq $0x8000000000000000, %rax
  366. cmpq %rax, %rbp
  367. jne ..B1.27
  368. ..B1.41:
  369. fldt 512(%rsp)
  370. fld %st(0)
  371. fmul %st(1), %st
  372. fldt 528(%rsp)
  373. jmp ..B1.28
  374. ..B1.42:
  375. cmpl $-2147483648, 532(%rsp)
  376. jne ..B1.44
  377. ..B1.43:
  378. cmpl $0, 528(%rsp)
  379. je ..B1.66
  380. ..B1.44:
  381. cmpl $32767, %esi
  382. jge ..B1.26
  383. ..B1.45:
  384. fldt 528(%rsp)
  385. fmul %st(0), %st
  386. fstpt 416(%rsp)
  387. fldt 416(%rsp)
  388. fstpt 432(%rsp)
  389. jmp ..B1.29
  390. ..B1.46:
  391. cmpl $-2147483648, 516(%rsp)
  392. jne ..B1.48
  393. ..B1.47:
  394. cmpl $0, 512(%rsp)
  395. je ..B1.49
  396. ..B1.48:
  397. cmpl $32767, %ecx
  398. je ..B1.53
  399. ..B1.49:
  400. cmpl $-2147483648, 516(%rsp)
  401. jne ..B1.51
  402. ..B1.50:
  403. cmpl $0, 512(%rsp)
  404. je ..B1.68
  405. ..B1.51:
  406. cmpl $32767, %ecx
  407. jge ..B1.25
  408. ..B1.52:
  409. fldt 512(%rsp)
  410. fmul %st(0), %st
  411. fstpt 416(%rsp)
  412. fldt 416(%rsp)
  413. fstpt 432(%rsp)
  414. jmp ..B1.29
  415. ..B1.53:
  416. cmpl $-2147483648, 532(%rsp)
  417. jne ..B1.55
  418. ..B1.54:
  419. cmpl $0, 528(%rsp)
  420. je ..B1.49
  421. ..B1.55:
  422. fldt 512(%rsp)
  423. fmul %st(0), %st
  424. fstpt 416(%rsp)
  425. fldt 528(%rsp)
  426. fmul %st(0), %st
  427. fstpt 432(%rsp)
  428. jmp ..B1.29
  429. ..B1.66:
  430. cmpl $32767, %esi
  431. je ..B1.40
  432. jmp ..B1.27
  433. ..B1.68:
  434. cmpl $32767, %ecx
  435. je ..B1.42
  436. jmp ..B1.67
  437. .align 16,0x90
  438. .cfi_endproc
  439. .type casinhl,@function
  440. .size casinhl,.-casinhl
  441. .data
  442. # -- End casinhl
  443. .section .rodata, "a"
  444. .align 16
  445. .align 16
  446. .L_2il0floatpacket.8:
  447. .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
  448. .type .L_2il0floatpacket.8,@object
  449. .size .L_2il0floatpacket.8,16
  450. .align 8
  451. ones:
  452. .long 0x00000000,0x3ff00000
  453. .long 0x00000000,0xbff00000
  454. .type ones,@object
  455. .size ones,16
  456. .data
  457. .section .note.GNU-stack, ""
  458. // -- Begin DWARF2 SEGMENT .eh_frame
  459. .section .eh_frame,"a",@progbits
  460. .eh_frame_seg:
  461. .align 1
  462. # End