/******************************************************************************* Copyright (c) 2023, The OpenBLAS Project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the OpenBLAS project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ #define ASSEMBLER #include "common.h" /* Function parameters */ #define M $r4 // param 1: bm #define N $r5 // param 2: bn #define K $r6 // param 3: bk #define ALPHA_R $f0 // param 4: alphar #define ALPHA_I $f1 // param 5: alphai #define A $r7 // param 6: ba #define B $r8 // param 7: bb #define C $r9 // param 8: bc #define LDC $r10 // param 9: ldc #if defined (TRMMKERNEL) #define OFFSET $r11 // param 10: offset #endif #define OFF $r26 #define I $r12 #define J $r13 #define L $r14 #define TL $r15 #define A0 $r16 #define B0 $r17 #define C0 $r18 #define C1 $r19 #define C2 $r20 #define C3 $r23 #define T0 $r24 #define T1 $r25 #define a1 $f2 #define a2 $f3 #define a3 $f4 #define a4 $f5 #define a5 $f6 #define a6 $f7 #define a7 $f8 #define a8 $f9 #define b1 $f10 #define b2 $f11 #define b3 $f12 #define b4 $f13 #define b5 $f14 #define b6 $f15 #define b7 $f16 #define b8 $f17 #define c11 $f18 #define c12 $f19 #define c21 $f20 #define c22 $f21 #define c31 $f22 #define c32 $f23 #define c41 $f24 #define c42 $f25 #define c51 $f26 #define c52 $f27 #define c61 $f28 #define c62 $f29 #if defined(NN) || defined(NT) || defined(TN) || defined(TT) #define MADD1 MADD #define MADD2 MADD #define MADD3 NMSUB #define MADD4 MADD #endif #if defined(NR) || defined(NC) || defined(TR) || defined(TC) #define MADD1 MADD #define MADD2 MADD #define MADD3 MADD #define MADD4 NMSUB #endif #if defined(RN) || defined(RT) || defined(CN) || defined(CT) #define MADD1 MADD #define MADD2 NMSUB #define MADD3 MADD #define MADD4 MADD #endif #if defined(RR) || defined(RC) || defined(CR) || defined(CC) #define MADD1 MADD #define MADD2 NMSUB #define MADD3 NMSUB #define MADD4 NMSUB #endif PROLOGUE addi.d $sp, $sp, -88 SDARG $r23, $sp, 0 SDARG $r24, $sp, 8 SDARG $r25, $sp, 16 SDARG $r26, $sp, 24 ST $f23, $sp, 32 ST $f24, $sp, 40 ST $f25, $sp, 48 ST $f26, $sp, 56 ST $f27, $sp, 64 ST $f28, $sp, 72 ST $f29, $sp, 80 #if defined (TRMMKERNEL) && !defined(LEFT) sub.d OFF, $r0, OFFSET #else xor OFF, OFF, OFF #endif slli.d LDC, LDC, BASE_SHIFT move J, $r0 srai.d T0, N, 1 beq J, T0, .L19 .L10: /* for(j=0; j