You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

dgemm_ncopy_4_power8.S 6.5 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. /***************************************************************************
  2. Copyright (c) 2013-2016, The OpenBLAS Project
  3. All rights reserved.
  4. Redistribution and use in source and binary forms, with or without
  5. modification, are permitted provided that the following conditions are
  6. met:
  7. 1. Redistributions of source code must retain the above copyright
  8. notice, this list of conditions and the following disclaimer.
  9. 2. Redistributions in binary form must reproduce the above copyright
  10. notice, this list of conditions and the following disclaimer in
  11. the documentation and/or other materials provided with the
  12. distribution.
  13. 3. Neither the name of the OpenBLAS project nor the names of
  14. its contributors may be used to endorse or promote products
  15. derived from this software without specific prior written permission.
  16. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  17. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  18. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  19. ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE
  20. LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  21. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  22. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  23. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  24. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
  25. USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. *****************************************************************************/
  27. /**************************************************************************************
  28. * 2016/04/28 Werner Saar (wernsaar@googlemail.com)
  29. * BLASTEST : OK
  30. * CTEST : OK
  31. * TEST : OK
  32. * LAPACK-TEST : OK
  33. **************************************************************************************/
  34. /*********************************************************************/
  35. /* Copyright 2009, 2010 The University of Texas at Austin. */
  36. /* All rights reserved. */
  37. /* */
  38. /* Redistribution and use in source and binary forms, with or */
  39. /* without modification, are permitted provided that the following */
  40. /* conditions are met: */
  41. /* */
  42. /* 1. Redistributions of source code must retain the above */
  43. /* copyright notice, this list of conditions and the following */
  44. /* disclaimer. */
  45. /* */
  46. /* 2. Redistributions in binary form must reproduce the above */
  47. /* copyright notice, this list of conditions and the following */
  48. /* disclaimer in the documentation and/or other materials */
  49. /* provided with the distribution. */
  50. /* */
  51. /* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */
  52. /* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */
  53. /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
  54. /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
  55. /* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */
  56. /* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */
  57. /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
  58. /* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */
  59. /* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */
  60. /* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
  61. /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
  62. /* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */
  63. /* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
  64. /* POSSIBILITY OF SUCH DAMAGE. */
  65. /* */
  66. /* The views and conclusions contained in the software and */
  67. /* documentation are those of the authors and should not be */
  68. /* interpreted as representing official policies, either expressed */
  69. /* or implied, of The University of Texas at Austin. */
  70. /*********************************************************************/
  71. #define ASSEMBLER
  72. #include "common.h"
  73. #include "def_vsx.h"
  74. #define M r3
  75. #define N r4
  76. #define A r5
  77. #define LDA r6
  78. #define B r7
  79. #define A0 r8
  80. #define A1 r9
  81. #define A2 r10
  82. #define A3 r11
  83. #define J r12
  84. #define PREA r14
  85. #define PREB r15
  86. #define BO r16
  87. #define o64 r17
  88. #define o80 r18
  89. #define o96 r19
  90. #define o112 r20
  91. #define o8 r21
  92. #define T2 r22
  93. #define I r23
  94. #define o16 r24
  95. #define o32 r25
  96. #define o48 r26
  97. #define NOTU1 r27
  98. #define NOTU2 r30
  99. #define T1 r31
  100. #define o0 0
  101. #include "dgemm_ncopy_macros_4_power8.S"
  102. #define STACKSIZE 144
  103. PROLOGUE
  104. PROFCODE
  105. addi SP, SP, -STACKSIZE
  106. li r0, 0
  107. std r14, 0(SP)
  108. std r15, 8(SP)
  109. std r16, 16(SP)
  110. std r17, 24(SP)
  111. std r18, 32(SP)
  112. std r19, 40(SP)
  113. std r20, 48(SP)
  114. std r21, 56(SP)
  115. std r22, 64(SP)
  116. std r23, 72(SP)
  117. std r24, 80(SP)
  118. std r25, 88(SP)
  119. std r26, 96(SP)
  120. std r27, 104(SP)
  121. std r28, 112(SP)
  122. std r29, 120(SP)
  123. std r30, 128(SP)
  124. std r31, 136(SP)
  125. cmpwi cr0, M, 0
  126. ble- L999
  127. cmpwi cr0, N, 0
  128. ble- L999
  129. slwi LDA, LDA, BASE_SHIFT
  130. li PREA, 384
  131. li PREB, 384
  132. li o8, 8
  133. li o16, 16
  134. li o32, 32
  135. li o48, 48
  136. li o64, 64
  137. li o80, 80
  138. li o96, 96
  139. li o112, 112
  140. #include "dgemm_ncopy_logic_4_power8.S"
  141. L999:
  142. ld r14, 0(SP)
  143. ld r15, 8(SP)
  144. ld r16, 16(SP)
  145. ld r17, 24(SP)
  146. ld r18, 32(SP)
  147. ld r19, 40(SP)
  148. ld r20, 48(SP)
  149. ld r21, 56(SP)
  150. ld r22, 64(SP)
  151. ld r23, 72(SP)
  152. ld r24, 80(SP)
  153. ld r25, 88(SP)
  154. ld r26, 96(SP)
  155. ld r27, 104(SP)
  156. ld r28, 112(SP)
  157. ld r29, 120(SP)
  158. ld r30, 128(SP)
  159. ld r31, 136(SP)
  160. addi SP, SP, STACKSIZE
  161. //addi SP, SP, 208
  162. blr
  163. EPILOGUE