cbrt_wmt.S 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735
  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 "cbrt_wmt.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin static_func
  41. .text
  42. .align 16,0x90
  43. static_func:
  44. ..B1.1:
  45. ..L1:
  46. call ..L2
  47. ..L2:
  48. popl %eax
  49. lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
  50. lea static_const_table@GOTOFF(%eax), %eax
  51. ret
  52. .align 16,0x90
  53. .type static_func,@function
  54. .size static_func,.-static_func
  55. .data
  56. # -- End static_func
  57. .text
  58. # -- Begin cbrt
  59. .text
  60. .align 16,0x90
  61. .globl cbrt
  62. cbrt:
  63. # parameter 1: 8 + %ebp
  64. ..B2.1:
  65. ..L3:
  66. ..B2.2:
  67. pushl %ebp
  68. movl %esp, %ebp
  69. subl $120, %esp
  70. movl %esi, 52(%esp)
  71. call static_func
  72. movl %eax, %esi
  73. movsd 128(%esp), %xmm0
  74. movapd %xmm0, %xmm7
  75. movsd %xmm0, 8(%esp)
  76. movl $524032, %edx
  77. movsd 64(%esi), %xmm5
  78. movsd 80(%esi), %xmm3
  79. psrlq $44, %xmm7
  80. pextrw $0, %xmm7, %ecx
  81. movd %xmm7, %eax
  82. movsd 96(%esi), %xmm1
  83. movsd 112(%esi), %xmm2
  84. movl %ebx, 16(%esp)
  85. andl $248, %ecx
  86. movsd 128(%ecx,%esi), %xmm4
  87. movl %eax, %ebx
  88. andl %eax, %edx
  89. cmpl $0, %edx
  90. je .L_2TAG_PACKET_0.0.2
  91. cmpl $524032, %edx
  92. je .L_2TAG_PACKET_1.0.2
  93. shrl $8, %edx
  94. shrl $8, %ebx
  95. andpd %xmm0, %xmm2
  96. andpd %xmm5, %xmm0
  97. orpd %xmm2, %xmm3
  98. orpd %xmm0, %xmm1
  99. movapd (%esi), %xmm5
  100. movl $5462, %eax
  101. movapd 16(%esi), %xmm6
  102. mull %edx
  103. movl %ebx, %edx
  104. andl $2047, %ebx
  105. shrl $14, %eax
  106. andl $2048, %edx
  107. subl %eax, %ebx
  108. subl %eax, %ebx
  109. subl %eax, %ebx
  110. shll $8, %ebx
  111. addl $682, %eax
  112. orl %edx, %eax
  113. movd %eax, %xmm7
  114. addl %ebx, %ecx
  115. psllq $52, %xmm7
  116. .L_2TAG_PACKET_2.0.2:
  117. movapd 32(%esi), %xmm2
  118. movapd 48(%esi), %xmm0
  119. subsd %xmm3, %xmm1
  120. movq %xmm7, %xmm3
  121. mulsd 384(%ecx,%esi), %xmm7
  122. mulsd %xmm4, %xmm1
  123. mulsd 1152(%ecx,%esi), %xmm3
  124. movapd %xmm1, %xmm4
  125. unpcklpd %xmm1, %xmm1
  126. mulpd %xmm1, %xmm5
  127. mulpd %xmm1, %xmm6
  128. mulpd %xmm1, %xmm1
  129. addpd %xmm5, %xmm2
  130. addpd %xmm6, %xmm0
  131. mulpd %xmm1, %xmm2
  132. mulpd %xmm1, %xmm1
  133. mulsd %xmm7, %xmm4
  134. addpd %xmm2, %xmm0
  135. movl 16(%esp), %ebx
  136. mulsd %xmm0, %xmm1
  137. unpckhpd %xmm0, %xmm0
  138. addsd %xmm1, %xmm0
  139. mulsd %xmm4, %xmm0
  140. addsd %xmm3, %xmm0
  141. addsd %xmm7, %xmm0
  142. movsd %xmm0, (%esp)
  143. fldl (%esp)
  144. jmp .L_2TAG_PACKET_3.0.2
  145. .L_2TAG_PACKET_0.0.2:
  146. mulsd 1984(%esi), %xmm0
  147. movq %xmm0, %xmm7
  148. movl $524032, %edx
  149. psrlq $44, %xmm7
  150. pextrw $0, %xmm7, %ecx
  151. movd %xmm7, %eax
  152. andl $248, %ecx
  153. movsd 128(%ecx,%esi), %xmm4
  154. movl %eax, %ebx
  155. andl %eax, %edx
  156. shrl $8, %edx
  157. shrl $8, %ebx
  158. cmpl $0, %edx
  159. je .L_2TAG_PACKET_4.0.2
  160. andpd %xmm0, %xmm2
  161. andpd %xmm5, %xmm0
  162. orpd %xmm2, %xmm3
  163. orpd %xmm0, %xmm1
  164. movapd (%esi), %xmm5
  165. movl $5462, %eax
  166. movapd 16(%esi), %xmm6
  167. mull %edx
  168. movl %ebx, %edx
  169. andl $2047, %ebx
  170. shrl $14, %eax
  171. andl $2048, %edx
  172. subl %eax, %ebx
  173. subl %eax, %ebx
  174. subl %eax, %ebx
  175. shll $8, %ebx
  176. addl $661, %eax
  177. orl %edx, %eax
  178. movd %eax, %xmm7
  179. addl %ebx, %ecx
  180. psllq $52, %xmm7
  181. jmp .L_2TAG_PACKET_2.0.2
  182. .L_2TAG_PACKET_4.0.2:
  183. cmpl $0, %ebx
  184. jne .L_2TAG_PACKET_5.0.2
  185. movl 16(%esp), %ebx
  186. fldl 1952(%esi)
  187. jmp .L_2TAG_PACKET_3.0.2
  188. .L_2TAG_PACKET_5.0.2:
  189. movl 16(%esp), %ebx
  190. fldl 1968(%esi)
  191. jmp .L_2TAG_PACKET_3.0.2
  192. .L_2TAG_PACKET_1.0.2:
  193. movl 16(%esp), %ebx
  194. movl 132(%esp), %eax
  195. movl 128(%esp), %edx
  196. movl %eax, %ecx
  197. andl $2147483647, %ecx
  198. cmpl $2146435072, %ecx
  199. ja .L_2TAG_PACKET_6.0.2
  200. cmpl $0, %edx
  201. jne .L_2TAG_PACKET_6.0.2
  202. cmpl $2146435072, %eax
  203. jne .L_2TAG_PACKET_7.0.2
  204. fldl 1920(%esi)
  205. jmp .L_2TAG_PACKET_3.0.2
  206. .L_2TAG_PACKET_7.0.2:
  207. fldl 1936(%esi)
  208. jmp .L_2TAG_PACKET_3.0.2
  209. .L_2TAG_PACKET_6.0.2:
  210. movsd 8(%esp), %xmm0
  211. addsd %xmm0, %xmm0
  212. movsd %xmm0, (%esp)
  213. fldl (%esp)
  214. .L_2TAG_PACKET_3.0.2:
  215. movl 52(%esp), %esi
  216. movl %ebp, %esp
  217. popl %ebp
  218. ret
  219. ..B2.3:
  220. .align 16,0x90
  221. .type cbrt,@function
  222. .size cbrt,.-cbrt
  223. .data
  224. # -- End cbrt
  225. .section .rodata, "a"
  226. .align 16
  227. .align 16
  228. static_const_table:
  229. .long 1553778919
  230. .long 3213899486
  231. .long 3534952507
  232. .long 3215266280
  233. .long 1646371399
  234. .long 3214412045
  235. .long 477218588
  236. .long 3216798151
  237. .long 3582521621
  238. .long 1066628362
  239. .long 1007461464
  240. .long 1068473053
  241. .long 889629714
  242. .long 1067378449
  243. .long 1431655765
  244. .long 1070945621
  245. .long 4294967295
  246. .long 1048575
  247. .long 0
  248. .long 0
  249. .long 0
  250. .long 3220193280
  251. .long 0
  252. .long 0
  253. .long 0
  254. .long 3220176896
  255. .long 0
  256. .long 0
  257. .long 0
  258. .long 1032192
  259. .long 0
  260. .long 0
  261. .long 528611360
  262. .long 3220144632
  263. .long 2884679527
  264. .long 3220082993
  265. .long 1991868891
  266. .long 3220024928
  267. .long 2298714891
  268. .long 3219970134
  269. .long 58835168
  270. .long 3219918343
  271. .long 3035110223
  272. .long 3219869313
  273. .long 1617585086
  274. .long 3219822831
  275. .long 2500867033
  276. .long 3219778702
  277. .long 4241943008
  278. .long 3219736752
  279. .long 258732970
  280. .long 3219696825
  281. .long 404232216
  282. .long 3219658776
  283. .long 2172167368
  284. .long 3219622476
  285. .long 1544257904
  286. .long 3219587808
  287. .long 377579543
  288. .long 3219554664
  289. .long 1616385542
  290. .long 3219522945
  291. .long 813783277
  292. .long 3219492562
  293. .long 3940743189
  294. .long 3219463431
  295. .long 2689777499
  296. .long 3219435478
  297. .long 1700977147
  298. .long 3219408632
  299. .long 3169102082
  300. .long 3219382828
  301. .long 327235604
  302. .long 3219358008
  303. .long 1244336319
  304. .long 3219334115
  305. .long 1300311200
  306. .long 3219311099
  307. .long 3095471925
  308. .long 3219288912
  309. .long 2166487928
  310. .long 3219267511
  311. .long 2913108253
  312. .long 3219246854
  313. .long 293672978
  314. .long 3219226904
  315. .long 288737297
  316. .long 3219207624
  317. .long 1810275472
  318. .long 3219188981
  319. .long 174592167
  320. .long 3219170945
  321. .long 3539053052
  322. .long 3219153485
  323. .long 2164392968
  324. .long 3219136576
  325. .long 572345495
  326. .long 1072698681
  327. .long 1998204467
  328. .long 1072709382
  329. .long 3861501553
  330. .long 1072719872
  331. .long 2268192434
  332. .long 1072730162
  333. .long 2981979308
  334. .long 1072740260
  335. .long 270859143
  336. .long 1072750176
  337. .long 2958651392
  338. .long 1072759916
  339. .long 313113243
  340. .long 1072769490
  341. .long 919449400
  342. .long 1072778903
  343. .long 2809328903
  344. .long 1072788162
  345. .long 2222981587
  346. .long 1072797274
  347. .long 2352530781
  348. .long 1072806244
  349. .long 594152517
  350. .long 1072815078
  351. .long 1555767199
  352. .long 1072823780
  353. .long 4282421314
  354. .long 1072832355
  355. .long 2355578597
  356. .long 1072840809
  357. .long 1162590619
  358. .long 1072849145
  359. .long 797864051
  360. .long 1072857367
  361. .long 431273680
  362. .long 1072865479
  363. .long 2669831148
  364. .long 1072873484
  365. .long 733477752
  366. .long 1072881387
  367. .long 4280220604
  368. .long 1072889189
  369. .long 801961634
  370. .long 1072896896
  371. .long 2915370760
  372. .long 1072904508
  373. .long 1159613482
  374. .long 1072912030
  375. .long 2689944798
  376. .long 1072919463
  377. .long 1248687822
  378. .long 1072926811
  379. .long 2967951030
  380. .long 1072934075
  381. .long 630170432
  382. .long 1072941259
  383. .long 3760898254
  384. .long 1072948363
  385. .long 0
  386. .long 1072955392
  387. .long 2370273294
  388. .long 1072962345
  389. .long 1261754802
  390. .long 1072972640
  391. .long 546334065
  392. .long 1072986123
  393. .long 1054893830
  394. .long 1072999340
  395. .long 1571187597
  396. .long 1073012304
  397. .long 1107975175
  398. .long 1073025027
  399. .long 3606909377
  400. .long 1073037519
  401. .long 1113616747
  402. .long 1073049792
  403. .long 4154744632
  404. .long 1073061853
  405. .long 3358931423
  406. .long 1073073713
  407. .long 4060702372
  408. .long 1073085379
  409. .long 747576176
  410. .long 1073096860
  411. .long 3023138255
  412. .long 1073108161
  413. .long 1419988548
  414. .long 1073119291
  415. .long 1914185305
  416. .long 1073130255
  417. .long 294389948
  418. .long 1073141060
  419. .long 3761802570
  420. .long 1073151710
  421. .long 978281566
  422. .long 1073162213
  423. .long 823148820
  424. .long 1073172572
  425. .long 2420954441
  426. .long 1073182792
  427. .long 3815449908
  428. .long 1073192878
  429. .long 2046058587
  430. .long 1073202835
  431. .long 1807524753
  432. .long 1073212666
  433. .long 2628681401
  434. .long 1073222375
  435. .long 3225667357
  436. .long 1073231966
  437. .long 1555307421
  438. .long 1073241443
  439. .long 3454043099
  440. .long 1073250808
  441. .long 1208137896
  442. .long 1073260066
  443. .long 3659916772
  444. .long 1073269218
  445. .long 1886261264
  446. .long 1073278269
  447. .long 3593647839
  448. .long 1073287220
  449. .long 3086012205
  450. .long 1073296075
  451. .long 2769796922
  452. .long 1073304836
  453. .long 888716057
  454. .long 1073317807
  455. .long 2201465623
  456. .long 1073334794
  457. .long 164369365
  458. .long 1073351447
  459. .long 3462666733
  460. .long 1073367780
  461. .long 2773905457
  462. .long 1073383810
  463. .long 1342879088
  464. .long 1073399550
  465. .long 2543933975
  466. .long 1073415012
  467. .long 1684477781
  468. .long 1073430209
  469. .long 3532178543
  470. .long 1073445151
  471. .long 1147747300
  472. .long 1073459850
  473. .long 1928031793
  474. .long 1073474314
  475. .long 2079717015
  476. .long 1073488553
  477. .long 4016765315
  478. .long 1073502575
  479. .long 3670431139
  480. .long 1073516389
  481. .long 3549227225
  482. .long 1073530002
  483. .long 11637607
  484. .long 1073543422
  485. .long 588220169
  486. .long 1073556654
  487. .long 2635407503
  488. .long 1073569705
  489. .long 2042029317
  490. .long 1073582582
  491. .long 1925128962
  492. .long 1073595290
  493. .long 4136375664
  494. .long 1073607834
  495. .long 759964600
  496. .long 1073620221
  497. .long 4257606771
  498. .long 1073632453
  499. .long 297278907
  500. .long 1073644538
  501. .long 3655053093
  502. .long 1073656477
  503. .long 2442253172
  504. .long 1073668277
  505. .long 1111876799
  506. .long 1073679941
  507. .long 3330973139
  508. .long 1073691472
  509. .long 3438879452
  510. .long 1073702875
  511. .long 3671565478
  512. .long 1073714153
  513. .long 1317849547
  514. .long 1073725310
  515. .long 1642364115
  516. .long 1073736348
  517. .long 4050900474
  518. .long 1014427190
  519. .long 1157977860
  520. .long 1016444461
  521. .long 1374568199
  522. .long 1017271387
  523. .long 2809163288
  524. .long 1016882676
  525. .long 3742377377
  526. .long 1013168191
  527. .long 3101606597
  528. .long 1017541672
  529. .long 65224358
  530. .long 1017217597
  531. .long 2691591250
  532. .long 1017266643
  533. .long 4020758549
  534. .long 1017689313
  535. .long 1316310992
  536. .long 1018030788
  537. .long 1031537856
  538. .long 1014090882
  539. .long 3261395239
  540. .long 1016413641
  541. .long 886424999
  542. .long 1016313335
  543. .long 3114776834
  544. .long 1014195875
  545. .long 1681120620
  546. .long 1017825416
  547. .long 1329600273
  548. .long 1016625740
  549. .long 465474623
  550. .long 1017097119
  551. .long 4251633980
  552. .long 1017169077
  553. .long 1986990133
  554. .long 1017710645
  555. .long 752958613
  556. .long 1017159641
  557. .long 2216216792
  558. .long 1018020163
  559. .long 4282860129
  560. .long 1015924861
  561. .long 1557627859
  562. .long 1016039538
  563. .long 3889219754
  564. .long 1018086237
  565. .long 3684996408
  566. .long 1017353275
  567. .long 723532103
  568. .long 1017717141
  569. .long 2951149676
  570. .long 1012528470
  571. .long 831890937
  572. .long 1017830553
  573. .long 1031212645
  574. .long 1017387331
  575. .long 2741737450
  576. .long 1017604974
  577. .long 2863311531
  578. .long 1003776682
  579. .long 4276736099
  580. .long 1013153088
  581. .long 4111778382
  582. .long 1015673686
  583. .long 1728065769
  584. .long 1016413986
  585. .long 2708718031
  586. .long 1018078833
  587. .long 1069335005
  588. .long 1015291224
  589. .long 700037144
  590. .long 1016482032
  591. .long 2904566452
  592. .long 1017226861
  593. .long 4074156649
  594. .long 1017622651
  595. .long 25019565
  596. .long 1015245366
  597. .long 3601952608
  598. .long 1015771755
  599. .long 3267129373
  600. .long 1017904664
  601. .long 503203103
  602. .long 1014921629
  603. .long 2122011730
  604. .long 1018027866
  605. .long 3927295461
  606. .long 1014189456
  607. .long 2790625147
  608. .long 1016024251
  609. .long 1330460186
  610. .long 1016940346
  611. .long 4033568463
  612. .long 1015538390
  613. .long 3695818227
  614. .long 1017509621
  615. .long 257573361
  616. .long 1017208868
  617. .long 3227697852
  618. .long 1017337964
  619. .long 234118548
  620. .long 1017169577
  621. .long 4009025803
  622. .long 1017278524
  623. .long 1948343394
  624. .long 1017749310
  625. .long 678398162
  626. .long 1018144239
  627. .long 3083864863
  628. .long 1016669086
  629. .long 2415453452
  630. .long 1017890370
  631. .long 175467344
  632. .long 1017330033
  633. .long 3197359580
  634. .long 1010339928
  635. .long 2071276951
  636. .long 1015941358
  637. .long 268372543
  638. .long 1016737773
  639. .long 938132959
  640. .long 1017389108
  641. .long 1816750559
  642. .long 1017337448
  643. .long 4119203749
  644. .long 1017152174
  645. .long 2578653878
  646. .long 1013108497
  647. .long 2470331096
  648. .long 1014678606
  649. .long 123855735
  650. .long 1016553320
  651. .long 1265650889
  652. .long 1014782687
  653. .long 3414398172
  654. .long 1017182638
  655. .long 1040773369
  656. .long 1016158401
  657. .long 3483628886
  658. .long 1016886550
  659. .long 4140499405
  660. .long 1016191425
  661. .long 3893477850
  662. .long 1016964495
  663. .long 3935319771
  664. .long 1009634717
  665. .long 2978982660
  666. .long 1015027112
  667. .long 2452709923
  668. .long 1017990229
  669. .long 3190365712
  670. .long 1015835149
  671. .long 4237588139
  672. .long 1015832925
  673. .long 2610678389
  674. .long 1017962711
  675. .long 2127316774
  676. .long 1017405770
  677. .long 824267502
  678. .long 1017959463
  679. .long 2165924042
  680. .long 1017912225
  681. .long 2774007076
  682. .long 1013257418
  683. .long 4123916326
  684. .long 1017582284
  685. .long 1976417958
  686. .long 1016959909
  687. .long 4092806412
  688. .long 1017711279
  689. .long 119251817
  690. .long 1015363631
  691. .long 3475418768
  692. .long 1017675415
  693. .long 1972580503
  694. .long 1015470684
  695. .long 815541017
  696. .long 1017517969
  697. .long 2429917451
  698. .long 1017397776
  699. .long 4062888482
  700. .long 1016749897
  701. .long 68284153
  702. .long 1017925678
  703. .long 2207779246
  704. .long 1016320298
  705. .long 1183466520
  706. .long 1017408657
  707. .long 143326427
  708. .long 1017060403
  709. .long 0
  710. .long 2146435072
  711. .long 0
  712. .long 0
  713. .long 0
  714. .long 4293918720
  715. .long 0
  716. .long 0
  717. .long 0
  718. .long 0
  719. .long 0
  720. .long 0
  721. .long 0
  722. .long 2147483648
  723. .long 0
  724. .long 0
  725. .long 0
  726. .long 1138753536
  727. .long 0
  728. .long 0
  729. .type static_const_table,@object
  730. .size static_const_table,2000
  731. .data
  732. .section .note.GNU-stack, ""
  733. # End