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_tcopy_logic_16_power8.S 4.4 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  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/21 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 DCOPYT_L2_BEGIN
  36. DCOPYT_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 B16, B
  43. addi B, B, 64*SIZE
  44. sradi. J, N, 4
  45. ble DCOPYT_L4x8_BEGIN
  46. mr BO, B16
  47. addi T2, M16, 384
  48. mtctr J
  49. .align 5
  50. DCOPYT_L4x16_LOOP:
  51. addi T1, M16, 256
  52. dcbt A0, PREA
  53. dcbt A1, PREA
  54. dcbt A2, PREA
  55. dcbt A3, PREA
  56. dcbt BO, M16
  57. dcbt BO, PREB
  58. dcbt BO, T1
  59. dcbt BO, T2
  60. COPY_4x16
  61. add BO, BO, M16
  62. // addic. J, J, -1
  63. bdnz+ DCOPYT_L4x16_LOOP
  64. DCOPYT_L4x8_BEGIN:
  65. andi. T1, N, 8
  66. ble DCOPYT_L4x4_BEGIN
  67. mr BO, B8
  68. COPY_4x8
  69. addi B8, B8, 32*SIZE
  70. DCOPYT_L4x4_BEGIN:
  71. andi. T1, N, 4
  72. ble DCOPYT_L4x2_BEGIN
  73. mr BO, B4
  74. COPY_4x4
  75. addi B4, B4, 16*SIZE
  76. DCOPYT_L4x2_BEGIN:
  77. andi. T1, N, 2
  78. ble DCOPYT_L4x1_BEGIN
  79. mr BO, B2
  80. COPY_4x2
  81. addi B2, B2, 8*SIZE
  82. DCOPYT_L4x1_BEGIN:
  83. andi. T1, N, 1
  84. ble DCOPYT_L4_END
  85. mr BO, B1
  86. COPY_4x1
  87. addi B1, B1, 4*SIZE
  88. DCOPYT_L4_END:
  89. addic. I, I, -1
  90. bgt DCOPYT_L4_BEGIN
  91. DCOPYT_L2_BEGIN:
  92. andi. T1, M, 2
  93. ble DCOPYT_L1_BEGIN
  94. mr A0, A
  95. add A1, A0, LDA
  96. add A, A1, LDA
  97. mr B16, B
  98. addi B, B, 32*SIZE
  99. sradi. J, N, 4
  100. ble DCOPYT_L2x8_BEGIN
  101. mr BO, B16
  102. DCOPYT_L2x16_LOOP:
  103. COPY_2x16
  104. add BO, BO, M16
  105. addic. J, J, -1
  106. bgt DCOPYT_L2x16_LOOP
  107. DCOPYT_L2x8_BEGIN:
  108. andi. T1, N, 8
  109. ble DCOPYT_L2x4_BEGIN
  110. mr BO, B8
  111. COPY_2x8
  112. addi B8, B8, 16*SIZE
  113. DCOPYT_L2x4_BEGIN:
  114. andi. T1, N, 4
  115. ble DCOPYT_L2x2_BEGIN
  116. mr BO, B4
  117. COPY_2x4
  118. addi B4, B4, 8*SIZE
  119. DCOPYT_L2x2_BEGIN:
  120. andi. T1, N, 2
  121. ble DCOPYT_L2x1_BEGIN
  122. mr BO, B2
  123. COPY_2x2
  124. addi B2, B2, 4*SIZE
  125. DCOPYT_L2x1_BEGIN:
  126. andi. T1, N, 1
  127. ble DCOPYT_L2_END
  128. mr BO, B1
  129. COPY_2x1
  130. addi B1, B1, 2*SIZE
  131. DCOPYT_L2_END:
  132. DCOPYT_L1_BEGIN:
  133. andi. T1, M, 1
  134. ble L999
  135. mr A0, A
  136. add A, A0, LDA
  137. mr B16, B
  138. addi B, B, 16*SIZE
  139. sradi. J, N, 4
  140. ble DCOPYT_L1x8_BEGIN
  141. mr BO, B16
  142. DCOPYT_L1x16_LOOP:
  143. COPY_1x16
  144. add BO, BO, M16
  145. addic. J, J, -1
  146. bgt DCOPYT_L1x16_LOOP
  147. DCOPYT_L1x8_BEGIN:
  148. andi. T1, N, 8
  149. ble DCOPYT_L1x4_BEGIN
  150. mr BO, B8
  151. COPY_1x8
  152. addi B8, B8, 8*SIZE
  153. DCOPYT_L1x4_BEGIN:
  154. andi. T1, N, 4
  155. ble DCOPYT_L1x2_BEGIN
  156. mr BO, B4
  157. COPY_1x4
  158. addi B4, B4, 4*SIZE
  159. DCOPYT_L1x2_BEGIN:
  160. andi. T1, N, 2
  161. ble DCOPYT_L1x1_BEGIN
  162. mr BO, B2
  163. COPY_1x2
  164. addi B2, B2, 2*SIZE
  165. DCOPYT_L1x1_BEGIN:
  166. andi. T1, N, 1
  167. ble DCOPYT_L1_END
  168. mr BO, B1
  169. COPY_1x1
  170. addi B1, B1, 1*SIZE
  171. DCOPYT_L1_END: