erfcf.S 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635
  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 "erfcf.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin erfcf
  41. .text
  42. .align 16,0x90
  43. .globl erfcf
  44. erfcf:
  45. # parameter 1: 8 + %ebp
  46. ..B1.1:
  47. ..L1:
  48. pushl %ebp
  49. movl %esp, %ebp
  50. andl $-64, %esp
  51. pushl %edi
  52. pushl %ebx
  53. subl $56, %esp
  54. movl 8(%ebp), %edi
  55. movl %edi, %eax
  56. andl $2147483647, %eax
  57. shrl $31, %edi
  58. call ..L2
  59. ..L2:
  60. popl %ebx
  61. lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx
  62. cmpl $2139095040, %eax
  63. jae ..B1.24
  64. ..B1.2:
  65. cmpl range@GOTOFF(%ebx,%edi,4), %eax
  66. jae ..B1.21
  67. ..B1.3:
  68. cmpl $1081081856, %eax
  69. jae ..B1.15
  70. ..B1.4:
  71. cmpl $1073741824, %eax
  72. jae ..B1.11
  73. ..B1.5:
  74. cmpl $1056964608, %eax
  75. jae ..B1.10
  76. ..B1.6:
  77. flds 8(%ebp)
  78. cmpl $847249408, %eax
  79. jae ..B1.8
  80. ..B1.7:
  81. fld1
  82. fsubp %st, %st(1)
  83. addl $56, %esp
  84. popl %ebx
  85. popl %edi
  86. movl %ebp, %esp
  87. popl %ebp
  88. ret
  89. ..B1.8:
  90. fldl 40+_A@GOTOFF(%ebx)
  91. fld %st(1)
  92. fmul %st(2), %st
  93. fld %st(0)
  94. fmul %st(1), %st
  95. fmul %st, %st(2)
  96. fld1
  97. fxch %st(3)
  98. faddl 24+_A@GOTOFF(%ebx)
  99. fmul %st(1), %st
  100. fldl 48+_A@GOTOFF(%ebx)
  101. fmul %st(2), %st
  102. fxch %st(1)
  103. faddl 8+_A@GOTOFF(%ebx)
  104. fmulp %st, %st(3)
  105. fxch %st(2)
  106. fmul %st(4), %st
  107. faddp %st, %st(3)
  108. fxch %st(1)
  109. faddl 32+_A@GOTOFF(%ebx)
  110. fmul %st(1), %st
  111. faddl 16+_A@GOTOFF(%ebx)
  112. fmulp %st, %st(1)
  113. faddl _A@GOTOFF(%ebx)
  114. fmulp %st, %st(2)
  115. faddp %st, %st(1)
  116. ..B1.9:
  117. addl $56, %esp
  118. popl %ebx
  119. popl %edi
  120. movl %ebp, %esp
  121. popl %ebp
  122. ret
  123. ..B1.10:
  124. flds 8(%ebp)
  125. fabs
  126. fld1
  127. fsubrp %st, %st(1)
  128. fld %st(0)
  129. fmul %st(1), %st
  130. fldl 48+_AP@GOTOFF(%ebx)
  131. fmul %st(1), %st
  132. fldl 56+_AP@GOTOFF(%ebx)
  133. fmul %st(2), %st
  134. fxch %st(1)
  135. faddl 32+_AP@GOTOFF(%ebx)
  136. fmul %st(2), %st
  137. fxch %st(1)
  138. faddl 40+_AP@GOTOFF(%ebx)
  139. fmul %st(2), %st
  140. fxch %st(1)
  141. faddl 16+_AP@GOTOFF(%ebx)
  142. fmul %st(2), %st
  143. fxch %st(1)
  144. faddl 24+_AP@GOTOFF(%ebx)
  145. fmul %st(2), %st
  146. fxch %st(1)
  147. faddl _AP@GOTOFF(%ebx)
  148. fldl 48+_AQ@GOTOFF(%ebx)
  149. fmul %st(3), %st
  150. fxch %st(2)
  151. faddl 8+_AP@GOTOFF(%ebx)
  152. fmul %st(4), %st
  153. faddp %st, %st(1)
  154. fldl 56+_AQ@GOTOFF(%ebx)
  155. fmul %st(3), %st
  156. fxch %st(2)
  157. faddl 32+_AQ@GOTOFF(%ebx)
  158. fmul %st(3), %st
  159. fxch %st(2)
  160. faddl 40+_AQ@GOTOFF(%ebx)
  161. fmul %st(3), %st
  162. fxch %st(2)
  163. faddl 16+_AQ@GOTOFF(%ebx)
  164. fmul %st(3), %st
  165. fxch %st(2)
  166. faddl 24+_AQ@GOTOFF(%ebx)
  167. fmulp %st, %st(3)
  168. fxch %st(1)
  169. faddl _AQ@GOTOFF(%ebx)
  170. fxch %st(2)
  171. faddl 8+_AQ@GOTOFF(%ebx)
  172. fmulp %st, %st(3)
  173. fxch %st(2)
  174. faddp %st, %st(1)
  175. fdivrp %st, %st(1)
  176. fmuls _ones@GOTOFF(%ebx,%edi,4)
  177. faddl _erfc1@GOTOFF(%ebx,%edi,8)
  178. addl $56, %esp
  179. popl %ebx
  180. popl %edi
  181. movl %ebp, %esp
  182. popl %ebp
  183. ret
  184. ..B1.11:
  185. flds 8(%ebp)
  186. testl %edi, %edi
  187. fabs
  188. faddl .L_2il0floatpacket.2@GOTOFF(%ebx)
  189. fld %st(0)
  190. fmul %st(1), %st
  191. je ..B1.13
  192. ..B1.12:
  193. fldl 48+_BP1@GOTOFF(%ebx)
  194. fmul %st(1), %st
  195. fldl 40+_BP1@GOTOFF(%ebx)
  196. fmul %st(2), %st
  197. fxch %st(1)
  198. faddl 32+_BP1@GOTOFF(%ebx)
  199. fmul %st(2), %st
  200. fxch %st(1)
  201. faddl 24+_BP1@GOTOFF(%ebx)
  202. fmul %st(2), %st
  203. fxch %st(1)
  204. faddl 16+_BP1@GOTOFF(%ebx)
  205. fmul %st(2), %st
  206. fxch %st(1)
  207. faddl 8+_BP1@GOTOFF(%ebx)
  208. fmul %st(3), %st
  209. fxch %st(1)
  210. faddl _BP1@GOTOFF(%ebx)
  211. fldl 48+_BQ1@GOTOFF(%ebx)
  212. fmul %st(3), %st
  213. fldl 40+_BQ1@GOTOFF(%ebx)
  214. fmul %st(4), %st
  215. fxch %st(1)
  216. faddl 32+_BQ1@GOTOFF(%ebx)
  217. fmul %st(4), %st
  218. fxch %st(1)
  219. faddl 24+_BQ1@GOTOFF(%ebx)
  220. fmul %st(4), %st
  221. fxch %st(1)
  222. faddl 16+_BQ1@GOTOFF(%ebx)
  223. fmulp %st, %st(4)
  224. faddl 8+_BQ1@GOTOFF(%ebx)
  225. fmulp %st, %st(4)
  226. fxch %st(2)
  227. faddl _BQ1@GOTOFF(%ebx)
  228. fxch %st(2)
  229. jmp ..B1.14
  230. ..B1.13:
  231. fldl 80+_BP2@GOTOFF(%ebx)
  232. fmul %st(1), %st
  233. fldl 88+_BP2@GOTOFF(%ebx)
  234. fmul %st(2), %st
  235. fxch %st(1)
  236. faddl 64+_BP2@GOTOFF(%ebx)
  237. fmul %st(2), %st
  238. fxch %st(1)
  239. faddl 72+_BP2@GOTOFF(%ebx)
  240. fmul %st(2), %st
  241. fxch %st(1)
  242. faddl 48+_BP2@GOTOFF(%ebx)
  243. fmul %st(2), %st
  244. fxch %st(1)
  245. faddl 56+_BP2@GOTOFF(%ebx)
  246. fmul %st(2), %st
  247. fxch %st(1)
  248. faddl 32+_BP2@GOTOFF(%ebx)
  249. fmul %st(2), %st
  250. fxch %st(1)
  251. faddl 40+_BP2@GOTOFF(%ebx)
  252. fmul %st(2), %st
  253. fxch %st(1)
  254. faddl 16+_BP2@GOTOFF(%ebx)
  255. fmul %st(2), %st
  256. fxch %st(1)
  257. faddl 24+_BP2@GOTOFF(%ebx)
  258. fmul %st(2), %st
  259. fxch %st(1)
  260. faddl _BP2@GOTOFF(%ebx)
  261. fldl 64+_BQ2@GOTOFF(%ebx)
  262. fmul %st(3), %st
  263. fxch %st(2)
  264. faddl 8+_BP2@GOTOFF(%ebx)
  265. fmul %st(4), %st
  266. fxch %st(2)
  267. faddl 48+_BQ2@GOTOFF(%ebx)
  268. fmul %st(3), %st
  269. fldl 56+_BQ2@GOTOFF(%ebx)
  270. fmul %st(4), %st
  271. fxch %st(1)
  272. faddl 32+_BQ2@GOTOFF(%ebx)
  273. fmul %st(4), %st
  274. fxch %st(1)
  275. faddl 40+_BQ2@GOTOFF(%ebx)
  276. fmul %st(4), %st
  277. fxch %st(1)
  278. faddl 16+_BQ2@GOTOFF(%ebx)
  279. fmul %st(4), %st
  280. fxch %st(1)
  281. faddl 24+_BQ2@GOTOFF(%ebx)
  282. fmulp %st, %st(4)
  283. faddl _BQ2@GOTOFF(%ebx)
  284. fxch %st(3)
  285. faddl 8+_BQ2@GOTOFF(%ebx)
  286. fmulp %st, %st(4)
  287. ..B1.14:
  288. faddp %st, %st(1)
  289. fxch %st(2)
  290. faddp %st, %st(1)
  291. fdivrp %st, %st(1)
  292. fmuls _ones@GOTOFF(%ebx,%edi,4)
  293. faddl _erfc4@GOTOFF(%ebx,%edi,8)
  294. addl $56, %esp
  295. popl %ebx
  296. popl %edi
  297. movl %ebp, %esp
  298. popl %ebp
  299. ret
  300. ..B1.15:
  301. flds 8(%ebp)
  302. fabs
  303. fld1
  304. fdiv %st(1), %st
  305. fstpl 24(%esp)
  306. fmul %st(0), %st
  307. fchs
  308. fstpl (%esp)
  309. call __libm_exp_k32
  310. ..B1.16:
  311. fldl 24(%esp)
  312. testl %edi, %edi
  313. fmul %st, %st(1)
  314. fmul %st(0), %st
  315. fld %st(0)
  316. fmul %st(1), %st
  317. fldl 56+_R1@GOTOFF(%ebx)
  318. fmul %st(1), %st
  319. fldl 48+_R1@GOTOFF(%ebx)
  320. fmul %st(2), %st
  321. fxch %st(1)
  322. faddl 40+_R1@GOTOFF(%ebx)
  323. fmul %st(2), %st
  324. fxch %st(1)
  325. faddl 32+_R1@GOTOFF(%ebx)
  326. fmul %st(2), %st
  327. fxch %st(1)
  328. faddl 24+_R1@GOTOFF(%ebx)
  329. fmul %st(2), %st
  330. fxch %st(1)
  331. faddl 16+_R1@GOTOFF(%ebx)
  332. fmulp %st, %st(2)
  333. faddl 8+_R1@GOTOFF(%ebx)
  334. fmulp %st, %st(2)
  335. faddl _R1@GOTOFF(%ebx)
  336. faddp %st, %st(1)
  337. fmulp %st, %st(1)
  338. jne ..B1.20
  339. ..B1.17:
  340. fsts 20(%esp)
  341. cmpl $8388608, 20(%esp)
  342. jl ..B1.28
  343. ..B1.19:
  344. addl $56, %esp
  345. popl %ebx
  346. popl %edi
  347. movl %ebp, %esp
  348. popl %ebp
  349. ret
  350. ..B1.20:
  351. fsubrs .L_2il0floatpacket.0@GOTOFF(%ebx)
  352. addl $56, %esp
  353. popl %ebx
  354. popl %edi
  355. movl %ebp, %esp
  356. popl %ebp
  357. ret
  358. ..B1.21:
  359. testl %edi, %edi
  360. je ..B1.29
  361. ..B1.22:
  362. flds .L_2il0floatpacket.0@GOTOFF(%ebx)
  363. ..B1.23:
  364. addl $56, %esp
  365. popl %ebx
  366. popl %edi
  367. movl %ebp, %esp
  368. popl %ebp
  369. ret
  370. ..B1.24:
  371. jne ..B1.26
  372. ..B1.25:
  373. flds zero_two@GOTOFF(%ebx,%edi,4)
  374. addl $56, %esp
  375. popl %ebx
  376. popl %edi
  377. movl %ebp, %esp
  378. popl %ebp
  379. ret
  380. ..B1.26:
  381. flds 8(%ebp)
  382. ..B1.27:
  383. addl $56, %esp
  384. popl %ebx
  385. popl %edi
  386. movl %ebp, %esp
  387. popl %ebp
  388. ret
  389. ..B1.28:
  390. fstp %st(0)
  391. flds .L_2il0floatpacket.1@GOTOFF(%ebx)
  392. fmul %st(0), %st
  393. fstps 16(%esp)
  394. flds 20(%esp)
  395. addl $56, %esp
  396. popl %ebx
  397. popl %edi
  398. movl %ebp, %esp
  399. popl %ebp
  400. ret
  401. ..B1.29:
  402. flds .L_2il0floatpacket.1@GOTOFF(%ebx)
  403. fmul %st(0), %st
  404. fsts 20(%esp)
  405. addl $56, %esp
  406. popl %ebx
  407. popl %edi
  408. movl %ebp, %esp
  409. popl %ebp
  410. ret
  411. .align 16,0x90
  412. .type erfcf,@function
  413. .size erfcf,.-erfcf
  414. .data
  415. # -- End erfcf
  416. .section .rodata, "a"
  417. .align 8
  418. .align 8
  419. .L_2il0floatpacket.2:
  420. .long 0x00000000,0xc0000000
  421. .type .L_2il0floatpacket.2,@object
  422. .size .L_2il0floatpacket.2,8
  423. .align 4
  424. .L_2il0floatpacket.0:
  425. .long 0x40000000
  426. .type .L_2il0floatpacket.0,@object
  427. .size .L_2il0floatpacket.0,4
  428. .align 4
  429. .L_2il0floatpacket.1:
  430. .long 0x0d800000
  431. .type .L_2il0floatpacket.1,@object
  432. .size .L_2il0floatpacket.1,4
  433. .align 4
  434. range:
  435. .long 1092825907
  436. .long 1081791557
  437. .type range,@object
  438. .size range,8
  439. .align 4
  440. _A:
  441. .long 1346541978
  442. .long 3220311511
  443. .long 1794662342
  444. .long 1071125108
  445. .long 250944106
  446. .long 3216827122
  447. .long 215131671
  448. .long 1067156170
  449. .long 548330146
  450. .long 3212141823
  451. .long 76350191
  452. .long 1061937114
  453. .long 2772654316
  454. .long 3206307213
  455. .type _A,@object
  456. .size _A,56
  457. .align 4
  458. _AP:
  459. .long 4064916629
  460. .long 3190878451
  461. .long 2877165718
  462. .long 3218164236
  463. .long 2764139057
  464. .long 1068232842
  465. .long 168293639
  466. .long 3215329394
  467. .long 881203975
  468. .long 3215292554
  469. .long 342818617
  470. .long 1065638313
  471. .long 817546319
  472. .long 3212004140
  473. .long 1510911299
  474. .long 3202390104
  475. .type _AP,@object
  476. .size _AP,64
  477. .align 4
  478. _AQ:
  479. .long 1883560946
  480. .long 1071960885
  481. .long 853592313
  482. .long 1071685196
  483. .long 191605458
  484. .long 1071250674
  485. .long 2183121159
  486. .long 1070390698
  487. .long 3347411101
  488. .long 1068928985
  489. .long 273856425
  490. .long 1067608207
  491. .long 671820230
  492. .long 1065177551
  493. .long 2414119437
  494. .long 1063328696
  495. .type _AQ,@object
  496. .size _AQ,64
  497. .align 4
  498. _ones:
  499. .long 1065353216
  500. .long 3212836864
  501. .type _ones,@object
  502. .size _ones,8
  503. .align 4
  504. _erfc1:
  505. .long 1879048192
  506. .long 1069818465
  507. .long 3523215360
  508. .long 1073576883
  509. .type _erfc1,@object
  510. .size _erfc1,16
  511. .align 4
  512. _BP1:
  513. .long 4019088381
  514. .long 1060143686
  515. .long 4231883845
  516. .long 3209038463
  517. .long 1510730124
  518. .long 1061755778
  519. .long 2929202078
  520. .long 3208591153
  521. .long 1409179897
  522. .long 1059475758
  523. .long 439372548
  524. .long 3204538649
  525. .long 3357266387
  526. .long 1053229132
  527. .type _BP1,@object
  528. .size _BP1,56
  529. .align 4
  530. _BQ1:
  531. .long 3444570556
  532. .long 1068208773
  533. .long 4145425017
  534. .long 1069029647
  535. .long 1145740212
  536. .long 1069192522
  537. .long 2413502193
  538. .long 1068797491
  539. .long 2712383784
  540. .long 1068007659
  541. .long 3941762314
  542. .long 1066743858
  543. .long 3272105283
  544. .long 1065447630
  545. .type _BQ1,@object
  546. .size _BQ1,56
  547. .align 4
  548. _BP2:
  549. .long 3138848853
  550. .long 1062211012
  551. .long 544119287
  552. .long 3211644465
  553. .long 2662071917
  554. .long 1064935492
  555. .long 2106254088
  556. .long 3212505578
  557. .long 377059754
  558. .long 1064517936
  559. .long 3523110848
  560. .long 3210978388
  561. .long 64932799
  562. .long 1062023575
  563. .long 2232373525
  564. .long 3207568747
  565. .long 3004568351
  566. .long 1057518327
  567. .long 1553969795
  568. .long 3201939481
  569. .long 865068135
  570. .long 1050709866
  571. .long 348213498
  572. .long 3193161330
  573. .type _BP2,@object
  574. .size _BP2,96
  575. .align 4
  576. _BQ2:
  577. .long 2220299070
  578. .long 1070256111
  579. .long 1607355279
  580. .long 1069737707
  581. .long 3222185356
  582. .long 1069664669
  583. .long 1988590515
  584. .long 1068489586
  585. .long 2612211906
  586. .long 1067468794
  587. .long 3802943557
  588. .long 1065572613
  589. .long 4286646379
  590. .long 1063895282
  591. .long 45248763
  592. .long 1061257684
  593. .long 3494068347
  594. .long 1058887001
  595. .type _BQ2,@object
  596. .size _BQ2,72
  597. .align 4
  598. _erfc4:
  599. .long 0
  600. .long 1045463040
  601. .long 4225761280
  602. .long 1073741823
  603. .type _erfc4,@object
  604. .size _erfc4,16
  605. .align 4
  606. _R1:
  607. .long 1340517714
  608. .long 1071779287
  609. .long 1760660317
  610. .long 3218214358
  611. .long 3277598851
  612. .long 1071322187
  613. .long 1776282588
  614. .long 3220235438
  615. .long 2229586924
  616. .long 1074588991
  617. .long 2042215417
  618. .long 3224150558
  619. .long 1374528972
  620. .long 1078534706
  621. .long 1825320511
  622. .long 3227067102
  623. .type _R1,@object
  624. .size _R1,64
  625. .align 4
  626. zero_two:
  627. .long 0x00000000
  628. .long 0x40000000
  629. .type zero_two,@object
  630. .size zero_two,8
  631. .data
  632. .hidden __libm_exp_k32
  633. .section .note.GNU-stack, ""
  634. # End