|
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 N r3
|
|
kusano |
2b45e8 |
#define X r4
|
|
kusano |
2b45e8 |
#define INCX r5
|
|
kusano |
2b45e8 |
#define Y r6
|
|
kusano |
2b45e8 |
#define INCY r7
|
|
kusano |
2b45e8 |
#define PREA r8
|
|
kusano |
2b45e8 |
#define XX r9
|
|
kusano |
2b45e8 |
#define YY r10
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define INCXM1 r11
|
|
kusano |
2b45e8 |
#define INCYM1 r12
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define C f1
|
|
kusano |
2b45e8 |
#define S f2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define STACKSIZE 32
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef NEEDPARAM
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PROLOGUE
|
|
kusano |
2b45e8 |
PROFCODE
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addi SP, SP, -STACKSIZE
|
|
kusano |
2b45e8 |
li r0, 0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
stfd f14, 0(SP)
|
|
kusano |
2b45e8 |
stfd f15, 8(SP)
|
|
kusano |
2b45e8 |
stfd f16, 16(SP)
|
|
kusano |
2b45e8 |
stfd f17, 24(SP)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
slwi INCX, INCX, ZBASE_SHIFT
|
|
kusano |
2b45e8 |
slwi INCY, INCY, ZBASE_SHIFT
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
subi INCXM1, INCX, SIZE
|
|
kusano |
2b45e8 |
subi INCYM1, INCY, SIZE
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
li PREA, L1_PREFETCHSIZE
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
cmpwi cr0, N, 0
|
|
kusano |
2b45e8 |
ble- LL(999)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
cmpwi cr0, INCX, 2 * SIZE
|
|
kusano |
2b45e8 |
bne- cr0, LL(100)
|
|
kusano |
2b45e8 |
cmpwi cr0, INCY, 2 * SIZE
|
|
kusano |
2b45e8 |
bne- cr0, LL(100)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
srawi. r0, N, 3
|
|
kusano |
2b45e8 |
mtspr CTR, r0
|
|
kusano |
2b45e8 |
beq- cr0, LL(50)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f0, 0 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f4, 1 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f6, 2 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f8, 3 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f3, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f5, 1 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f7, 2 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f9, 3 * SIZE(Y)
|
|
kusano |
2b45e8 |
bdz LL(12)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(10):
|
|
kusano |
2b45e8 |
FMUL f10, C, f0
|
|
kusano |
2b45e8 |
FMUL f11, C, f3
|
|
kusano |
2b45e8 |
FMUL f12, C, f4
|
|
kusano |
2b45e8 |
FMUL f13, C, f5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMUL f14, C, f6
|
|
kusano |
2b45e8 |
FMUL f15, C, f7
|
|
kusano |
2b45e8 |
FMUL f16, C, f8
|
|
kusano |
2b45e8 |
FMUL f17, C, f9
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f10, S, f3, f10
|
|
kusano |
2b45e8 |
FNMSUB f11, S, f0, f11
|
|
kusano |
2b45e8 |
FMADD f12, S, f5, f12
|
|
kusano |
2b45e8 |
FNMSUB f13, S, f4, f13
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f14, S, f7, f14
|
|
kusano |
2b45e8 |
FNMSUB f15, S, f6, f15
|
|
kusano |
2b45e8 |
FMADD f16, S, f9, f16
|
|
kusano |
2b45e8 |
FNMSUB f17, S, f8, f17
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f0, 4 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f4, 5 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f6, 6 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f8, 7 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f3, 4 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f5, 5 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f7, 6 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f9, 7 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFD f10, 0 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f12, 1 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f14, 2 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f16, 3 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFD f11, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f13, 1 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f15, 2 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f17, 3 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMUL f10, C, f0
|
|
kusano |
2b45e8 |
FMUL f11, C, f3
|
|
kusano |
2b45e8 |
FMUL f12, C, f4
|
|
kusano |
2b45e8 |
FMUL f13, C, f5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMUL f14, C, f6
|
|
kusano |
2b45e8 |
FMUL f15, C, f7
|
|
kusano |
2b45e8 |
FMUL f16, C, f8
|
|
kusano |
2b45e8 |
FMUL f17, C, f9
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f10, S, f3, f10
|
|
kusano |
2b45e8 |
FNMSUB f11, S, f0, f11
|
|
kusano |
2b45e8 |
FMADD f12, S, f5, f12
|
|
kusano |
2b45e8 |
FNMSUB f13, S, f4, f13
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f14, S, f7, f14
|
|
kusano |
2b45e8 |
FNMSUB f15, S, f6, f15
|
|
kusano |
2b45e8 |
FMADD f16, S, f9, f16
|
|
kusano |
2b45e8 |
FNMSUB f17, S, f8, f17
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f0, 8 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f4, 9 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f6, 10 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f8, 11 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f3, 8 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f5, 9 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f7, 10 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f9, 11 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFD f10, 4 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f12, 5 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f14, 6 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f16, 7 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFD f11, 4 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f13, 5 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f15, 6 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f17, 7 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMUL f10, C, f0
|
|
kusano |
2b45e8 |
FMUL f11, C, f3
|
|
kusano |
2b45e8 |
FMUL f12, C, f4
|
|
kusano |
2b45e8 |
FMUL f13, C, f5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMUL f14, C, f6
|
|
kusano |
2b45e8 |
FMUL f15, C, f7
|
|
kusano |
2b45e8 |
FMUL f16, C, f8
|
|
kusano |
2b45e8 |
FMUL f17, C, f9
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f10, S, f3, f10
|
|
kusano |
2b45e8 |
FNMSUB f11, S, f0, f11
|
|
kusano |
2b45e8 |
FMADD f12, S, f5, f12
|
|
kusano |
2b45e8 |
FNMSUB f13, S, f4, f13
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f14, S, f7, f14
|
|
kusano |
2b45e8 |
FNMSUB f15, S, f6, f15
|
|
kusano |
2b45e8 |
FMADD f16, S, f9, f16
|
|
kusano |
2b45e8 |
FNMSUB f17, S, f8, f17
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f0, 12 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f4, 13 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f6, 14 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f8, 15 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f3, 12 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f5, 13 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f7, 14 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f9, 15 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFD f10, 8 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f12, 9 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f14, 10 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f16, 11 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFD f11, 8 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f13, 9 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f15, 10 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f17, 11 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMUL f10, C, f0
|
|
kusano |
2b45e8 |
FMUL f11, C, f3
|
|
kusano |
2b45e8 |
FMUL f12, C, f4
|
|
kusano |
2b45e8 |
FMUL f13, C, f5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMUL f14, C, f6
|
|
kusano |
2b45e8 |
FMUL f15, C, f7
|
|
kusano |
2b45e8 |
FMUL f16, C, f8
|
|
kusano |
2b45e8 |
FMUL f17, C, f9
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f10, S, f3, f10
|
|
kusano |
2b45e8 |
FNMSUB f11, S, f0, f11
|
|
kusano |
2b45e8 |
FMADD f12, S, f5, f12
|
|
kusano |
2b45e8 |
FNMSUB f13, S, f4, f13
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f14, S, f7, f14
|
|
kusano |
2b45e8 |
FNMSUB f15, S, f6, f15
|
|
kusano |
2b45e8 |
FMADD f16, S, f9, f16
|
|
kusano |
2b45e8 |
FNMSUB f17, S, f8, f17
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f0, 16 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f4, 17 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f6, 18 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f8, 19 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f3, 16 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f5, 17 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f7, 18 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f9, 19 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFD f10, 12 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f12, 13 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f14, 14 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f16, 15 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFD f11, 12 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f13, 13 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f15, 14 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f17, 15 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef POWER6
|
|
kusano |
2b45e8 |
dcbtst X, PREA
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
addi X, X, 16 * SIZE
|
|
kusano |
2b45e8 |
addi Y, Y, 16 * SIZE
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef POWER6
|
|
kusano |
2b45e8 |
dcbtst X, PREA
|
|
kusano |
2b45e8 |
dcbtst X, PREA
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
bdnz LL(10)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(12):
|
|
kusano |
2b45e8 |
FMUL f10, C, f0
|
|
kusano |
2b45e8 |
FMUL f11, C, f3
|
|
kusano |
2b45e8 |
FMUL f12, C, f4
|
|
kusano |
2b45e8 |
FMUL f13, C, f5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMUL f14, C, f6
|
|
kusano |
2b45e8 |
FMUL f15, C, f7
|
|
kusano |
2b45e8 |
FMUL f16, C, f8
|
|
kusano |
2b45e8 |
FMUL f17, C, f9
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f10, S, f3, f10
|
|
kusano |
2b45e8 |
FNMSUB f11, S, f0, f11
|
|
kusano |
2b45e8 |
FMADD f12, S, f5, f12
|
|
kusano |
2b45e8 |
FNMSUB f13, S, f4, f13
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f14, S, f7, f14
|
|
kusano |
2b45e8 |
FNMSUB f15, S, f6, f15
|
|
kusano |
2b45e8 |
FMADD f16, S, f9, f16
|
|
kusano |
2b45e8 |
FNMSUB f17, S, f8, f17
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFD f10, 0 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f12, 1 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f14, 2 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f16, 3 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFD f11, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f13, 1 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f15, 2 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f17, 3 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f0, 4 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f4, 5 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f6, 6 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f8, 7 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f3, 4 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f5, 5 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f7, 6 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f9, 7 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMUL f10, C, f0
|
|
kusano |
2b45e8 |
FMUL f11, C, f3
|
|
kusano |
2b45e8 |
FMUL f12, C, f4
|
|
kusano |
2b45e8 |
FMUL f13, C, f5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMUL f14, C, f6
|
|
kusano |
2b45e8 |
FMUL f15, C, f7
|
|
kusano |
2b45e8 |
FMUL f16, C, f8
|
|
kusano |
2b45e8 |
FMUL f17, C, f9
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f10, S, f3, f10
|
|
kusano |
2b45e8 |
FNMSUB f11, S, f0, f11
|
|
kusano |
2b45e8 |
FMADD f12, S, f5, f12
|
|
kusano |
2b45e8 |
FNMSUB f13, S, f4, f13
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f14, S, f7, f14
|
|
kusano |
2b45e8 |
FNMSUB f15, S, f6, f15
|
|
kusano |
2b45e8 |
FMADD f16, S, f9, f16
|
|
kusano |
2b45e8 |
FNMSUB f17, S, f8, f17
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFD f10, 4 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f12, 5 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f14, 6 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f16, 7 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFD f11, 4 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f13, 5 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f15, 6 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f17, 7 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f0, 8 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f4, 9 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f6, 10 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f8, 11 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f3, 8 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f5, 9 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f7, 10 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f9, 11 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMUL f10, C, f0
|
|
kusano |
2b45e8 |
FMUL f11, C, f3
|
|
kusano |
2b45e8 |
FMUL f12, C, f4
|
|
kusano |
2b45e8 |
FMUL f13, C, f5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMUL f14, C, f6
|
|
kusano |
2b45e8 |
FMUL f15, C, f7
|
|
kusano |
2b45e8 |
FMUL f16, C, f8
|
|
kusano |
2b45e8 |
FMUL f17, C, f9
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f10, S, f3, f10
|
|
kusano |
2b45e8 |
FNMSUB f11, S, f0, f11
|
|
kusano |
2b45e8 |
FMADD f12, S, f5, f12
|
|
kusano |
2b45e8 |
FNMSUB f13, S, f4, f13
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f14, S, f7, f14
|
|
kusano |
2b45e8 |
FNMSUB f15, S, f6, f15
|
|
kusano |
2b45e8 |
FMADD f16, S, f9, f16
|
|
kusano |
2b45e8 |
FNMSUB f17, S, f8, f17
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFD f10, 8 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f12, 9 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f14, 10 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f16, 11 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFD f11, 8 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f13, 9 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f15, 10 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f17, 11 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f0, 12 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f4, 13 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f6, 14 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f8, 15 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f3, 12 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f5, 13 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f7, 14 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f9, 15 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMUL f10, C, f0
|
|
kusano |
2b45e8 |
FMUL f11, C, f3
|
|
kusano |
2b45e8 |
FMUL f12, C, f4
|
|
kusano |
2b45e8 |
FMUL f13, C, f5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMUL f14, C, f6
|
|
kusano |
2b45e8 |
FMUL f15, C, f7
|
|
kusano |
2b45e8 |
FMUL f16, C, f8
|
|
kusano |
2b45e8 |
FMUL f17, C, f9
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f10, S, f3, f10
|
|
kusano |
2b45e8 |
FNMSUB f11, S, f0, f11
|
|
kusano |
2b45e8 |
FMADD f12, S, f5, f12
|
|
kusano |
2b45e8 |
FNMSUB f13, S, f4, f13
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f14, S, f7, f14
|
|
kusano |
2b45e8 |
FNMSUB f15, S, f6, f15
|
|
kusano |
2b45e8 |
FMADD f16, S, f9, f16
|
|
kusano |
2b45e8 |
FNMSUB f17, S, f8, f17
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFD f10, 12 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f12, 13 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f14, 14 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f16, 15 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFD f11, 12 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f13, 13 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f15, 14 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f17, 15 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addi X, X, 16 * SIZE
|
|
kusano |
2b45e8 |
addi Y, Y, 16 * SIZE
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(50):
|
|
kusano |
2b45e8 |
andi. r0, N, 7
|
|
kusano |
2b45e8 |
mtspr CTR, r0
|
|
kusano |
2b45e8 |
beq LL(999)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(60):
|
|
kusano |
2b45e8 |
LFD f3, 0 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f4, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f5, 1 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f6, 1 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMUL f10, C, f3
|
|
kusano |
2b45e8 |
FMUL f11, C, f4
|
|
kusano |
2b45e8 |
FMUL f12, C, f5
|
|
kusano |
2b45e8 |
FMUL f13, C, f6
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f10, S, f4, f10
|
|
kusano |
2b45e8 |
FNMSUB f11, S, f3, f11
|
|
kusano |
2b45e8 |
FMADD f12, S, f6, f12
|
|
kusano |
2b45e8 |
FNMSUB f13, S, f5, f13
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFD f10, 0 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f11, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
STFD f12, 1 * SIZE(X)
|
|
kusano |
2b45e8 |
STFD f13, 1 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addi X, X, 2 * SIZE
|
|
kusano |
2b45e8 |
addi Y, Y, 2 * SIZE
|
|
kusano |
2b45e8 |
bdnz LL(60)
|
|
kusano |
2b45e8 |
b LL(999)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(100):
|
|
kusano |
2b45e8 |
sub X, X, INCXM1
|
|
kusano |
2b45e8 |
sub Y, Y, INCYM1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mr XX, X
|
|
kusano |
2b45e8 |
mr YY, Y
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
srawi. r0, N, 2
|
|
kusano |
2b45e8 |
mtspr CTR, r0
|
|
kusano |
2b45e8 |
beq- LL(150)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(110):
|
|
kusano |
2b45e8 |
LFDX f0, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f3, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f4, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f5, Y, INCY
|
|
kusano |
2b45e8 |
LFDX f6, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f7, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f8, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f9, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMUL f10, C, f0
|
|
kusano |
2b45e8 |
FMUL f11, C, f3
|
|
kusano |
2b45e8 |
FMUL f12, C, f4
|
|
kusano |
2b45e8 |
FMUL f13, C, f5
|
|
kusano |
2b45e8 |
FMUL f14, C, f6
|
|
kusano |
2b45e8 |
FMUL f15, C, f7
|
|
kusano |
2b45e8 |
FMUL f16, C, f8
|
|
kusano |
2b45e8 |
FMUL f17, C, f9
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f10, S, f3, f10
|
|
kusano |
2b45e8 |
FNMSUB f11, S, f0, f11
|
|
kusano |
2b45e8 |
FMADD f12, S, f5, f12
|
|
kusano |
2b45e8 |
FNMSUB f13, S, f4, f13
|
|
kusano |
2b45e8 |
FMADD f14, S, f7, f14
|
|
kusano |
2b45e8 |
FNMSUB f15, S, f6, f15
|
|
kusano |
2b45e8 |
FMADD f16, S, f9, f16
|
|
kusano |
2b45e8 |
FNMSUB f17, S, f8, f17
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFDX f10, XX, INCXM1
|
|
kusano |
2b45e8 |
STFDX f11, YY, INCYM1
|
|
kusano |
2b45e8 |
STFDUX f12, XX, INCX
|
|
kusano |
2b45e8 |
STFDUX f13, YY, INCY
|
|
kusano |
2b45e8 |
STFDX f14, XX, INCXM1
|
|
kusano |
2b45e8 |
STFDX f15, YY, INCYM1
|
|
kusano |
2b45e8 |
STFDUX f16, XX, INCX
|
|
kusano |
2b45e8 |
STFDUX f17, YY, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDX f0, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f3, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f4, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f5, Y, INCY
|
|
kusano |
2b45e8 |
LFDX f6, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f7, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f8, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f9, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMUL f10, C, f0
|
|
kusano |
2b45e8 |
FMUL f11, C, f3
|
|
kusano |
2b45e8 |
FMUL f12, C, f4
|
|
kusano |
2b45e8 |
FMUL f13, C, f5
|
|
kusano |
2b45e8 |
FMUL f14, C, f6
|
|
kusano |
2b45e8 |
FMUL f15, C, f7
|
|
kusano |
2b45e8 |
FMUL f16, C, f8
|
|
kusano |
2b45e8 |
FMUL f17, C, f9
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f10, S, f3, f10
|
|
kusano |
2b45e8 |
FNMSUB f11, S, f0, f11
|
|
kusano |
2b45e8 |
FMADD f12, S, f5, f12
|
|
kusano |
2b45e8 |
FNMSUB f13, S, f4, f13
|
|
kusano |
2b45e8 |
FMADD f14, S, f7, f14
|
|
kusano |
2b45e8 |
FNMSUB f15, S, f6, f15
|
|
kusano |
2b45e8 |
FMADD f16, S, f9, f16
|
|
kusano |
2b45e8 |
FNMSUB f17, S, f8, f17
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFDX f10, XX, INCXM1
|
|
kusano |
2b45e8 |
STFDX f11, YY, INCYM1
|
|
kusano |
2b45e8 |
STFDUX f12, XX, INCX
|
|
kusano |
2b45e8 |
STFDUX f13, YY, INCY
|
|
kusano |
2b45e8 |
STFDX f14, XX, INCXM1
|
|
kusano |
2b45e8 |
STFDX f15, YY, INCYM1
|
|
kusano |
2b45e8 |
STFDUX f16, XX, INCX
|
|
kusano |
2b45e8 |
STFDUX f17, YY, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
bdnz LL(110)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(150):
|
|
kusano |
2b45e8 |
andi. r0, N, 3
|
|
kusano |
2b45e8 |
mtspr CTR, r0
|
|
kusano |
2b45e8 |
beq LL(999)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(160):
|
|
kusano |
2b45e8 |
LFDX f0, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f3, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f4, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f5, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMUL f10, C, f0
|
|
kusano |
2b45e8 |
FMUL f11, C, f3
|
|
kusano |
2b45e8 |
FMUL f12, C, f4
|
|
kusano |
2b45e8 |
FMUL f13, C, f5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f10, S, f3, f10
|
|
kusano |
2b45e8 |
FNMSUB f11, S, f0, f11
|
|
kusano |
2b45e8 |
FMADD f12, S, f5, f12
|
|
kusano |
2b45e8 |
FNMSUB f13, S, f4, f13
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFDX f10, XX, INCXM1
|
|
kusano |
2b45e8 |
STFDX f11, YY, INCYM1
|
|
kusano |
2b45e8 |
STFDUX f12, XX, INCX
|
|
kusano |
2b45e8 |
STFDUX f13, YY, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
bdnz LL(160)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(999):
|
|
kusano |
2b45e8 |
lfd f14, 0(SP)
|
|
kusano |
2b45e8 |
lfd f15, 8(SP)
|
|
kusano |
2b45e8 |
lfd f16, 16(SP)
|
|
kusano |
2b45e8 |
lfd f17, 24(SP)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addi SP, SP, STACKSIZE
|
|
kusano |
2b45e8 |
blr
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
EPILOGUE
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#endif
|