cacosl.S 12 KB

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