cprojl.S 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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 "cprojl.c"
  38. .text
  39. ..TXTST0:
  40. # -- Begin cprojl
  41. .text
  42. .align 16,0x90
  43. .globl cprojl
  44. cprojl:
  45. # parameter 1: 12 + %ebp
  46. ..B1.1:
  47. ..L1:
  48. pushl %ebp
  49. movl %esp, %ebp
  50. andl $-16, %esp
  51. pushl %ebx
  52. subl $28, %esp
  53. call ..L2
  54. ..L2:
  55. popl %ebx
  56. lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx
  57. movzwl 20(%ebp), %ecx
  58. andl $32767, %ecx
  59. fldt .L_2il0floatpacket.7@GOTOFF(%ebx)
  60. movl %gs:20, %edx
  61. movl 8(%ebp), %eax
  62. xorl %esp, %edx
  63. movl %edx, 24(%esp)
  64. cmpl $32767, %ecx
  65. movzbl 9+.L_2il0floatpacket.7@GOTOFF(%ebx), %edx
  66. je ..B1.11
  67. ..B1.2:
  68. movzwl 32(%ebp), %ecx
  69. andl $32767, %ecx
  70. cmpl $32767, %ecx
  71. je ..B1.7
  72. ..B1.3:
  73. fstp %st(0)
  74. fldt 12(%ebp)
  75. fstpt (%esp)
  76. fldt 24(%ebp)
  77. fstpt 12(%esp)
  78. ..B1.4:
  79. movl (%esp), %edx
  80. movl 4(%esp), %ecx
  81. movl %edx, (%eax)
  82. movl %ecx, 4(%eax)
  83. movl 8(%esp), %edx
  84. movl 12(%esp), %ecx
  85. movl %edx, 8(%eax)
  86. movl %ecx, 12(%eax)
  87. movl 16(%esp), %edx
  88. movl 20(%esp), %ecx
  89. movl %edx, 16(%eax)
  90. movl %ecx, 20(%eax)
  91. movl 24(%esp), %edx
  92. xorl %esp, %edx
  93. cmpl %gs:20, %edx
  94. jne ..B1.6
  95. ..B1.5:
  96. addl $28, %esp
  97. popl %ebx
  98. movl %ebp, %esp
  99. popl %ebp
  100. ret $4
  101. ..B1.6:
  102. call __stack_chk_fail@PLT
  103. ..B1.7:
  104. cmpl $-2147483648, 28(%ebp)
  105. jne ..B1.3
  106. ..B1.8:
  107. cmpl $0, 24(%ebp)
  108. jne ..B1.3
  109. ..B1.9:
  110. fstpt 12(%esp)
  111. fldt 12(%esp)
  112. fstpt (%esp)
  113. fldt (%esp)
  114. ..B1.10:
  115. fldt .L_2il0floatpacket.8@GOTOFF(%ebx)
  116. andl $127, %edx
  117. movzwl 8+.L_2il0floatpacket.8@GOTOFF(%ebx), %ecx
  118. fstpt (%esp)
  119. orl $-32769, %ecx
  120. movw %cx, 8(%esp)
  121. movzbl 33(%ebp), %ecx
  122. andl $-128, %ecx
  123. fstpt 12(%esp)
  124. orl %ecx, %edx
  125. movb %dl, 21(%esp)
  126. jmp ..B1.4
  127. ..B1.11:
  128. cmpl $-2147483648, 16(%ebp)
  129. jne ..B1.2
  130. ..B1.12:
  131. cmpl $0, 12(%ebp)
  132. je ..B1.9
  133. jmp ..B1.2
  134. .align 16,0x90
  135. .type cprojl,@function
  136. .size cprojl,.-cprojl
  137. .data
  138. # -- End cprojl
  139. .section .rodata, "a"
  140. .align 16
  141. .align 16
  142. .L_2il0floatpacket.7:
  143. .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
  144. .type .L_2il0floatpacket.7,@object
  145. .size .L_2il0floatpacket.7,12
  146. .space 4, 0x00 # pad
  147. .align 16
  148. .L_2il0floatpacket.8:
  149. .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00
  150. .type .L_2il0floatpacket.8,@object
  151. .size .L_2il0floatpacket.8,12
  152. .data
  153. .section .note.GNU-stack, ""
  154. # End