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.

zgemm_tcopy_logic_8_power8.S 4.2 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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/22 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 ZCOPYT_L2_BEGIN
  36. ZCOPYT_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 ZCOPYT_L4x4_BEGIN
  46. mr BO, B8
  47. .align 5
  48. ZCOPYT_L4x8_LOOP:
  49. addi T1, PREB, 128
  50. addi T2, PREB, 256
  51. dcbt A0, PREA
  52. dcbt A1, PREA
  53. dcbt A2, PREA
  54. dcbt A3, PREA
  55. dcbtst BO, M8
  56. dcbtst BO, PREB
  57. dcbtst BO, T1
  58. dcbtst BO, T2
  59. COPY_4x8
  60. add BO, BO, M8
  61. addic. J, J, -1
  62. bgt ZCOPYT_L4x8_LOOP
  63. ZCOPYT_L4x4_BEGIN:
  64. andi. T1, N, 4
  65. ble ZCOPYT_L4x2_BEGIN
  66. mr BO, B4
  67. COPY_4x4
  68. addi B4, B4, 32*SIZE
  69. ZCOPYT_L4x2_BEGIN:
  70. andi. T1, N, 2
  71. ble ZCOPYT_L4x1_BEGIN
  72. mr BO, B2
  73. COPY_4x2
  74. addi B2, B2, 16*SIZE
  75. ZCOPYT_L4x1_BEGIN:
  76. andi. T1, N, 1
  77. ble ZCOPYT_L4_END
  78. mr BO, B1
  79. COPY_4x1
  80. addi B1, B1, 8*SIZE
  81. ZCOPYT_L4_END:
  82. addic. I, I, -1
  83. bgt ZCOPYT_L4_BEGIN
  84. ZCOPYT_L2_BEGIN:
  85. andi. T1, M, 2
  86. ble ZCOPYT_L1_BEGIN
  87. mr A0, A
  88. add A1, A0, LDA
  89. add A, A1, LDA
  90. mr B8, B
  91. addi B, B, 32*SIZE
  92. sradi. J, N, 3
  93. ble ZCOPYT_L2x4_BEGIN
  94. mr BO, B8
  95. ZCOPYT_L2x8_LOOP:
  96. COPY_2x8
  97. add BO, BO, M8
  98. addic. J, J, -1
  99. bgt ZCOPYT_L2x8_LOOP
  100. ZCOPYT_L2x4_BEGIN:
  101. andi. T1, N, 4
  102. ble ZCOPYT_L2x2_BEGIN
  103. mr BO, B4
  104. COPY_2x4
  105. addi B4, B4, 16*SIZE
  106. ZCOPYT_L2x2_BEGIN:
  107. andi. T1, N, 2
  108. ble ZCOPYT_L2x1_BEGIN
  109. mr BO, B2
  110. COPY_2x2
  111. addi B2, B2, 8*SIZE
  112. ZCOPYT_L2x1_BEGIN:
  113. andi. T1, N, 1
  114. ble ZCOPYT_L2_END
  115. mr BO, B1
  116. COPY_2x1
  117. addi B1, B1, 4*SIZE
  118. ZCOPYT_L2_END:
  119. ZCOPYT_L1_BEGIN:
  120. andi. T1, M, 1
  121. ble L999
  122. mr A0, A
  123. add A, A0, LDA
  124. mr B8, B
  125. addi B, B, 16*SIZE
  126. sradi. J, N, 3
  127. ble ZCOPYT_L1x4_BEGIN
  128. mr BO, B8
  129. ZCOPYT_L1x8_LOOP:
  130. COPY_1x8
  131. add BO, BO, M8
  132. addic. J, J, -1
  133. bgt ZCOPYT_L1x8_LOOP
  134. ZCOPYT_L1x4_BEGIN:
  135. andi. T1, N, 4
  136. ble ZCOPYT_L1x2_BEGIN
  137. mr BO, B4
  138. COPY_1x4
  139. addi B4, B4, 8*SIZE
  140. ZCOPYT_L1x2_BEGIN:
  141. andi. T1, N, 2
  142. ble ZCOPYT_L1x1_BEGIN
  143. mr BO, B2
  144. COPY_1x2
  145. addi B2, B2, 4*SIZE
  146. ZCOPYT_L1x1_BEGIN:
  147. andi. T1, N, 1
  148. ble ZCOPYT_L1_END
  149. mr BO, B1
  150. COPY_1x1
  151. addi B1, B1, 2*SIZE
  152. ZCOPYT_L1_END: