cbrtf_wmt.S 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  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 "cbrtf_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 cbrtf
  59. .text
  60. .align 16,0x90
  61. .globl cbrtf
  62. cbrtf:
  63. # parameter 1: 8 + %ebp
  64. ..B2.1:
  65. ..L3:
  66. ..B2.2:
  67. pushl %ebp
  68. movl %esp, %ebp
  69. subl $104, %esp
  70. movl %esi, 44(%esp)
  71. call static_func
  72. movl %eax, %esi
  73. movss 112(%esp), %xmm0
  74. movss %xmm0, 4(%esp)
  75. movl %ebx, 8(%esp)
  76. movl $8388607, %edx
  77. movd %edx, %xmm5
  78. movl $-1081999360, %ebx
  79. movd %ebx, %xmm3
  80. movl $-1082130432, %ebx
  81. movd %ebx, %xmm1
  82. movl $8257536, %edx
  83. movd %edx, %xmm2
  84. pextrw $1, %xmm0, %ecx
  85. movl %ecx, %eax
  86. andl $124, %ecx
  87. movss 16(%ecx,%esi), %xmm4
  88. shrl $7, %eax
  89. movl $255, %edx
  90. andl %eax, %edx
  91. movl %eax, %ebx
  92. cmpl $0, %edx
  93. je .L_2TAG_PACKET_0.0.2
  94. cmpl $255, %edx
  95. je .L_2TAG_PACKET_1.0.2
  96. andps %xmm0, %xmm2
  97. andps %xmm5, %xmm0
  98. orps %xmm2, %xmm3
  99. orps %xmm0, %xmm1
  100. movss (%esi), %xmm5
  101. movss 4(%esi), %xmm6
  102. movl %edx, %eax
  103. addl %eax, %eax
  104. addl %eax, %eax
  105. addl %edx, %eax
  106. movl %eax, %edx
  107. addl %eax, %eax
  108. addl %eax, %eax
  109. addl %eax, %eax
  110. addl %eax, %eax
  111. addl %eax, %edx
  112. addl %eax, %eax
  113. addl %eax, %eax
  114. addl %eax, %eax
  115. addl %eax, %eax
  116. addl %edx, %eax
  117. movl %ebx, %edx
  118. andl $255, %ebx
  119. subl $1, %ebx
  120. shrl $12, %eax
  121. andl $256, %edx
  122. subl %eax, %ebx
  123. subl %eax, %ebx
  124. subl %eax, %ebx
  125. shll $7, %ebx
  126. addl $85, %eax
  127. orl %edx, %eax
  128. movd %eax, %xmm7
  129. addl %ebx, %ecx
  130. psllq $23, %xmm7
  131. .L_2TAG_PACKET_2.0.2:
  132. movss 8(%esi), %xmm2
  133. movss 12(%esi), %xmm0
  134. subss %xmm3, %xmm1
  135. movaps %xmm7, %xmm3
  136. mulss 144(%ecx,%esi), %xmm7
  137. mulss %xmm4, %xmm1
  138. mulss 528(%ecx,%esi), %xmm3
  139. movss %xmm1, %xmm4
  140. mulss %xmm1, %xmm5
  141. mulss %xmm1, %xmm6
  142. mulss %xmm1, %xmm1
  143. addss %xmm5, %xmm2
  144. addss %xmm6, %xmm0
  145. mulss %xmm1, %xmm2
  146. mulss %xmm7, %xmm4
  147. addss %xmm2, %xmm0
  148. movl 8(%esp), %ebx
  149. mulss %xmm4, %xmm0
  150. addss %xmm3, %xmm0
  151. addss %xmm7, %xmm0
  152. movss %xmm0, (%esp)
  153. flds (%esp)
  154. jmp .L_2TAG_PACKET_3.0.2
  155. .L_2TAG_PACKET_0.0.2:
  156. movq %xmm0, %xmm7
  157. movd %xmm0, %eax
  158. movl %eax, %ebx
  159. shll $9, %eax
  160. movl $23, %ecx
  161. shrl $23, %ebx
  162. .L_2TAG_PACKET_4.0.2:
  163. cmpl $-2147483648, %eax
  164. jae .L_2TAG_PACKET_5.0.2
  165. shll $1, %eax
  166. addl $1, %edx
  167. loop .L_2TAG_PACKET_4.0.2
  168. cmpl $0, %eax
  169. je .L_2TAG_PACKET_6.0.2
  170. .L_2TAG_PACKET_5.0.2:
  171. movl %edx, %ecx
  172. incl %ecx
  173. movd %ecx, %xmm7
  174. orl %edx, %ebx
  175. psllq %xmm7, %xmm0
  176. shrl $24, %eax
  177. andl $124, %eax
  178. movsd 16(%esi,%eax), %xmm4
  179. movl %eax, %ecx
  180. andps %xmm0, %xmm2
  181. andps %xmm5, %xmm0
  182. orps %xmm2, %xmm3
  183. orps %xmm0, %xmm1
  184. movss (%esi), %xmm5
  185. movl $1366, %eax
  186. movss 4(%esi), %xmm6
  187. mull %edx
  188. movl %ebx, %edx
  189. andl $255, %ebx
  190. addl $1, %ebx
  191. shrl $12, %eax
  192. andl $256, %edx
  193. subl %eax, %ebx
  194. subl %eax, %ebx
  195. subl %eax, %ebx
  196. cmpl $0, %ebx
  197. je .L_2TAG_PACKET_7.0.2
  198. incl %eax
  199. subl $3, %ebx
  200. negl %ebx
  201. .L_2TAG_PACKET_7.0.2:
  202. shll $7, %ebx
  203. addl %ebx, %ecx
  204. movl $85, %ebx
  205. subl %eax, %ebx
  206. orl %edx, %ebx
  207. movd %ebx, %xmm7
  208. psllq $23, %xmm7
  209. jmp .L_2TAG_PACKET_2.0.2
  210. .L_2TAG_PACKET_6.0.2:
  211. cmpl $0, %ebx
  212. jne .L_2TAG_PACKET_8.0.2
  213. movl 8(%esp), %ebx
  214. fldl 944(%esi)
  215. jmp .L_2TAG_PACKET_3.0.2
  216. .L_2TAG_PACKET_8.0.2:
  217. movl 8(%esp), %ebx
  218. fldl 960(%esi)
  219. jmp .L_2TAG_PACKET_3.0.2
  220. .L_2TAG_PACKET_1.0.2:
  221. movl 8(%esp), %ebx
  222. movl 4(%esp), %eax
  223. movl %eax, %ecx
  224. andl $2147483647, %ecx
  225. cmpl $2139095040, %ecx
  226. ja .L_2TAG_PACKET_9.0.2
  227. cmpl $2139095040, %eax
  228. jne .L_2TAG_PACKET_10.0.2
  229. fldl 912(%esi)
  230. jmp .L_2TAG_PACKET_3.0.2
  231. .L_2TAG_PACKET_10.0.2:
  232. fldl 928(%esi)
  233. jmp .L_2TAG_PACKET_3.0.2
  234. .L_2TAG_PACKET_9.0.2:
  235. movss 4(%esp), %xmm0
  236. addss %xmm0, %xmm0
  237. movss %xmm0, (%esp)
  238. flds (%esp)
  239. .L_2TAG_PACKET_3.0.2:
  240. movl 44(%esp), %esi
  241. movl %ebp, %esp
  242. popl %ebp
  243. ret
  244. ..B2.3:
  245. .align 16,0x90
  246. .type cbrtf,@function
  247. .size cbrtf,.-cbrtf
  248. .data
  249. # -- End cbrtf
  250. .section .rodata, "a"
  251. .align 16
  252. .align 16
  253. static_const_table:
  254. .long 3173551943
  255. .long 3185806905
  256. .long 1031591658
  257. .long 1051372203
  258. .long 3212578753
  259. .long 3212085645
  260. .long 3211621124
  261. .long 3211182772
  262. .long 3210768440
  263. .long 3210376206
  264. .long 3210004347
  265. .long 3209651317
  266. .long 3209315720
  267. .long 3208996296
  268. .long 3208691905
  269. .long 3208401508
  270. .long 3208124163
  271. .long 3207859009
  272. .long 3207605259
  273. .long 3207362194
  274. .long 3207129151
  275. .long 3206905525
  276. .long 3206690755
  277. .long 3206484326
  278. .long 3206285761
  279. .long 3206094618
  280. .long 3205910490
  281. .long 3205732998
  282. .long 3205561788
  283. .long 3205396533
  284. .long 3205236929
  285. .long 3205082689
  286. .long 3204933547
  287. .long 3204789256
  288. .long 3204649583
  289. .long 3204514308
  290. .long 1065396681
  291. .long 1065482291
  292. .long 1065566215
  293. .long 1065648532
  294. .long 1065729317
  295. .long 1065808640
  296. .long 1065886565
  297. .long 1065963152
  298. .long 1066038457
  299. .long 1066112533
  300. .long 1066185428
  301. .long 1066257188
  302. .long 1066327857
  303. .long 1066397474
  304. .long 1066466079
  305. .long 1066533708
  306. .long 1066600394
  307. .long 1066666169
  308. .long 1066731064
  309. .long 1066795108
  310. .long 1066858329
  311. .long 1066920751
  312. .long 1066982401
  313. .long 1067043301
  314. .long 1067103474
  315. .long 1067162941
  316. .long 1067221722
  317. .long 1067279837
  318. .long 1067337305
  319. .long 1067394143
  320. .long 1067450368
  321. .long 1067505996
  322. .long 1067588354
  323. .long 1067696217
  324. .long 1067801953
  325. .long 1067905666
  326. .long 1068007450
  327. .long 1068107390
  328. .long 1068205570
  329. .long 1068302063
  330. .long 1068396942
  331. .long 1068490271
  332. .long 1068582113
  333. .long 1068672525
  334. .long 1068761562
  335. .long 1068849275
  336. .long 1068935712
  337. .long 1069020919
  338. .long 1069104937
  339. .long 1069187809
  340. .long 1069269572
  341. .long 1069350263
  342. .long 1069429915
  343. .long 1069508563
  344. .long 1069586236
  345. .long 1069662966
  346. .long 1069738778
  347. .long 1069813702
  348. .long 1069887762
  349. .long 1069960982
  350. .long 1070033387
  351. .long 1070104998
  352. .long 1070175837
  353. .long 1070245925
  354. .long 1070349689
  355. .long 1070485588
  356. .long 1070618808
  357. .long 1070749478
  358. .long 1070877717
  359. .long 1071003634
  360. .long 1071127332
  361. .long 1071248907
  362. .long 1071368446
  363. .long 1071486034
  364. .long 1071601747
  365. .long 1071715659
  366. .long 1071827839
  367. .long 1071938350
  368. .long 1072047254
  369. .long 1072154608
  370. .long 1072260465
  371. .long 1072364876
  372. .long 1072467891
  373. .long 1072569555
  374. .long 1072669911
  375. .long 1072769001
  376. .long 1072866863
  377. .long 1072963536
  378. .long 1073059054
  379. .long 1073153452
  380. .long 1073246762
  381. .long 1073339014
  382. .long 1073430238
  383. .long 1073520462
  384. .long 1073609714
  385. .long 1073698019
  386. .long 839340838
  387. .long 867750258
  388. .long 851786446
  389. .long 853949398
  390. .long 864938789
  391. .long 864102364
  392. .long 864209792
  393. .long 865422805
  394. .long 867593594
  395. .long 854482593
  396. .long 848298042
  397. .long 860064854
  398. .long 844792593
  399. .long 870701309
  400. .long 872023170
  401. .long 860255342
  402. .long 849966899
  403. .long 863561479
  404. .long 869115319
  405. .long 871961375
  406. .long 859537336
  407. .long 871954398
  408. .long 863817578
  409. .long 861687921
  410. .long 849594757
  411. .long 816486846
  412. .long 858183533
  413. .long 864500406
  414. .long 850523240
  415. .long 808125243
  416. .long 514020693
  417. .long 861173761
  418. .long 859000219
  419. .long 823158129
  420. .long 871826232
  421. .long 871183196
  422. .long 839030530
  423. .long 867690638
  424. .long 840440923
  425. .long 868033274
  426. .long 855856030
  427. .long 865094453
  428. .long 860418487
  429. .long 866225006
  430. .long 866458226
  431. .long 865124659
  432. .long 864837702
  433. .long 811742505
  434. .long 869432099
  435. .long 864584201
  436. .long 864183978
  437. .long 844810573
  438. .long 869245699
  439. .long 859556409
  440. .long 870675446
  441. .long 814190139
  442. .long 870686941
  443. .long 861800510
  444. .long 855649163
  445. .long 869347119
  446. .long 864252033
  447. .long 867276215
  448. .long 868189817
  449. .long 849541095
  450. .long 866633177
  451. .long 843967686
  452. .long 857522493
  453. .long 862339487
  454. .long 850054662
  455. .long 864048556
  456. .long 868027089
  457. .long 848093931
  458. .long 865355299
  459. .long 848111485
  460. .long 865557362
  461. .long 870297525
  462. .long 863416216
  463. .long 869675693
  464. .long 865888071
  465. .long 825332584
  466. .long 843309506
  467. .long 870885636
  468. .long 869119784
  469. .long 865466648
  470. .long 867459244
  471. .long 861192764
  472. .long 871247716
  473. .long 864927982
  474. .long 869195129
  475. .long 864849564
  476. .long 840005936
  477. .long 852579258
  478. .long 860852782
  479. .long 869711141
  480. .long 862506141
  481. .long 837959274
  482. .long 0
  483. .long 2146435072
  484. .long 0
  485. .long 0
  486. .long 0
  487. .long 4293918720
  488. .long 0
  489. .long 0
  490. .long 0
  491. .long 0
  492. .long 0
  493. .long 0
  494. .long 0
  495. .long 2147483648
  496. .long 0
  497. .long 0
  498. .type static_const_table,@object
  499. .size static_const_table,976
  500. .data
  501. .section .note.GNU-stack, ""
  502. # End