log1pf_gen.S 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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 "log1pf_gen.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin log1pf
  41. .text
  42. .align 16,0x90
  43. .globl log1pf
  44. log1pf:
  45. # parameter 1: %xmm0
  46. ..B1.1:
  47. .cfi_startproc
  48. ..___tag_value_log1pf.1:
  49. ..L2:
  50. pushq %rsi
  51. .cfi_def_cfa_offset 16
  52. pxor %xmm2, %xmm2
  53. cvtss2sd %xmm0, %xmm2
  54. movd %xmm0, %eax
  55. movaps %xmm2, %xmm1
  56. andl $2147483647, %eax
  57. cmpl $2139095040, %eax
  58. andps .L_2il0floatpacket.6(%rip), %xmm1
  59. ja ..B1.9
  60. ..B1.2:
  61. movsd .L_2il0floatpacket.0(%rip), %xmm0
  62. comisd %xmm2, %xmm0
  63. jb ..B1.5
  64. ..B1.3:
  65. ucomisd %xmm0, %xmm2
  66. jp ..B1.4
  67. je ..B1.10
  68. ..B1.4:
  69. pxor %xmm0, %xmm0
  70. mulss .L_2il0floatpacket.3(%rip), %xmm0
  71. popq %rcx
  72. .cfi_def_cfa_offset 8
  73. ret
  74. .cfi_def_cfa_offset 16
  75. ..B1.5:
  76. comisd .L_2il0floatpacket.1(%rip), %xmm1
  77. jb ..B1.7
  78. ..B1.6:
  79. movsd .L_2il0floatpacket.5(%rip), %xmm0
  80. addsd %xmm2, %xmm0
  81. call log@PLT
  82. ..B1.13:
  83. cvtsd2ss %xmm0, %xmm0
  84. popq %rcx
  85. .cfi_def_cfa_offset 8
  86. ret
  87. .cfi_def_cfa_offset 16
  88. ..B1.7:
  89. movaps %xmm2, %xmm1
  90. pxor %xmm0, %xmm0
  91. mulsd %xmm2, %xmm1
  92. mulsd .L_2il0floatpacket.4(%rip), %xmm1
  93. subsd %xmm1, %xmm2
  94. cvtsd2ss %xmm2, %xmm0
  95. ..B1.8:
  96. popq %rcx
  97. .cfi_def_cfa_offset 8
  98. ret
  99. .cfi_def_cfa_offset 16
  100. ..B1.9:
  101. addss %xmm0, %xmm0
  102. popq %rcx
  103. .cfi_def_cfa_offset 8
  104. ret
  105. .cfi_def_cfa_offset 16
  106. ..B1.10:
  107. movss .L_2il0floatpacket.2(%rip), %xmm0
  108. pxor %xmm1, %xmm1
  109. divss %xmm1, %xmm0
  110. popq %rcx
  111. .cfi_def_cfa_offset 8
  112. ret
  113. .align 16,0x90
  114. .cfi_endproc
  115. .type log1pf,@function
  116. .size log1pf,.-log1pf
  117. .data
  118. # -- End log1pf
  119. .section .rodata, "a"
  120. .align 16
  121. .align 16
  122. .L_2il0floatpacket.6:
  123. .long 0xffffffff,0x7fffffff,0x00000000,0x00000000
  124. .type .L_2il0floatpacket.6,@object
  125. .size .L_2il0floatpacket.6,16
  126. .align 8
  127. .L_2il0floatpacket.0:
  128. .long 0x00000000,0xbff00000
  129. .type .L_2il0floatpacket.0,@object
  130. .size .L_2il0floatpacket.0,8
  131. .align 8
  132. .L_2il0floatpacket.1:
  133. .long 0x00000000,0x3e300000
  134. .type .L_2il0floatpacket.1,@object
  135. .size .L_2il0floatpacket.1,8
  136. .align 8
  137. .L_2il0floatpacket.4:
  138. .long 0x00000000,0x3fe00000
  139. .type .L_2il0floatpacket.4,@object
  140. .size .L_2il0floatpacket.4,8
  141. .align 8
  142. .L_2il0floatpacket.5:
  143. .long 0x00000000,0x3ff00000
  144. .type .L_2il0floatpacket.5,@object
  145. .size .L_2il0floatpacket.5,8
  146. .align 4
  147. .L_2il0floatpacket.2:
  148. .long 0xbf800000
  149. .type .L_2il0floatpacket.2,@object
  150. .size .L_2il0floatpacket.2,4
  151. .align 4
  152. .L_2il0floatpacket.3:
  153. .long 0x7f800000
  154. .type .L_2il0floatpacket.3,@object
  155. .size .L_2il0floatpacket.3,4
  156. .data
  157. .section .note.GNU-stack, ""
  158. // -- Begin DWARF2 SEGMENT .eh_frame
  159. .section .eh_frame,"a",@progbits
  160. .eh_frame_seg:
  161. .align 1
  162. # End