cacoshl.S 12 KB

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