|
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 C $6
|
|
kusano |
2b45e8 |
#define LDC $7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define I $2
|
|
kusano |
2b45e8 |
#define J $3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define CO1 $8
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define a1 $f0
|
|
kusano |
2b45e8 |
#define a2 $f1
|
|
kusano |
2b45e8 |
#define a3 $f2
|
|
kusano |
2b45e8 |
#define a4 $f3
|
|
kusano |
2b45e8 |
#define b1 $f4
|
|
kusano |
2b45e8 |
#define b2 $f5
|
|
kusano |
2b45e8 |
#define b3 $f6
|
|
kusano |
2b45e8 |
#define b4 $f7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define FZERO $f8
|
|
kusano |
2b45e8 |
#define ALPHA $f15
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PROLOGUE
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LDARG C, 0($sp)
|
|
kusano |
2b45e8 |
MTC $0, FZERO
|
|
kusano |
2b45e8 |
LDARG LDC, 8($sp)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
dsll LDC, LDC, BASE_SHIFT
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
move J, N
|
|
kusano |
2b45e8 |
blez J, .L999
|
|
kusano |
2b45e8 |
nop
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L10:
|
|
kusano |
2b45e8 |
move CO1, C
|
|
kusano |
2b45e8 |
dsra I, M, 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
blez I, .L15
|
|
kusano |
2b45e8 |
daddu C, C, LDC
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LD a1, 0 * SIZE(CO1)
|
|
kusano |
2b45e8 |
LD a2, 1 * SIZE(CO1)
|
|
kusano |
2b45e8 |
LD a3, 2 * SIZE(CO1)
|
|
kusano |
2b45e8 |
LD a4, 3 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MUL b1, ALPHA, a1
|
|
kusano |
2b45e8 |
LD a1, 4 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MUL b2, ALPHA, a2
|
|
kusano |
2b45e8 |
daddiu I, I, -1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
blez I, .L13
|
|
kusano |
2b45e8 |
LD a2, 5 * SIZE(CO1)
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L12:
|
|
kusano |
2b45e8 |
MUL b3, ALPHA, a3
|
|
kusano |
2b45e8 |
LD a3, 6 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b1, 0 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MUL b4, ALPHA, a4
|
|
kusano |
2b45e8 |
LD a4, 7 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b2, 1 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MUL b1, ALPHA, a1
|
|
kusano |
2b45e8 |
LD a1, 8 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b3, 2 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MUL b2, ALPHA, a2
|
|
kusano |
2b45e8 |
LD a2, 9 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b4, 3 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MUL b3, ALPHA, a3
|
|
kusano |
2b45e8 |
LD a3, 10 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b1, 4 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MUL b4, ALPHA, a4
|
|
kusano |
2b45e8 |
LD a4, 11 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b2, 5 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MUL b1, ALPHA, a1
|
|
kusano |
2b45e8 |
LD a1, 12 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b3, 6 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MUL b2, ALPHA, a2
|
|
kusano |
2b45e8 |
LD a2, 13 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b4, 7 * SIZE(CO1)
|
|
kusano |
2b45e8 |
daddiu I, I, -1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
bgtz I, .L12
|
|
kusano |
2b45e8 |
daddiu CO1, CO1, 8 * SIZE
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L13:
|
|
kusano |
2b45e8 |
MUL b3, ALPHA, a3
|
|
kusano |
2b45e8 |
LD a3, 6 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b1, 0 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MUL b4, ALPHA, a4
|
|
kusano |
2b45e8 |
LD a4, 7 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b2, 1 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MUL b1, ALPHA, a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b3, 2 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MUL b2, ALPHA, a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b4, 3 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MUL b3, ALPHA, a3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b1, 4 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MUL b4, ALPHA, a4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ST b2, 5 * SIZE(CO1)
|
|
kusano |
2b45e8 |
ST b3, 6 * SIZE(CO1)
|
|
kusano |
2b45e8 |
ST b4, 7 * SIZE(CO1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
daddiu CO1, CO1, 8 * SIZE
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L15:
|
|
kusano |
2b45e8 |
andi I, M, 7
|
|
kusano |
2b45e8 |
daddiu J, J, -1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
blez I, .L18
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L16:
|
|
kusano |
2b45e8 |
LD a1, 0 * SIZE(CO1)
|
|
kusano |
2b45e8 |
daddiu I, I, -1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MUL b1, ALPHA, a1
|
|
kusano |
2b45e8 |
daddiu CO1, CO1, 1 * SIZE
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
bgtz I, .L16
|
|
kusano |
2b45e8 |
ST b1, -1 * SIZE(CO1)
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L18:
|
|
kusano |
2b45e8 |
bgtz J, .L10
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
.align 3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L999:
|
|
kusano |
2b45e8 |
j $31
|
|
kusano |
2b45e8 |
NOP
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
EPILOGUE
|