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.

cgemm_tcopy_logic_8_power8.S 4.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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/23 Werner Saar (wernsaar@googlemail.com)
  29. * BLASTEST : OK
  30. * CTEST : OK
  31. * TEST : OK
  32. * LAPACK-TEST : OK
  33. **************************************************************************************/
  34. srawi. I, M, 2
  35. ble CCOPYT_L2_BEGIN
  36. CCOPYT_L4_BEGIN:
  37. mr A0, A
  38. add A1, A0, LDA
  39. add A2, A1, LDA
  40. add A3, A2, LDA
  41. add A, A3, LDA
  42. mr B8, B
  43. addi B, B, 64*SIZE
  44. sradi. J, N, 3
  45. ble CCOPYT_L4x4_BEGIN
  46. mr BO, B8
  47. CCOPYT_L4x8_LOOP:
  48. dcbt A0, PREA
  49. dcbt A1, PREA
  50. dcbt A2, PREA
  51. dcbt A3, PREA
  52. dcbtst BO, M8
  53. dcbtst BO, PREB
  54. COPY_4x8
  55. add BO, BO, M8
  56. addic. J, J, -1
  57. ble CCOPYT_L4x4_BEGIN
  58. COPY_4x8
  59. add BO, BO, M8
  60. addic. J, J, -1
  61. bgt CCOPYT_L4x8_LOOP
  62. CCOPYT_L4x4_BEGIN:
  63. andi. T1, N, 4
  64. ble CCOPYT_L4x2_BEGIN
  65. mr BO, B4
  66. COPY_4x4
  67. addi B4, B4, 32*SIZE
  68. CCOPYT_L4x2_BEGIN:
  69. andi. T1, N, 2
  70. ble CCOPYT_L4x1_BEGIN
  71. mr BO, B2
  72. COPY_4x2
  73. addi B2, B2, 16*SIZE
  74. CCOPYT_L4x1_BEGIN:
  75. andi. T1, N, 1
  76. ble CCOPYT_L4_END
  77. mr BO, B1
  78. COPY_4x1
  79. addi B1, B1, 8*SIZE
  80. CCOPYT_L4_END:
  81. addic. I, I, -1
  82. bgt CCOPYT_L4_BEGIN
  83. CCOPYT_L2_BEGIN:
  84. andi. T1, M, 2
  85. ble CCOPYT_L1_BEGIN
  86. mr A0, A
  87. add A1, A0, LDA
  88. add A, A1, LDA
  89. mr B8, B
  90. addi B, B, 32*SIZE
  91. sradi. J, N, 3
  92. ble CCOPYT_L2x4_BEGIN
  93. mr BO, B8
  94. CCOPYT_L2x8_LOOP:
  95. COPY_2x8
  96. add BO, BO, M8
  97. addic. J, J, -1
  98. bgt CCOPYT_L2x8_LOOP
  99. CCOPYT_L2x4_BEGIN:
  100. andi. T1, N, 4
  101. ble CCOPYT_L2x2_BEGIN
  102. mr BO, B4
  103. COPY_2x4
  104. addi B4, B4, 16*SIZE
  105. CCOPYT_L2x2_BEGIN:
  106. andi. T1, N, 2
  107. ble CCOPYT_L2x1_BEGIN
  108. mr BO, B2
  109. COPY_2x2
  110. addi B2, B2, 8*SIZE
  111. CCOPYT_L2x1_BEGIN:
  112. andi. T1, N, 1
  113. ble CCOPYT_L2_END
  114. mr BO, B1
  115. COPY_2x1
  116. addi B1, B1, 4*SIZE
  117. CCOPYT_L2_END:
  118. CCOPYT_L1_BEGIN:
  119. andi. T1, M, 1
  120. ble L999
  121. mr A0, A
  122. add A, A0, LDA
  123. mr B8, B
  124. addi B, B, 16*SIZE
  125. sradi. J, N, 3
  126. ble CCOPYT_L1x4_BEGIN
  127. mr BO, B8
  128. CCOPYT_L1x8_LOOP:
  129. COPY_1x8
  130. add BO, BO, M8
  131. addic. J, J, -1
  132. bgt CCOPYT_L1x8_LOOP
  133. CCOPYT_L1x4_BEGIN:
  134. andi. T1, N, 4
  135. ble CCOPYT_L1x2_BEGIN
  136. mr BO, B4
  137. COPY_1x4
  138. addi B4, B4, 8*SIZE
  139. CCOPYT_L1x2_BEGIN:
  140. andi. T1, N, 2
  141. ble CCOPYT_L1x1_BEGIN
  142. mr BO, B2
  143. COPY_1x2
  144. addi B2, B2, 4*SIZE
  145. CCOPYT_L1x1_BEGIN:
  146. andi. T1, N, 1
  147. ble CCOPYT_L1_END
  148. mr BO, B1
  149. COPY_1x1
  150. addi B1, B1, 2*SIZE
  151. CCOPYT_L1_END: