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_logic_4_power8.S 4.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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. mr BO, B
  35. srawi. I, N, 2
  36. ble DCOPYN_L2_BEGIN
  37. DCOPYN_L4_BEGIN:
  38. DCOPYN_L4_LOOP:
  39. mr A0, A
  40. add A1, A0, LDA
  41. add A2, A1, LDA
  42. add A3, A2, LDA
  43. add A, A3, LDA
  44. DCOPYN_L4x16_BEGIN:
  45. srawi. J, M, 4
  46. ble DCOPYN_L4x16_END
  47. DCOPYN_L4x16_LOOP:
  48. dcbt A0, PREA
  49. dcbt A1, PREA
  50. dcbt A2, PREA
  51. dcbt A3, PREA
  52. COPY_4x16
  53. addic. J, J, -1
  54. bgt DCOPYN_L4x16_LOOP
  55. DCOPYN_L4x16_END:
  56. DCOPYN_L4x8_BEGIN:
  57. andi. J, M, 8
  58. ble DCOPYN_L4x8_END
  59. COPY_4x8
  60. DCOPYN_L4x8_END:
  61. DCOPYN_L4x4_BEGIN:
  62. andi. J, M, 4
  63. ble DCOPYN_L4x4_END
  64. COPY_4x4
  65. DCOPYN_L4x4_END:
  66. DCOPYN_L4x2_BEGIN:
  67. andi. J, M, 2
  68. ble DCOPYN_L4x2_END
  69. COPY_4x2
  70. DCOPYN_L4x2_END:
  71. DCOPYN_L4x1_BEGIN:
  72. andi. J, M, 1
  73. ble DCOPYN_L4x1_END
  74. COPY_4x1
  75. DCOPYN_L4x1_END:
  76. DCOPYN_L4_END:
  77. addic. I, I, -1
  78. bgt DCOPYN_L4_LOOP
  79. DCOPYN_L2_BEGIN:
  80. andi. T1, 4, 2
  81. ble DCOPYN_L2_END
  82. DCOPYN_L2_LOOP:
  83. mr A0, A
  84. add A1, A0, LDA
  85. add A, A1, LDA
  86. DCOPYN_L2x16_BEGIN:
  87. srawi. J, M, 4
  88. ble DCOPYN_L2x16_END
  89. DCOPYN_L2x16_LOOP:
  90. COPY_2x16
  91. addic. J, J, -1
  92. bgt DCOPYN_L2x16_LOOP
  93. DCOPYN_L2x16_END:
  94. DCOPYN_L2x8_BEGIN:
  95. andi. J, M, 8
  96. ble DCOPYN_L2x8_END
  97. COPY_2x8
  98. DCOPYN_L2x8_END:
  99. DCOPYN_L2x4_BEGIN:
  100. andi. J, M, 4
  101. ble DCOPYN_L2x4_END
  102. COPY_2x4
  103. DCOPYN_L2x4_END:
  104. DCOPYN_L2x2_BEGIN:
  105. andi. J, M, 2
  106. ble DCOPYN_L2x2_END
  107. COPY_2x2
  108. DCOPYN_L2x2_END:
  109. DCOPYN_L2x1_BEGIN:
  110. andi. J, M, 1
  111. ble DCOPYN_L2x1_END
  112. COPY_2x1
  113. DCOPYN_L2x1_END:
  114. DCOPYN_L2_END:
  115. DCOPYN_L1_BEGIN:
  116. andi. T1, 4, 1
  117. ble DCOPYN_L1_END
  118. DCOPYN_L1_LOOP:
  119. mr A0, A
  120. add A, A0, LDA
  121. DCOPYN_L1x16_BEGIN:
  122. srawi. J, M, 4
  123. ble DCOPYN_L1x16_END
  124. DCOPYN_L1x16_LOOP:
  125. COPY_1x16
  126. addic. J, J, -1
  127. bgt DCOPYN_L1x16_LOOP
  128. DCOPYN_L1x16_END:
  129. DCOPYN_L1x8_BEGIN:
  130. andi. J, M, 8
  131. ble DCOPYN_L1x8_END
  132. COPY_1x8
  133. DCOPYN_L1x8_END:
  134. DCOPYN_L1x4_BEGIN:
  135. andi. J, M, 4
  136. ble DCOPYN_L1x4_END
  137. COPY_1x4
  138. DCOPYN_L1x4_END:
  139. DCOPYN_L1x2_BEGIN:
  140. andi. J, M, 2
  141. ble DCOPYN_L1x2_END
  142. COPY_1x2
  143. DCOPYN_L1x2_END:
  144. DCOPYN_L1x1_BEGIN:
  145. andi. J, M, 1
  146. ble DCOPYN_L1x1_END
  147. COPY_1x1
  148. DCOPYN_L1x1_END:
  149. DCOPYN_L1_END: