erf.S 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583
  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 "erf.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin erf
  41. .text
  42. .align 16,0x90
  43. .globl erf
  44. erf:
  45. # parameter 1: 8 + %ebp
  46. ..B1.1:
  47. ..L1:
  48. pushl %ebp
  49. movl %esp, %ebp
  50. andl $-16, %esp
  51. pushl %esi
  52. pushl %edi
  53. subl $24, %esp
  54. ..B1.2:
  55. fnstcw 14(%esp)
  56. ..B1.3:
  57. movl 12(%ebp), %ecx
  58. movl %ecx, %eax
  59. andl $-2147483648, %eax
  60. andl $2147483647, %ecx
  61. orl $1065353216, %eax
  62. movl %eax, 16(%esp)
  63. cmpl $1075298304, %ecx
  64. flds 16(%esp)
  65. movl 8(%ebp), %esi
  66. fstpt (%esp)
  67. call ..L2
  68. ..L2:
  69. popl %edx
  70. lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx
  71. jge ..B1.11
  72. ..B1.4:
  73. movzwl 14(%esp), %esi
  74. movl %esi, %eax
  75. andl $768, %eax
  76. cmpl $768, %eax
  77. je ..B1.15
  78. ..B1.5:
  79. orl $-64768, %esi
  80. movw %si, 12(%esp)
  81. ..B1.6:
  82. fldcw 12(%esp)
  83. ..B1.7:
  84. movl $1, %eax
  85. ..B1.8:
  86. fldl 8(%ebp)
  87. lea -1074331648(%ecx), %esi
  88. shrl $20, %ecx
  89. fabs
  90. fldt (%esp)
  91. addl $-1021, %ecx
  92. cmpl $458751, %esi
  93. ja ..L3
  94. movl $5, %ecx
  95. ..L3:
  96. testl %ecx, %ecx
  97. jg ..L4
  98. movl $0, %ecx
  99. ..L4:
  100. movl %ecx, %edi
  101. lea (%ecx,%ecx,2), %esi
  102. shll $4, %edi
  103. shll $7, %ecx
  104. shll $4, %esi
  105. testl %eax, %eax
  106. fxch %st(1)
  107. fmull erfRRTable@GOTOFF(%edi,%edx)
  108. fldl 120+_dbA@GOTOFF(%edx,%ecx)
  109. fldt 36+_ldbA@GOTOFF(%edx,%esi)
  110. fldt 24+_ldbA@GOTOFF(%edx,%esi)
  111. fldt 12+_ldbA@GOTOFF(%edx,%esi)
  112. fldt _ldbA@GOTOFF(%edx,%esi)
  113. fxch %st(5)
  114. faddl 8+erfRRTable@GOTOFF(%edx,%edi)
  115. fmul %st, %st(4)
  116. fxch %st(4)
  117. faddl 112+_dbA@GOTOFF(%edx,%ecx)
  118. fmul %st(4), %st
  119. faddl 104+_dbA@GOTOFF(%edx,%ecx)
  120. fmul %st(4), %st
  121. faddl 96+_dbA@GOTOFF(%edx,%ecx)
  122. fmul %st(4), %st
  123. faddl 88+_dbA@GOTOFF(%edx,%ecx)
  124. fmul %st(4), %st
  125. faddl 80+_dbA@GOTOFF(%edx,%ecx)
  126. fmul %st(4), %st
  127. faddl 72+_dbA@GOTOFF(%edx,%ecx)
  128. fmul %st(4), %st
  129. faddl 64+_dbA@GOTOFF(%edx,%ecx)
  130. fmul %st(4), %st
  131. faddl 56+_dbA@GOTOFF(%edx,%ecx)
  132. fmul %st(4), %st
  133. faddl 48+_dbA@GOTOFF(%edx,%ecx)
  134. fmul %st(4), %st
  135. faddl 40+_dbA@GOTOFF(%edx,%ecx)
  136. fmul %st(4), %st
  137. faddl 32+_dbA@GOTOFF(%edx,%ecx)
  138. fmul %st(4), %st
  139. faddl 24+_dbA@GOTOFF(%edx,%ecx)
  140. fmul %st(4), %st
  141. faddl 16+_dbA@GOTOFF(%edx,%ecx)
  142. fmul %st(4), %st
  143. faddl 8+_dbA@GOTOFF(%edx,%ecx)
  144. fmul %st(4), %st
  145. faddl _dbA@GOTOFF(%edx,%ecx)
  146. fmul %st(4), %st
  147. faddp %st, %st(3)
  148. fxch %st(2)
  149. fmul %st(3), %st
  150. faddp %st, %st(1)
  151. fmul %st(2), %st
  152. faddp %st, %st(1)
  153. fmulp %st, %st(1)
  154. faddp %st, %st(1)
  155. fmulp %st, %st(1)
  156. fstpt (%esp)
  157. je ..B1.10
  158. ..B1.9:
  159. fldcw 14(%esp)
  160. ..B1.10:
  161. fldt (%esp)
  162. addl $24, %esp
  163. popl %edi
  164. popl %esi
  165. movl %ebp, %esp
  166. popl %ebp
  167. ret
  168. ..B1.11:
  169. cmpl $2146435072, %ecx
  170. jl ..B1.14
  171. ..B1.12:
  172. je ..B1.16
  173. ..B1.13:
  174. fldl 8(%ebp)
  175. fadd %st(0), %st
  176. addl $24, %esp
  177. popl %edi
  178. popl %esi
  179. movl %ebp, %esp
  180. popl %ebp
  181. ret
  182. ..B1.14:
  183. fldl 768+_dbA@GOTOFF(%edx)
  184. fldl 776+_dbA@GOTOFF(%edx)
  185. fldt (%esp)
  186. fmul %st, %st(2)
  187. fmulp %st, %st(1)
  188. faddp %st, %st(1)
  189. addl $24, %esp
  190. popl %edi
  191. popl %esi
  192. movl %ebp, %esp
  193. popl %ebp
  194. ret
  195. ..B1.15:
  196. xorl %eax, %eax
  197. jmp ..B1.8
  198. ..B1.16:
  199. testl %esi, %esi
  200. jne ..B1.13
  201. ..B1.17:
  202. fldt (%esp)
  203. addl $24, %esp
  204. popl %edi
  205. popl %esi
  206. movl %ebp, %esp
  207. popl %ebp
  208. ret
  209. .align 16,0x90
  210. .type erf,@function
  211. .size erf,.-erf
  212. .data
  213. # -- End erf
  214. .section .rodata, "a"
  215. .align 16
  216. .align 16
  217. erfRRTable:
  218. .long 0x00000000,0x3ff00000
  219. .long 0x00000000,0x00000000
  220. .long 0x00000000,0x40000000
  221. .long 0x00000000,0xbff80000
  222. .long 0x00000000,0x3ff00000
  223. .long 0x00000000,0xbff80000
  224. .long 0x00000000,0x3fe00000
  225. .long 0x00000000,0xbff80000
  226. .long 0x00000000,0x3fd00000
  227. .long 0x00000000,0xbff80000
  228. .long 0x00000000,0x3ff00000
  229. .long 0x00000000,0xc00d0000
  230. .type erfRRTable,@object
  231. .size erfRRTable,96
  232. .align 16
  233. _dbA:
  234. .long 0
  235. .long 0
  236. .long 436480805
  237. .long 1069343474
  238. .long 0
  239. .long 0
  240. .long 824702180
  241. .long 3214639822
  242. .long 0
  243. .long 0
  244. .long 3500778474
  245. .long 1064658364
  246. .long 0
  247. .long 0
  248. .long 596585212
  249. .long 3209429723
  250. .long 0
  251. .long 0
  252. .long 1470240973
  253. .long 1059035690
  254. .long 0
  255. .long 0
  256. .long 718843426
  257. .long 3203353528
  258. .long 0
  259. .long 0
  260. .long 2710426178
  261. .long 1052473157
  262. .long 0
  263. .long 0
  264. .long 3010232270
  265. .long 3196296923
  266. .long 3936437656
  267. .long 1065568693
  268. .long 2299323409
  269. .long 3210429089
  270. .long 2523607943
  271. .long 3208348791
  272. .long 2965083678
  273. .long 1059250351
  274. .long 798914934
  275. .long 1055054643
  276. .long 3446493953
  277. .long 3202367749
  278. .long 3957742900
  279. .long 1049125428
  280. .long 3166330044
  281. .long 1049915994
  282. .long 2437497479
  283. .long 3193689582
  284. .long 3701813711
  285. .long 3192118067
  286. .long 4254294173
  287. .long 1041707319
  288. .long 3041595886
  289. .long 1039011503
  290. .long 177055818
  291. .long 3184215269
  292. .long 4076941640
  293. .long 3180389574
  294. .long 3283211378
  295. .long 1031330936
  296. .long 2299430385
  297. .long 1025878376
  298. .long 1560943562
  299. .long 3215381929
  300. .long 649600356
  301. .long 3213783607
  302. .long 1925487767
  303. .long 1066650173
  304. .long 2787104668
  305. .long 3212012915
  306. .long 3819886810
  307. .long 3210959588
  308. .long 3292869653
  309. .long 1062994816
  310. .long 595535285
  311. .long 3206044511
  312. .long 2833470226
  313. .long 3207638255
  314. .long 3150087827
  315. .long 1058299310
  316. .long 4226975388
  317. .long 1056101349
  318. .long 3511121228
  319. .long 3203239297
  320. .long 4191453678
  321. .long 1050931364
  322. .long 2398545468
  323. .long 1052356106
  324. .long 1036696996
  325. .long 3197521914
  326. .long 406902450
  327. .long 3195737434
  328. .long 932124879
  329. .long 1046963798
  330. .long 2984826674
  331. .long 3213958277
  332. .long 1416337143
  333. .long 1067493301
  334. .long 1528223327
  335. .long 3215470371
  336. .long 2077734896
  337. .long 1068079284
  338. .long 500891590
  339. .long 3215043166
  340. .long 1614001607
  341. .long 1065167414
  342. .long 397732724
  343. .long 1066426356
  344. .long 245285475
  345. .long 3214320360
  346. .long 2942435727
  347. .long 1065970365
  348. .long 2515085614
  349. .long 1062242098
  350. .long 2059023426
  351. .long 3212710123
  352. .long 3590542062
  353. .long 1064841017
  354. .long 1069940521
  355. .long 1062119991
  356. .long 329470371
  357. .long 1062390329
  358. .long 2904189456
  359. .long 1064709094
  360. .long 1072026573
  361. .long 1063487818
  362. .long 2999885720
  363. .long 3188887951
  364. .long 3321998034
  365. .long 3194165661
  366. .long 778559078
  367. .long 3198831619
  368. .long 4123899724
  369. .long 3202964980
  370. .long 708728771
  371. .long 3206666523
  372. .long 2191638927
  373. .long 3209872513
  374. .long 2647513773
  375. .long 3212706538
  376. .long 349076715
  377. .long 3215092788
  378. .long 3464000864
  379. .long 3217125251
  380. .long 2469419808
  381. .long 3218694220
  382. .long 396951367
  383. .long 3219923315
  384. .long 545534675
  385. .long 3220654754
  386. .long 3101724493
  387. .long 3220952863
  388. .long 496398401
  389. .long 3220607311
  390. .long 1221104108
  391. .long 3219519496
  392. .long 4256169036
  393. .long 3217191486
  394. .long 2904280702
  395. .long 3204470624
  396. .long 1218817182
  397. .long 1057276414
  398. .long 54035796
  399. .long 3204757890
  400. .long 4162943463
  401. .long 1056998848
  402. .long 3226000836
  403. .long 3203731619
  404. .long 1250945068
  405. .long 1055200853
  406. .long 1745105165
  407. .long 3201249698
  408. .long 1720233031
  409. .long 1051395895
  410. .long 2751609749
  411. .long 1047829350
  412. .long 3766093227
  413. .long 3196386836
  414. .long 2511730864
  415. .long 1047725585
  416. .long 1042659329
  417. .long 3192914318
  418. .long 2981264223
  419. .long 3189366070
  420. .long 673045009
  421. .long 1042560833
  422. .long 421746295
  423. .long 3188353310
  424. .long 3454229363
  425. .long 3184015574
  426. .long 4294967295
  427. .long 1072693247
  428. .long 0
  429. .long 1017102336
  430. .type _dbA,@object
  431. .size _dbA,784
  432. .align 16
  433. _ldbA:
  434. .word 0
  435. .word 0
  436. .word 0
  437. .word 0
  438. .word 0
  439. .word 0
  440. .word 26765
  441. .word 5339
  442. .word 47746
  443. .word 36974
  444. .word 16383
  445. .word 0
  446. .word 0
  447. .word 0
  448. .word 0
  449. .word 0
  450. .word 0
  451. .word 0
  452. .word 13107
  453. .word 7119
  454. .word 41816
  455. .word 49299
  456. .word 49149
  457. .word 0
  458. .word 64355
  459. .word 59506
  460. .word 19372
  461. .word 46606
  462. .word 16382
  463. .word 0
  464. .word 9448
  465. .word 50838
  466. .word 8555
  467. .word 42135
  468. .word 16381
  469. .word 0
  470. .word 14173
  471. .word 43489
  472. .word 45601
  473. .word 63202
  474. .word 49147
  475. .word 0
  476. .word 56288
  477. .word 45938
  478. .word 11407
  479. .word 56180
  480. .word 16374
  481. .word 0
  482. .word 64911
  483. .word 39894
  484. .word 43704
  485. .word 63314
  486. .word 16382
  487. .word 0
  488. .word 18164
  489. .word 49445
  490. .word 47413
  491. .word 62353
  492. .word 16379
  493. .word 0
  494. .word 62471
  495. .word 20699
  496. .word 19176
  497. .word 46765
  498. .word 49148
  499. .word 0
  500. .word 45860
  501. .word 23381
  502. .word 351
  503. .word 36373
  504. .word 16380
  505. .word 0
  506. .word 52190
  507. .word 2479
  508. .word 36194
  509. .word 65534
  510. .word 16382
  511. .word 0
  512. .word 53234
  513. .word 6547
  514. .word 29917
  515. .word 37380
  516. .word 16371
  517. .word 0
  518. .word 61321
  519. .word 42597
  520. .word 44875
  521. .word 56070
  522. .word 49141
  523. .word 0
  524. .word 35023
  525. .word 36587
  526. .word 42382
  527. .word 52955
  528. .word 16375
  529. .word 0
  530. .word 65130
  531. .word 65535
  532. .word 65535
  533. .word 65535
  534. .word 16382
  535. .word 0
  536. .word 49987
  537. .word 10941
  538. .word 20175
  539. .word 44229
  540. .word 16331
  541. .word 0
  542. .word 45301
  543. .word 36641
  544. .word 152
  545. .word 62959
  546. .word 49108
  547. .word 0
  548. .word 7729
  549. .word 55572
  550. .word 4515
  551. .word 43787
  552. .word 49115
  553. .word 0
  554. .word 12218
  555. .word 25069
  556. .word 64268
  557. .word 65535
  558. .word 16382
  559. .word 0
  560. .word 39514
  561. .word 2562
  562. .word 14458
  563. .word 38069
  564. .word 16364
  565. .word 0
  566. .word 36514
  567. .word 39186
  568. .word 15150
  569. .word 34500
  570. .word 49134
  571. .word 0
  572. .word 9125
  573. .word 14475
  574. .word 36819
  575. .word 40101
  576. .word 16367
  577. .word 0
  578. .type _ldbA,@object
  579. .size _ldbA,288
  580. .data
  581. .section .note.GNU-stack, ""
  582. # End