|
kusano |
2b45e8 |
/*********************************************************************/
|
|
kusano |
2b45e8 |
/* Copyright 2009, 2010 The University of Texas at Austin. */
|
|
kusano |
2b45e8 |
/* All rights reserved. */
|
|
kusano |
2b45e8 |
/* */
|
|
kusano |
2b45e8 |
/* Redistribution and use in source and binary forms, with or */
|
|
kusano |
2b45e8 |
/* without modification, are permitted provided that the following */
|
|
kusano |
2b45e8 |
/* conditions are met: */
|
|
kusano |
2b45e8 |
/* */
|
|
kusano |
2b45e8 |
/* 1. Redistributions of source code must retain the above */
|
|
kusano |
2b45e8 |
/* copyright notice, this list of conditions and the following */
|
|
kusano |
2b45e8 |
/* disclaimer. */
|
|
kusano |
2b45e8 |
/* */
|
|
kusano |
2b45e8 |
/* 2. Redistributions in binary form must reproduce the above */
|
|
kusano |
2b45e8 |
/* copyright notice, this list of conditions and the following */
|
|
kusano |
2b45e8 |
/* disclaimer in the documentation and/or other materials */
|
|
kusano |
2b45e8 |
/* provided with the distribution. */
|
|
kusano |
2b45e8 |
/* */
|
|
kusano |
2b45e8 |
/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */
|
|
kusano |
2b45e8 |
/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */
|
|
kusano |
2b45e8 |
/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
|
|
kusano |
2b45e8 |
/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
|
|
kusano |
2b45e8 |
/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */
|
|
kusano |
2b45e8 |
/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */
|
|
kusano |
2b45e8 |
/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
|
|
kusano |
2b45e8 |
/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */
|
|
kusano |
2b45e8 |
/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */
|
|
kusano |
2b45e8 |
/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
|
|
kusano |
2b45e8 |
/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
|
|
kusano |
2b45e8 |
/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */
|
|
kusano |
2b45e8 |
/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
|
|
kusano |
2b45e8 |
/* POSSIBILITY OF SUCH DAMAGE. */
|
|
kusano |
2b45e8 |
/* */
|
|
kusano |
2b45e8 |
/* The views and conclusions contained in the software and */
|
|
kusano |
2b45e8 |
/* documentation are those of the authors and should not be */
|
|
kusano |
2b45e8 |
/* interpreted as representing official policies, either expressed */
|
|
kusano |
2b45e8 |
/* or implied, of The University of Texas at Austin. */
|
|
kusano |
2b45e8 |
/*********************************************************************/
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define ASSEMBLER
|
|
kusano |
2b45e8 |
#include "common.h"
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define M $4
|
|
kusano |
2b45e8 |
#define N $5
|
|
kusano |
2b45e8 |
#define K $6
|
|
kusano |
2b45e8 |
#define A $9
|
|
kusano |
2b45e8 |
#define B $10
|
|
kusano |
2b45e8 |
#define C $11
|
|
kusano |
2b45e8 |
#define LDC $8
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define AO $12
|
|
kusano |
2b45e8 |
#define BO $13
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define I $2
|
|
kusano |
2b45e8 |
#define J $3
|
|
kusano |
2b45e8 |
#define L $7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define CO1 $14
|
|
kusano |
2b45e8 |
#define CO2 $15
|
|
kusano |
2b45e8 |
#define CO3 $16
|
|
kusano |
2b45e8 |
#define CO4 $17
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(TRMMKERNEL)
|
|
kusano |
2b45e8 |
#define OFFSET $18
|
|
kusano |
2b45e8 |
#define KK $19
|
|
kusano |
2b45e8 |
#define TEMP $20
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define a1 $f0
|
|
kusano |
2b45e8 |
#define a2 $f1
|
|
kusano |
2b45e8 |
#define a3 $f28
|
|
kusano |
2b45e8 |
#define a4 $f29
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define b1 $f2
|
|
kusano |
2b45e8 |
#define b2 $f3
|
|
kusano |
2b45e8 |
#define b3 $f4
|
|
kusano |
2b45e8 |
#define b4 $f5
|
|
kusano |
2b45e8 |
#define b5 $f6
|
|
kusano |
2b45e8 |
#define b6 $f7
|
|
kusano |
2b45e8 |
#define b7 $f8
|
|
kusano |
2b45e8 |
#define b8 $f9
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define a5 b8
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define c11 $f10
|
|
kusano |
2b45e8 |
#define c12 $f11
|
|
kusano |
2b45e8 |
#define c21 $f12
|
|
kusano |
2b45e8 |
#define c22 $f13
|
|
kusano |
2b45e8 |
#define c31 $f14
|
|
kusano |
2b45e8 |
#define c32 $f17
|
|
kusano |
2b45e8 |
#define c41 $f18
|
|
kusano |
2b45e8 |
#define c42 $f19
|
|
kusano |
2b45e8 |
#define c51 $f20
|
|
kusano |
2b45e8 |
#define c52 $f21
|
|
kusano |
2b45e8 |
#define c61 $f22
|
|
kusano |
2b45e8 |
#define c62 $f23
|
|
kusano |
2b45e8 |
#define c71 $f24
|
|
kusano |
2b45e8 |
#define c72 $f25
|
|
kusano |
2b45e8 |
#define c81 $f26
|
|
kusano |
2b45e8 |
#define c82 $f27
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define ALPHA_R $f15
|
|
kusano |
2b45e8 |
#define ALPHA_I $f16
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(NN) || defined(NT) || defined(TN) || defined(TT)
|
|
kusano |
2b45e8 |
#define MADD1 MADD
|
|
kusano |
2b45e8 |
#define MADD2 MADD
|
|
kusano |
2b45e8 |
#define MADD3 MADD
|
|
kusano |
2b45e8 |
#define MADD4 NMSUB
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(NR) || defined(NC) || defined(TR) || defined(TC)
|
|
kusano |
2b45e8 |
#define MADD1 MADD
|
|
kusano |
2b45e8 |
#define MADD2 MADD
|
|
kusano |
2b45e8 |
#define MADD3 NMSUB
|
|
kusano |
2b45e8 |
#define MADD4 MADD
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(RN) || defined(RT) || defined(CN) || defined(CT)
|
|
kusano |
2b45e8 |
#define MADD1 MADD
|
|
kusano |
2b45e8 |
#define MADD2 NMSUB
|
|
kusano |
2b45e8 |
#define MADD3 MADD
|
|
kusano |
2b45e8 |
#define MADD4 MADD
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(RR) || defined(RC) || defined(CR) || defined(CC)
|
|
kusano |
2b45e8 |
#define MADD1 MADD
|
|
kusano |
2b45e8 |
#define MADD2 NMSUB
|
|
kusano |
2b45e8 |
#define MADD3 NMSUB
|
|
kusano |
2b45e8 |
#define MADD4 NMSUB
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PROLOGUE
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LDARG LDC, 0($sp)
|
|
kusano |
2b45e8 |
daddiu $sp, $sp, -128
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
SDARG $16, 0($sp)
|
|
kusano |
2b45e8 |
SDARG $17, 8($sp)
|
|
kusano |
2b45e8 |
sdc1 $f24, 16($sp)
|
|
kusano |
2b45e8 |
sdc1 $f25, 24($sp)
|
|
kusano |
2b45e8 |
sdc1 $f26, 32($sp)
|
|
kusano |
2b45e8 |
sdc1 $f27, 40($sp)
|
|
kusano |
2b45e8 |
sdc1 $f28, 48($sp)
|
|
kusano |
2b45e8 |
sdc1 $f29, 56($sp)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(TRMMKERNEL)
|
|
kusano |
2b45e8 |
SDARG $18, 64($sp)
|
|
kusano |
2b45e8 |
SDARG $19, 72($sp)
|
|
kusano |
2b45e8 |
SDARG $20, 80($sp)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LDARG OFFSET, 128 + 8($sp)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef __64BIT__
|
|
kusano |
2b45e8 |
sdc1 $f20, 88($sp)
|
|
kusano |
2b45e8 |
sdc1 $f21, 96($sp)
|
|
kusano |
2b45e8 |
sdc1 $f22,104($sp)
|
|
kusano |
2b45e8 |
sdc1 $f23,112($sp)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
dsll LDC, LDC, ZBASE_SHIFT
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(TRMMKERNEL) && !defined(LEFT)
|
|
kusano |
2b45e8 |
neg KK, OFFSET
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
dsra J, N, 2
|
|
kusano |
2b45e8 |
blez J, .L20
|
|
kusano |
2b45e8 |
nop
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L10:
|
|
kusano |
2b45e8 |
move CO1, C
|
|
kusano |
2b45e8 |
MTC $0, c11
|
|
kusano |
2b45e8 |
daddu CO2, C, LDC
|
|
kusano |
2b45e8 |
move AO, A
|
|
kusano |
2b45e8 |
daddu CO3, CO2, LDC
|
|
kusano |
2b45e8 |
daddiu J, J, -1
|
|
kusano |
2b45e8 |
daddu CO4, CO3, LDC
|
|
kusano |
2b45e8 |
MOV c21, c11
|
|
kusano |
2b45e8 |
MOV c31, c11
|
|
kusano |
2b45e8 |
#if defined(TRMMKERNEL) && defined(LEFT)
|
|
kusano |
2b45e8 |
move KK, OFFSET
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
MOV c41, c11
|
|
kusano |
2b45e8 |
MOV c51, c11
|
|
kusano |
2b45e8 |
move I, M
|
|
kusano |
2b45e8 |
daddu C, CO4, LDC
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
blez I, .L19
|
|
kusano |
2b45e8 |
MOV c61, c11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L11:
|
|
kusano |
2b45e8 |
#if defined(TRMMKERNEL)
|
|
kusano |
2b45e8 |
#if (defined(LEFT) && defined(TRANSA)) || (!defined(LEFT) && !defined(TRANSA))
|
|
kusano |
2b45e8 |
move BO, B
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
dsll L, KK, ZBASE_SHIFT
|
|
kusano |
2b45e8 |
dsll TEMP, KK, 2 + ZBASE_SHIFT
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
daddu AO, AO, L
|
|
kusano |
2b45e8 |
daddu BO, B, TEMP
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LD a1, 0 * SIZE(AO)
|
|
kusano |
2b45e8 |
MOV c71, c11
|
|
kusano |
2b45e8 |
LD b1, 0 * SIZE(BO)
|
|
kusano |
2b45e8 |
MOV c81, c11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LD a3, 4 * SIZE(AO)
|
|
kusano |
2b45e8 |
MOV c12, c11
|
|
kusano |
2b45e8 |
LD b2, 1 * SIZE(BO)
|
|
kusano |
2b45e8 |
MOV c22, c11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MOV c32, c11
|
|
kusano |
2b45e8 |
LD b3, 2 * SIZE(BO)
|
|
kusano |
2b45e8 |
MOV c42, c11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LD b4, 3 * SIZE(BO)
|
|
kusano |
2b45e8 |
MOV c52, c11
|
|
kusano |
2b45e8 |
LD b5, 4 * SIZE(BO)
|
|
kusano |
2b45e8 |
MOV c62, c11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LD b6, 8 * SIZE(BO)
|
|
kusano |
2b45e8 |
MOV c72, c11
|
|
kusano |
2b45e8 |
LD b7, 12 * SIZE(BO)
|
|
kusano |
2b45e8 |
MOV c82, c11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
|
|
kusano |
2b45e8 |
dsubu TEMP, K, KK
|
|
kusano |
2b45e8 |
#elif defined(LEFT)
|
|
kusano |
2b45e8 |
daddiu TEMP, KK, 1
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
daddiu TEMP, KK, 4
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
dsra L, TEMP, 2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
blez L, .L15
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
LD a1, 0 * SIZE(AO)
|
|
kusano |
2b45e8 |
MOV c71, c11
|
|
kusano |
2b45e8 |
LD b1, 0 * SIZE(B)
|
|
kusano |
2b45e8 |
MOV c81, c11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LD a3, 4 * SIZE(AO)
|
|
kusano |
2b45e8 |
MOV c12, c11
|
|
kusano |
2b45e8 |
LD b2, 1 * SIZE(B)
|
|
kusano |
2b45e8 |
MOV c22, c11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
dsra L, K, 2
|
|
kusano |
2b45e8 |
MOV c32, c11
|
|
kusano |
2b45e8 |
LD b3, 2 * SIZE(B)
|
|
kusano |
2b45e8 |
MOV c42, c11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LD b4, 3 * SIZE(B)
|
|
kusano |
2b45e8 |
MOV c52, c11
|
|
kusano |
2b45e8 |
LD b5, 4 * SIZE(B)
|
|
kusano |
2b45e8 |
MOV c62, c11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LD b6, 8 * SIZE(B)
|
|
kusano |
2b45e8 |
MOV c72, c11
|
|
kusano |
2b45e8 |
LD b7, 12 * SIZE(B)
|
|
kusano |
2b45e8 |
MOV c82, c11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
blez L, .L15
|
|
kusano |
2b45e8 |
move BO, B
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c11, c11, a1, b1
|
|
kusano |
2b45e8 |
LD a2, 1 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD3 c21, c21, a1, b2
|
|
kusano |
2b45e8 |
daddiu L, L, -1
|
|
kusano |
2b45e8 |
MADD1 c31, c31, a1, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
blez L, .L13
|
|
kusano |
2b45e8 |
MADD3 c41, c41, a1, b4
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L12:
|
|
kusano |
2b45e8 |
MADD2 c12, c12, a2, b1
|
|
kusano |
2b45e8 |
LD b1, 16 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c22, c22, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 5 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c32, c32, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 6 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c42, c42, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 7 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c51, c51, a1, b5
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c61, c61, a1, b2
|
|
kusano |
2b45e8 |
LD a4, 2 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD1 c71, c71, a1, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c81, c81, a1, b4
|
|
kusano |
2b45e8 |
LD a1, 8 * SIZE(AO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c52, c52, a2, b5
|
|
kusano |
2b45e8 |
LD b5, 20 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c62, c62, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 9 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c72, c72, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 10 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c82, c82, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 11 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c11, c11, a4, b6
|
|
kusano |
2b45e8 |
LD a2, 3 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD3 c21, c21, a4, b2
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD1 c31, c31, a4, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c41, c41, a4, b4
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c12, c12, a2, b6
|
|
kusano |
2b45e8 |
LD b6, 24 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c22, c22, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 13 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c32, c32, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 14 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c42, c42, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 15 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c51, c51, a4, b7
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c61, c61, a4, b2
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD1 c71, c71, a4, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c81, c81, a4, b4
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c52, c52, a2, b7
|
|
kusano |
2b45e8 |
LD b7, 28 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c62, c62, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 17 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c72, c72, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 18 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c82, c82, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 19 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c11, c11, a3, b1
|
|
kusano |
2b45e8 |
LD a2, 5 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD3 c21, c21, a3, b2
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD1 c31, c31, a3, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c41, c41, a3, b4
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c12, c12, a2, b1
|
|
kusano |
2b45e8 |
LD b1, 32 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c22, c22, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 21 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c32, c32, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 22 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c42, c42, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 23 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c51, c51, a3, b5
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c61, c61, a3, b2
|
|
kusano |
2b45e8 |
LD a4, 6 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD1 c71, c71, a3, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c81, c81, a3, b4
|
|
kusano |
2b45e8 |
LD a3, 12 * SIZE(AO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c52, c52, a2, b5
|
|
kusano |
2b45e8 |
LD b5, 36 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c62, c62, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 25 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c72, c72, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 26 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c82, c82, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 27 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c11, c11, a4, b6
|
|
kusano |
2b45e8 |
LD a2, 7 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD3 c21, c21, a4, b2
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD1 c31, c31, a4, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c41, c41, a4, b4
|
|
kusano |
2b45e8 |
daddiu L, L, -1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c12, c12, a2, b6
|
|
kusano |
2b45e8 |
LD b6, 40 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c22, c22, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 29 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c32, c32, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 30 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c42, c42, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 31 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c51, c51, a4, b7
|
|
kusano |
2b45e8 |
daddiu BO, BO, 32 * SIZE
|
|
kusano |
2b45e8 |
MADD3 c61, c61, a4, b2
|
|
kusano |
2b45e8 |
daddiu AO, AO, 8 * SIZE
|
|
kusano |
2b45e8 |
MADD1 c71, c71, a4, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c81, c81, a4, b4
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c52, c52, a2, b7
|
|
kusano |
2b45e8 |
LD b7, 12 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c62, c62, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 1 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c72, c72, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 2 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c82, c82, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 3 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c11, c11, a1, b1
|
|
kusano |
2b45e8 |
LD a2, 1 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD3 c21, c21, a1, b2
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD1 c31, c31, a1, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
bgtz L, .L12
|
|
kusano |
2b45e8 |
MADD3 c41, c41, a1, b4
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L13:
|
|
kusano |
2b45e8 |
MADD2 c12, c12, a2, b1
|
|
kusano |
2b45e8 |
LD b1, 16 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c22, c22, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 5 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c32, c32, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 6 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c42, c42, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 7 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c51, c51, a1, b5
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c61, c61, a1, b2
|
|
kusano |
2b45e8 |
LD a4, 2 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD1 c71, c71, a1, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c81, c81, a1, b4
|
|
kusano |
2b45e8 |
LD a1, 8 * SIZE(AO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c52, c52, a2, b5
|
|
kusano |
2b45e8 |
LD b5, 20 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c62, c62, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 9 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c72, c72, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 10 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c82, c82, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 11 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c11, c11, a4, b6
|
|
kusano |
2b45e8 |
LD a2, 3 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD3 c21, c21, a4, b2
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD1 c31, c31, a4, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c41, c41, a4, b4
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c12, c12, a2, b6
|
|
kusano |
2b45e8 |
LD b6, 24 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c22, c22, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 13 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c32, c32, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 14 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c42, c42, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 15 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c51, c51, a4, b7
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c61, c61, a4, b2
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD1 c71, c71, a4, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c81, c81, a4, b4
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c52, c52, a2, b7
|
|
kusano |
2b45e8 |
LD b7, 28 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c62, c62, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 17 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c72, c72, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 18 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c82, c82, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 19 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c11, c11, a3, b1
|
|
kusano |
2b45e8 |
LD a2, 5 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD3 c21, c21, a3, b2
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD1 c31, c31, a3, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c41, c41, a3, b4
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c12, c12, a2, b1
|
|
kusano |
2b45e8 |
LD b1, 32 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c22, c22, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 21 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c32, c32, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 22 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c42, c42, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 23 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c51, c51, a3, b5
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c61, c61, a3, b2
|
|
kusano |
2b45e8 |
LD a4, 6 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD1 c71, c71, a3, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c81, c81, a3, b4
|
|
kusano |
2b45e8 |
LD a3, 12 * SIZE(AO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c52, c52, a2, b5
|
|
kusano |
2b45e8 |
LD b5, 36 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c62, c62, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 25 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c72, c72, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 26 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c82, c82, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 27 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c11, c11, a4, b6
|
|
kusano |
2b45e8 |
LD a2, 7 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD3 c21, c21, a4, b2
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD1 c31, c31, a4, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c41, c41, a4, b4
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c12, c12, a2, b6
|
|
kusano |
2b45e8 |
LD b6, 40 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c22, c22, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 29 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c32, c32, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 30 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c42, c42, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 31 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c51, c51, a4, b7
|
|
kusano |
2b45e8 |
daddiu BO, BO, 32 * SIZE
|
|
kusano |
2b45e8 |
MADD3 c61, c61, a4, b2
|
|
kusano |
2b45e8 |
daddiu AO, AO, 8 * SIZE
|
|
kusano |
2b45e8 |
MADD1 c71, c71, a4, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c81, c81, a4, b4
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c52, c52, a2, b7
|
|
kusano |
2b45e8 |
LD b7, 12 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c62, c62, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 1 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c72, c72, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 2 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c82, c82, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 3 * SIZE(BO)
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L15:
|
|
kusano |
2b45e8 |
#ifndef TRMMKERNEL
|
|
kusano |
2b45e8 |
andi L, K, 3
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
andi L, TEMP, 3
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
blez L, .L18
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L16:
|
|
kusano |
2b45e8 |
MADD1 c11, c11, a1, b1
|
|
kusano |
2b45e8 |
LD a2, 1 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD3 c21, c21, a1, b2
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD1 c31, c31, a1, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c41, c41, a1, b4
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c12, c12, a2, b1
|
|
kusano |
2b45e8 |
LD b1, 8 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c22, c22, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 5 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c32, c32, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 6 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c42, c42, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 7 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c51, c51, a1, b5
|
|
kusano |
2b45e8 |
daddiu L, L, -1
|
|
kusano |
2b45e8 |
MADD3 c61, c61, a1, b2
|
|
kusano |
2b45e8 |
daddiu AO, AO, 2 * SIZE
|
|
kusano |
2b45e8 |
MADD1 c71, c71, a1, b3
|
|
kusano |
2b45e8 |
daddiu BO, BO, 8 * SIZE
|
|
kusano |
2b45e8 |
MADD3 c81, c81, a1, b4
|
|
kusano |
2b45e8 |
LD a1, 0 * SIZE(AO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c52, c52, a2, b5
|
|
kusano |
2b45e8 |
LD b5, 4 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c62, c62, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 1 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c72, c72, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 2 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c82, c82, a2, b4
|
|
kusano |
2b45e8 |
bgtz L, .L16
|
|
kusano |
2b45e8 |
LD b4, 3 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L18:
|
|
kusano |
2b45e8 |
#ifndef TRMMKERNEL
|
|
kusano |
2b45e8 |
LD b1, 0 * SIZE(CO1)
|
|
kusano |
2b45e8 |
ADD c11, c11, c22
|
|
kusano |
2b45e8 |
LD b2, 1 * SIZE(CO1)
|
|
kusano |
2b45e8 |
ADD c12, c12, c21
|
|
kusano |
2b45e8 |
LD b3, 0 * SIZE(CO2)
|
|
kusano |
2b45e8 |
ADD c31, c31, c42
|
|
kusano |
2b45e8 |
LD b4, 1 * SIZE(CO2)
|
|
kusano |
2b45e8 |
ADD c32, c32, c41
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LD b5, 0 * SIZE(CO3)
|
|
kusano |
2b45e8 |
ADD c51, c51, c62
|
|
kusano |
2b45e8 |
LD b6, 1 * SIZE(CO3)
|
|
kusano |
2b45e8 |
ADD c52, c52, c61
|
|
kusano |
2b45e8 |
LD b7, 0 * SIZE(CO4)
|
|
kusano |
2b45e8 |
ADD c71, c71, c82
|
|
kusano |
2b45e8 |
LD b8, 1 * SIZE(CO4)
|
|
kusano |
2b45e8 |
ADD c72, c72, c81
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD b1, b1, ALPHA_R, c11
|
|
kusano |
2b45e8 |
daddiu CO1,CO1, 2 * SIZE
|
|
kusano |
2b45e8 |
MADD b2, b2, ALPHA_R, c12
|
|
kusano |
2b45e8 |
daddiu CO2,CO2, 2 * SIZE
|
|
kusano |
2b45e8 |
MADD b3, b3, ALPHA_R, c31
|
|
kusano |
2b45e8 |
daddiu CO3,CO3, 2 * SIZE
|
|
kusano |
2b45e8 |
MADD b4, b4, ALPHA_R, c32
|
|
kusano |
2b45e8 |
daddiu CO4,CO4, 2 * SIZE
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD b5, b5, ALPHA_R, c51
|
|
kusano |
2b45e8 |
daddiu I, I, -1
|
|
kusano |
2b45e8 |
MADD b6, b6, ALPHA_R, c52
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD b7, b7, ALPHA_R, c71
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD b8, b8, ALPHA_R, c72
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
NMSUB b1, b1, ALPHA_I, c12
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD b2, b2, ALPHA_I, c11
|
|
kusano |
2b45e8 |
MTC $0, c11
|
|
kusano |
2b45e8 |
NMSUB b3, b3, ALPHA_I, c32
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD b4, b4, ALPHA_I, c31
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b1, -2 * SIZE(CO1)
|
|
kusano |
2b45e8 |
NMSUB b5, b5, ALPHA_I, c52
|
|
kusano |
2b45e8 |
ST b2, -1 * SIZE(CO1)
|
|
kusano |
2b45e8 |
MADD b6, b6, ALPHA_I, c51
|
|
kusano |
2b45e8 |
ST b3, -2 * SIZE(CO2)
|
|
kusano |
2b45e8 |
NMSUB b7, b7, ALPHA_I, c72
|
|
kusano |
2b45e8 |
ST b4, -1 * SIZE(CO2)
|
|
kusano |
2b45e8 |
MADD b8, b8, ALPHA_I, c71
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b5, -2 * SIZE(CO3)
|
|
kusano |
2b45e8 |
MOV c21, c11
|
|
kusano |
2b45e8 |
ST b6, -1 * SIZE(CO3)
|
|
kusano |
2b45e8 |
MOV c31, c11
|
|
kusano |
2b45e8 |
ST b7, -2 * SIZE(CO4)
|
|
kusano |
2b45e8 |
MOV c41, c11
|
|
kusano |
2b45e8 |
ST b8, -1 * SIZE(CO4)
|
|
kusano |
2b45e8 |
MOV c51, c11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ADD c11, c11, c22
|
|
kusano |
2b45e8 |
daddiu CO1,CO1, 2 * SIZE
|
|
kusano |
2b45e8 |
ADD c12, c12, c21
|
|
kusano |
2b45e8 |
daddiu CO2,CO2, 2 * SIZE
|
|
kusano |
2b45e8 |
ADD c31, c31, c42
|
|
kusano |
2b45e8 |
daddiu CO3,CO3, 2 * SIZE
|
|
kusano |
2b45e8 |
ADD c32, c32, c41
|
|
kusano |
2b45e8 |
daddiu CO4,CO4, 2 * SIZE
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ADD c51, c51, c62
|
|
kusano |
2b45e8 |
daddiu I, I, -1
|
|
kusano |
2b45e8 |
ADD c52, c52, c61
|
|
kusano |
2b45e8 |
ADD c71, c71, c82
|
|
kusano |
2b45e8 |
ADD c72, c72, c81
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MUL b1, ALPHA_R, c11
|
|
kusano |
2b45e8 |
MUL b2, ALPHA_R, c12
|
|
kusano |
2b45e8 |
MUL b3, ALPHA_R, c31
|
|
kusano |
2b45e8 |
MUL b4, ALPHA_R, c32
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MUL b5, ALPHA_R, c51
|
|
kusano |
2b45e8 |
MUL b6, ALPHA_R, c52
|
|
kusano |
2b45e8 |
MUL b7, ALPHA_R, c71
|
|
kusano |
2b45e8 |
MUL b8, ALPHA_R, c72
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
NMSUB b1, b1, ALPHA_I, c12
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD b2, b2, ALPHA_I, c11
|
|
kusano |
2b45e8 |
MTC $0, c11
|
|
kusano |
2b45e8 |
NMSUB b3, b3, ALPHA_I, c32
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD b4, b4, ALPHA_I, c31
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b1, -2 * SIZE(CO1)
|
|
kusano |
2b45e8 |
NMSUB b5, b5, ALPHA_I, c52
|
|
kusano |
2b45e8 |
ST b2, -1 * SIZE(CO1)
|
|
kusano |
2b45e8 |
MADD b6, b6, ALPHA_I, c51
|
|
kusano |
2b45e8 |
ST b3, -2 * SIZE(CO2)
|
|
kusano |
2b45e8 |
NMSUB b7, b7, ALPHA_I, c72
|
|
kusano |
2b45e8 |
ST b4, -1 * SIZE(CO2)
|
|
kusano |
2b45e8 |
MADD b8, b8, ALPHA_I, c71
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b5, -2 * SIZE(CO3)
|
|
kusano |
2b45e8 |
MOV c21, c11
|
|
kusano |
2b45e8 |
ST b6, -1 * SIZE(CO3)
|
|
kusano |
2b45e8 |
MOV c31, c11
|
|
kusano |
2b45e8 |
ST b7, -2 * SIZE(CO4)
|
|
kusano |
2b45e8 |
MOV c41, c11
|
|
kusano |
2b45e8 |
ST b8, -1 * SIZE(CO4)
|
|
kusano |
2b45e8 |
MOV c51, c11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if ( defined(LEFT) && defined(TRANSA)) || \
|
|
kusano |
2b45e8 |
(!defined(LEFT) && !defined(TRANSA))
|
|
kusano |
2b45e8 |
dsubu TEMP, K, KK
|
|
kusano |
2b45e8 |
#ifdef LEFT
|
|
kusano |
2b45e8 |
daddiu TEMP, TEMP, -1
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
daddiu TEMP, TEMP, -4
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
dsll L, TEMP, ZBASE_SHIFT
|
|
kusano |
2b45e8 |
dsll TEMP, TEMP, 2 + ZBASE_SHIFT
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
daddu AO, AO, L
|
|
kusano |
2b45e8 |
daddu BO, BO, TEMP
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef LEFT
|
|
kusano |
2b45e8 |
daddiu KK, KK, 1
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
bgtz I, .L11
|
|
kusano |
2b45e8 |
MOV c61, c11
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L19:
|
|
kusano |
2b45e8 |
#if defined(TRMMKERNEL) && !defined(LEFT)
|
|
kusano |
2b45e8 |
daddiu KK, KK, 4
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
bgtz J, .L10
|
|
kusano |
2b45e8 |
move B, BO
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L20:
|
|
kusano |
2b45e8 |
andi J, N, 2
|
|
kusano |
2b45e8 |
MTC $0, c11
|
|
kusano |
2b45e8 |
blez J, .L30
|
|
kusano |
2b45e8 |
move CO1, C
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
daddu CO2, C, LDC
|
|
kusano |
2b45e8 |
daddu C, CO2, LDC
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(TRMMKERNEL) && defined(LEFT)
|
|
kusano |
2b45e8 |
move KK, OFFSET
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
move I, M
|
|
kusano |
2b45e8 |
blez I, .L29
|
|
kusano |
2b45e8 |
move AO, A
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L21:
|
|
kusano |
2b45e8 |
#if defined(TRMMKERNEL)
|
|
kusano |
2b45e8 |
#if (defined(LEFT) && defined(TRANSA)) || (!defined(LEFT) && !defined(TRANSA))
|
|
kusano |
2b45e8 |
move BO, B
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
dsll L, KK, ZBASE_SHIFT
|
|
kusano |
2b45e8 |
dsll TEMP, KK, 1 + ZBASE_SHIFT
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
daddu AO, AO, L
|
|
kusano |
2b45e8 |
daddu BO, B, TEMP
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LD a1, 0 * SIZE(AO)
|
|
kusano |
2b45e8 |
MOV c21, c11
|
|
kusano |
2b45e8 |
LD b1, 0 * SIZE(BO)
|
|
kusano |
2b45e8 |
MOV c31, c11
|
|
kusano |
2b45e8 |
LD a3, 4 * SIZE(AO)
|
|
kusano |
2b45e8 |
MOV c41, c11
|
|
kusano |
2b45e8 |
LD b2, 1 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LD b3, 2 * SIZE(BO)
|
|
kusano |
2b45e8 |
MOV c12, c11
|
|
kusano |
2b45e8 |
LD b4, 3 * SIZE(BO)
|
|
kusano |
2b45e8 |
MOV c22, c11
|
|
kusano |
2b45e8 |
LD b5, 4 * SIZE(BO)
|
|
kusano |
2b45e8 |
MOV c32, c11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
|
|
kusano |
2b45e8 |
dsubu TEMP, K, KK
|
|
kusano |
2b45e8 |
#elif defined(LEFT)
|
|
kusano |
2b45e8 |
daddiu TEMP, KK, 1
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
daddiu TEMP, KK, 2
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
dsra L, TEMP, 2
|
|
kusano |
2b45e8 |
blez L, .L25
|
|
kusano |
2b45e8 |
MOV c42, c11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
LD a1, 0 * SIZE(AO)
|
|
kusano |
2b45e8 |
MOV c21, c11
|
|
kusano |
2b45e8 |
LD b1, 0 * SIZE(B)
|
|
kusano |
2b45e8 |
MOV c31, c11
|
|
kusano |
2b45e8 |
LD a3, 4 * SIZE(AO)
|
|
kusano |
2b45e8 |
MOV c41, c11
|
|
kusano |
2b45e8 |
LD b2, 1 * SIZE(B)
|
|
kusano |
2b45e8 |
dsra L, K, 2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LD b3, 2 * SIZE(B)
|
|
kusano |
2b45e8 |
MOV c12, c11
|
|
kusano |
2b45e8 |
LD b4, 3 * SIZE(B)
|
|
kusano |
2b45e8 |
MOV c22, c11
|
|
kusano |
2b45e8 |
LD b5, 4 * SIZE(B)
|
|
kusano |
2b45e8 |
MOV c32, c11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MOV c42, c11
|
|
kusano |
2b45e8 |
blez L, .L25
|
|
kusano |
2b45e8 |
move BO, B
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L22:
|
|
kusano |
2b45e8 |
MADD1 c11, c11, a1, b1
|
|
kusano |
2b45e8 |
LD a2, 1 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD3 c21, c21, a1, b2
|
|
kusano |
2b45e8 |
daddiu L, L, -1
|
|
kusano |
2b45e8 |
MADD1 c31, c31, a1, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c41, c41, a1, b4
|
|
kusano |
2b45e8 |
LD a1, 2 * SIZE(AO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c12, c12, a2, b1
|
|
kusano |
2b45e8 |
LD b1, 8 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c22, c22, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 5 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c32, c32, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 6 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c42, c42, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 7 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c11, c11, a1, b5
|
|
kusano |
2b45e8 |
LD a2, 3 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD3 c21, c21, a1, b2
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD1 c31, c31, a1, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c41, c41, a1, b4
|
|
kusano |
2b45e8 |
LD a1, 8 * SIZE(AO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c12, c12, a2, b5
|
|
kusano |
2b45e8 |
LD b5, 12 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c22, c22, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 9 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c32, c32, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 10 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c42, c42, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 11 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c11, c11, a3, b1
|
|
kusano |
2b45e8 |
LD a2, 5 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD3 c21, c21, a3, b2
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD1 c31, c31, a3, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c41, c41, a3, b4
|
|
kusano |
2b45e8 |
LD a3, 6 * SIZE(AO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c12, c12, a2, b1
|
|
kusano |
2b45e8 |
LD b1, 16 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c22, c22, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 13 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c32, c32, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 14 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c42, c42, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 15 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c11, c11, a3, b5
|
|
kusano |
2b45e8 |
LD a2, 7 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD3 c21, c21, a3, b2
|
|
kusano |
2b45e8 |
daddiu AO, AO, 8 * SIZE
|
|
kusano |
2b45e8 |
MADD1 c31, c31, a3, b3
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD3 c41, c41, a3, b4
|
|
kusano |
2b45e8 |
LD a3, 4 * SIZE(AO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c12, c12, a2, b5
|
|
kusano |
2b45e8 |
LD b5, 20 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c22, c22, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 17 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c32, c32, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 18 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c42, c42, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 19 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
bgtz L, .L22
|
|
kusano |
2b45e8 |
daddiu BO, BO, 16 * SIZE
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L25:
|
|
kusano |
2b45e8 |
#ifndef TRMMKERNEL
|
|
kusano |
2b45e8 |
andi L, K, 3
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
andi L, TEMP, 3
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
blez L, .L28
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L26:
|
|
kusano |
2b45e8 |
MADD1 c11, c11, a1, b1
|
|
kusano |
2b45e8 |
LD a2, 1 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD3 c21, c21, a1, b2
|
|
kusano |
2b45e8 |
daddiu L, L, -1
|
|
kusano |
2b45e8 |
MADD1 c31, c31, a1, b3
|
|
kusano |
2b45e8 |
daddiu BO, BO, 4 * SIZE
|
|
kusano |
2b45e8 |
MADD3 c41, c41, a1, b4
|
|
kusano |
2b45e8 |
LD a1, 2 * SIZE(AO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD2 c12, c12, a2, b1
|
|
kusano |
2b45e8 |
LD b1, 0 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c22, c22, a2, b2
|
|
kusano |
2b45e8 |
LD b2, 1 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD2 c32, c32, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 2 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c42, c42, a2, b4
|
|
kusano |
2b45e8 |
LD b4, 3 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
bgtz L, .L26
|
|
kusano |
2b45e8 |
daddiu AO, AO, 2 * SIZE
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L28:
|
|
kusano |
2b45e8 |
#ifndef TRMMKERNEL
|
|
kusano |
2b45e8 |
LD b1, 0 * SIZE(CO1)
|
|
kusano |
2b45e8 |
ADD c11, c11, c22
|
|
kusano |
2b45e8 |
LD b2, 1 * SIZE(CO1)
|
|
kusano |
2b45e8 |
ADD c12, c12, c21
|
|
kusano |
2b45e8 |
LD b3, 0 * SIZE(CO2)
|
|
kusano |
2b45e8 |
ADD c31, c31, c42
|
|
kusano |
2b45e8 |
LD b4, 1 * SIZE(CO2)
|
|
kusano |
2b45e8 |
ADD c32, c32, c41
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD b1, b1, ALPHA_R, c11
|
|
kusano |
2b45e8 |
daddiu CO1,CO1, 2 * SIZE
|
|
kusano |
2b45e8 |
MADD b2, b2, ALPHA_R, c12
|
|
kusano |
2b45e8 |
daddiu CO2,CO2, 2 * SIZE
|
|
kusano |
2b45e8 |
MADD b3, b3, ALPHA_R, c31
|
|
kusano |
2b45e8 |
daddiu I, I, -1
|
|
kusano |
2b45e8 |
MADD b4, b4, ALPHA_R, c32
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
NMSUB b1, b1, ALPHA_I, c12
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD b2, b2, ALPHA_I, c11
|
|
kusano |
2b45e8 |
MTC $0, c11
|
|
kusano |
2b45e8 |
NMSUB b3, b3, ALPHA_I, c32
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD b4, b4, ALPHA_I, c31
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b1, -2 * SIZE(CO1)
|
|
kusano |
2b45e8 |
ST b2, -1 * SIZE(CO1)
|
|
kusano |
2b45e8 |
ST b3, -2 * SIZE(CO2)
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
ADD c11, c11, c22
|
|
kusano |
2b45e8 |
ADD c12, c12, c21
|
|
kusano |
2b45e8 |
ADD c31, c31, c42
|
|
kusano |
2b45e8 |
ADD c32, c32, c41
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MUL b1, ALPHA_R, c11
|
|
kusano |
2b45e8 |
daddiu CO1,CO1, 2 * SIZE
|
|
kusano |
2b45e8 |
MUL b2, ALPHA_R, c12
|
|
kusano |
2b45e8 |
daddiu CO2,CO2, 2 * SIZE
|
|
kusano |
2b45e8 |
MUL b3, ALPHA_R, c31
|
|
kusano |
2b45e8 |
daddiu I, I, -1
|
|
kusano |
2b45e8 |
MUL b4, ALPHA_R, c32
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
NMSUB b1, b1, ALPHA_I, c12
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD b2, b2, ALPHA_I, c11
|
|
kusano |
2b45e8 |
MTC $0, c11
|
|
kusano |
2b45e8 |
NMSUB b3, b3, ALPHA_I, c32
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD b4, b4, ALPHA_I, c31
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b1, -2 * SIZE(CO1)
|
|
kusano |
2b45e8 |
ST b2, -1 * SIZE(CO1)
|
|
kusano |
2b45e8 |
ST b3, -2 * SIZE(CO2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if ( defined(LEFT) && defined(TRANSA)) || \
|
|
kusano |
2b45e8 |
(!defined(LEFT) && !defined(TRANSA))
|
|
kusano |
2b45e8 |
dsubu TEMP, K, KK
|
|
kusano |
2b45e8 |
#ifdef LEFT
|
|
kusano |
2b45e8 |
daddiu TEMP, TEMP, -1
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
daddiu TEMP, TEMP, -2
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
dsll L, TEMP, ZBASE_SHIFT
|
|
kusano |
2b45e8 |
dsll TEMP, TEMP, 1 + ZBASE_SHIFT
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
daddu AO, AO, L
|
|
kusano |
2b45e8 |
daddu BO, BO, TEMP
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef LEFT
|
|
kusano |
2b45e8 |
daddiu KK, KK, 1
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
bgtz I, .L21
|
|
kusano |
2b45e8 |
ST b4, -1 * SIZE(CO2)
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L29:
|
|
kusano |
2b45e8 |
#if defined(TRMMKERNEL) && !defined(LEFT)
|
|
kusano |
2b45e8 |
daddiu KK, KK, 2
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
move B, BO
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L30:
|
|
kusano |
2b45e8 |
andi J, N, 1
|
|
kusano |
2b45e8 |
MTC $0, c11
|
|
kusano |
2b45e8 |
blez J, .L999
|
|
kusano |
2b45e8 |
move CO1, C
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(TRMMKERNEL) && defined(LEFT)
|
|
kusano |
2b45e8 |
move KK, OFFSET
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
move I, M
|
|
kusano |
2b45e8 |
daddu C, CO1, LDC
|
|
kusano |
2b45e8 |
blez I, .L39
|
|
kusano |
2b45e8 |
move AO, A
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L31:
|
|
kusano |
2b45e8 |
#if defined(TRMMKERNEL)
|
|
kusano |
2b45e8 |
#if (defined(LEFT) && defined(TRANSA)) || (!defined(LEFT) && !defined(TRANSA))
|
|
kusano |
2b45e8 |
move BO, B
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
dsll TEMP, KK, ZBASE_SHIFT
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
daddu AO, AO, TEMP
|
|
kusano |
2b45e8 |
daddu BO, B, TEMP
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LD a1, 0 * SIZE(AO)
|
|
kusano |
2b45e8 |
MOV c21, c11
|
|
kusano |
2b45e8 |
LD b1, 0 * SIZE(BO)
|
|
kusano |
2b45e8 |
MOV c31, c11
|
|
kusano |
2b45e8 |
LD a2, 1 * SIZE(AO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MOV c41, c11
|
|
kusano |
2b45e8 |
LD b2, 1 * SIZE(BO)
|
|
kusano |
2b45e8 |
MOV c12, c11
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MOV c22, c11
|
|
kusano |
2b45e8 |
LD a3, 4 * SIZE(AO)
|
|
kusano |
2b45e8 |
MOV c32, c11
|
|
kusano |
2b45e8 |
LD b3, 4 * SIZE(BO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
|
|
kusano |
2b45e8 |
dsubu TEMP, K, KK
|
|
kusano |
2b45e8 |
#elif defined(LEFT)
|
|
kusano |
2b45e8 |
daddiu TEMP, KK, 1
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
daddiu TEMP, KK, 1
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
dsra L, TEMP, 2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
blez L, .L35
|
|
kusano |
2b45e8 |
MOV c42, c11
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
LD a1, 0 * SIZE(AO)
|
|
kusano |
2b45e8 |
MOV c21, c11
|
|
kusano |
2b45e8 |
LD b1, 0 * SIZE(B)
|
|
kusano |
2b45e8 |
MOV c31, c11
|
|
kusano |
2b45e8 |
LD a2, 1 * SIZE(AO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MOV c41, c11
|
|
kusano |
2b45e8 |
LD b2, 1 * SIZE(B)
|
|
kusano |
2b45e8 |
MOV c12, c11
|
|
kusano |
2b45e8 |
dsra L, K, 2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MOV c22, c11
|
|
kusano |
2b45e8 |
LD a3, 4 * SIZE(AO)
|
|
kusano |
2b45e8 |
MOV c32, c11
|
|
kusano |
2b45e8 |
LD b3, 4 * SIZE(B)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MOV c42, c11
|
|
kusano |
2b45e8 |
blez L, .L35
|
|
kusano |
2b45e8 |
move BO, B
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L32:
|
|
kusano |
2b45e8 |
MADD1 c11, c11, a1, b1
|
|
kusano |
2b45e8 |
LD b4, 3 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD3 c21, c21, a1, b2
|
|
kusano |
2b45e8 |
LD a1, 2 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD2 c12, c12, a2, b1
|
|
kusano |
2b45e8 |
LD b1, 2 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c22, c22, a2, b2
|
|
kusano |
2b45e8 |
LD a2, 3 * SIZE(AO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c11, c11, a1, b1
|
|
kusano |
2b45e8 |
LD b2, 5 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD3 c21, c21, a1, b4
|
|
kusano |
2b45e8 |
LD a1, 8 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD2 c12, c12, a2, b1
|
|
kusano |
2b45e8 |
LD b1, 8 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c22, c22, a2, b4
|
|
kusano |
2b45e8 |
LD a2, 5 * SIZE(AO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c11, c11, a3, b3
|
|
kusano |
2b45e8 |
LD b4, 7 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD3 c21, c21, a3, b2
|
|
kusano |
2b45e8 |
LD a3, 6 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD2 c12, c12, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 6 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c22, c22, a2, b2
|
|
kusano |
2b45e8 |
LD a2, 7 * SIZE(AO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD1 c11, c11, a3, b3
|
|
kusano |
2b45e8 |
LD b2, 9 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD3 c21, c21, a3, b4
|
|
kusano |
2b45e8 |
LD a3, 12 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD2 c12, c12, a2, b3
|
|
kusano |
2b45e8 |
LD b3, 12 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c22, c22, a2, b4
|
|
kusano |
2b45e8 |
LD a2, 9 * SIZE(AO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
daddiu AO, AO, 8 * SIZE
|
|
kusano |
2b45e8 |
daddiu L, L, -1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
bgtz L, .L32
|
|
kusano |
2b45e8 |
daddiu BO, BO, 8 * SIZE
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L35:
|
|
kusano |
2b45e8 |
#ifndef TRMMKERNEL
|
|
kusano |
2b45e8 |
andi L, K, 3
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
andi L, TEMP, 3
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
blez L, .L38
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L36:
|
|
kusano |
2b45e8 |
MADD1 c11, c11, a1, b1
|
|
kusano |
2b45e8 |
daddiu L, L, -1
|
|
kusano |
2b45e8 |
MADD3 c21, c21, a1, b2
|
|
kusano |
2b45e8 |
LD a1, 2 * SIZE(AO)
|
|
kusano |
2b45e8 |
MADD2 c12, c12, a2, b1
|
|
kusano |
2b45e8 |
LD b1, 2 * SIZE(BO)
|
|
kusano |
2b45e8 |
MADD4 c22, c22, a2, b2
|
|
kusano |
2b45e8 |
LD a2, 3 * SIZE(AO)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LD b2, 3 * SIZE(BO)
|
|
kusano |
2b45e8 |
daddiu BO, BO, 2 * SIZE
|
|
kusano |
2b45e8 |
bgtz L, .L36
|
|
kusano |
2b45e8 |
daddiu AO, AO, 2 * SIZE
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L38:
|
|
kusano |
2b45e8 |
#ifndef TRMMKERNEL
|
|
kusano |
2b45e8 |
LD b1, 0 * SIZE(CO1)
|
|
kusano |
2b45e8 |
ADD c11, c11, c22
|
|
kusano |
2b45e8 |
LD b2, 1 * SIZE(CO1)
|
|
kusano |
2b45e8 |
ADD c12, c12, c21
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MADD b1, b1, ALPHA_R, c11
|
|
kusano |
2b45e8 |
daddiu CO1,CO1, 2 * SIZE
|
|
kusano |
2b45e8 |
MADD b2, b2, ALPHA_R, c12
|
|
kusano |
2b45e8 |
daddiu I, I, -1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
NMSUB b1, b1, ALPHA_I, c12
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD b2, b2, ALPHA_I, c11
|
|
kusano |
2b45e8 |
MTC $0, c11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b1, -2 * SIZE(CO1)
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
bgtz I, .L31
|
|
kusano |
2b45e8 |
ST b2, -1 * SIZE(CO1)
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
ADD c11, c11, c22
|
|
kusano |
2b45e8 |
ADD c12, c12, c21
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MUL b1, ALPHA_R, c11
|
|
kusano |
2b45e8 |
daddiu CO1,CO1, 2 * SIZE
|
|
kusano |
2b45e8 |
MUL b2, ALPHA_R, c12
|
|
kusano |
2b45e8 |
daddiu I, I, -1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
NMSUB b1, b1, ALPHA_I, c12
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
MADD b2, b2, ALPHA_I, c11
|
|
kusano |
2b45e8 |
MTC $0, c11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if ( defined(LEFT) && defined(TRANSA)) || \
|
|
kusano |
2b45e8 |
(!defined(LEFT) && !defined(TRANSA))
|
|
kusano |
2b45e8 |
dsubu TEMP, K, KK
|
|
kusano |
2b45e8 |
#ifdef LEFT
|
|
kusano |
2b45e8 |
daddiu TEMP, TEMP, -1
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
daddiu TEMP, TEMP, -1
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
dsll TEMP, TEMP, ZBASE_SHIFT
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
daddu AO, AO, TEMP
|
|
kusano |
2b45e8 |
daddu BO, BO, TEMP
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef LEFT
|
|
kusano |
2b45e8 |
daddiu KK, KK, 1
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b1, -2 * SIZE(CO1)
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
bgtz I, .L31
|
|
kusano |
2b45e8 |
ST b2, -1 * SIZE(CO1)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L39:
|
|
kusano |
2b45e8 |
#if defined(TRMMKERNEL) && !defined(LEFT)
|
|
kusano |
2b45e8 |
daddiu KK, KK, 1
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
move B, BO
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L999:
|
|
kusano |
2b45e8 |
LDARG $16, 0($sp)
|
|
kusano |
2b45e8 |
LDARG $17, 8($sp)
|
|
kusano |
2b45e8 |
ldc1 $f24, 16($sp)
|
|
kusano |
2b45e8 |
ldc1 $f25, 24($sp)
|
|
kusano |
2b45e8 |
ldc1 $f26, 32($sp)
|
|
kusano |
2b45e8 |
ldc1 $f27, 40($sp)
|
|
kusano |
2b45e8 |
ldc1 $f28, 48($sp)
|
|
kusano |
2b45e8 |
ldc1 $f29, 56($sp)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(TRMMKERNEL)
|
|
kusano |
2b45e8 |
LDARG $18, 64($sp)
|
|
kusano |
2b45e8 |
LDARG $19, 72($sp)
|
|
kusano |
2b45e8 |
LDARG $20, 80($sp)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef __64BIT__
|
|
kusano |
2b45e8 |
ldc1 $f20, 88($sp)
|
|
kusano |
2b45e8 |
ldc1 $f21, 96($sp)
|
|
kusano |
2b45e8 |
ldc1 $f22,104($sp)
|
|
kusano |
2b45e8 |
ldc1 $f23,112($sp)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
j $31
|
|
kusano |
2b45e8 |
daddiu $sp, $sp, 128
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
EPILOGUE
|