|
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 |
#if defined(F_INTERFACE) && defined(F_INTERFACE_F2C)
|
|
kusano |
2b45e8 |
#define RESULT r3
|
|
kusano |
2b45e8 |
#define N r4
|
|
kusano |
2b45e8 |
#define X r5
|
|
kusano |
2b45e8 |
#define INCX r6
|
|
kusano |
2b45e8 |
#define Y r7
|
|
kusano |
2b45e8 |
#define INCY r8
|
|
kusano |
2b45e8 |
#define PREA r9
|
|
kusano |
2b45e8 |
#else
|
|
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 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define INCXM1 r10
|
|
kusano |
2b45e8 |
#define INCYM1 r11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define FZERO f0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define STACKSIZE 160
|
|
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 |
stfd f18, 32(SP)
|
|
kusano |
2b45e8 |
stfd f19, 40(SP)
|
|
kusano |
2b45e8 |
stfd f20, 48(SP)
|
|
kusano |
2b45e8 |
stfd f21, 56(SP)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
stfd f22, 64(SP)
|
|
kusano |
2b45e8 |
stfd f23, 72(SP)
|
|
kusano |
2b45e8 |
stfd f24, 80(SP)
|
|
kusano |
2b45e8 |
stfd f25, 88(SP)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
stfd f26, 96(SP)
|
|
kusano |
2b45e8 |
stfd f27, 104(SP)
|
|
kusano |
2b45e8 |
stfd f28, 112(SP)
|
|
kusano |
2b45e8 |
stfd f29, 120(SP)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
stfd f30, 128(SP)
|
|
kusano |
2b45e8 |
stfd f31, 136(SP)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
stw r0, 144(SP)
|
|
kusano |
2b45e8 |
lfs FZERO,144(SP)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef F_INTERFACE
|
|
kusano |
2b45e8 |
LDINT N, 0(N)
|
|
kusano |
2b45e8 |
LDINT INCX, 0(INCX)
|
|
kusano |
2b45e8 |
LDINT INCY, 0(INCY)
|
|
kusano |
2b45e8 |
#endif
|
|
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 |
fmr f1, FZERO
|
|
kusano |
2b45e8 |
fmr f2, FZERO
|
|
kusano |
2b45e8 |
fmr f3, FZERO
|
|
kusano |
2b45e8 |
fmr f4, FZERO
|
|
kusano |
2b45e8 |
fmr f5, FZERO
|
|
kusano |
2b45e8 |
fmr f6, FZERO
|
|
kusano |
2b45e8 |
fmr f7, FZERO
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fmr f24, FZERO
|
|
kusano |
2b45e8 |
fmr f25, FZERO
|
|
kusano |
2b45e8 |
fmr f26, FZERO
|
|
kusano |
2b45e8 |
fmr f27, FZERO
|
|
kusano |
2b45e8 |
fmr f28, FZERO
|
|
kusano |
2b45e8 |
fmr f29, FZERO
|
|
kusano |
2b45e8 |
fmr f30, FZERO
|
|
kusano |
2b45e8 |
fmr f31, FZERO
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef L1_DUALFETCH
|
|
kusano |
2b45e8 |
li PREA, (L1_PREFETCHSIZE) / 2
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
li PREA, (L1_PREFETCHSIZE)
|
|
kusano |
2b45e8 |
#endif
|
|
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 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f8, 0 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f9, 1 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f10, 2 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f11, 3 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f16, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f17, 1 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f18, 2 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f19, 3 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f12, 4 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f13, 5 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f14, 6 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f15, 7 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f20, 4 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f21, 5 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f22, 6 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f23, 7 * SIZE(Y)
|
|
kusano |
2b45e8 |
bdz LL(20)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(10):
|
|
kusano |
2b45e8 |
FMADD f0, f8, f16, f0
|
|
kusano |
2b45e8 |
FMADD f1, f9, f17, f1
|
|
kusano |
2b45e8 |
FMADD f2, f9, f16, f2
|
|
kusano |
2b45e8 |
FMADD f3, f8, f17, f3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f4, f10, f18, f4
|
|
kusano |
2b45e8 |
FMADD f5, f11, f19, f5
|
|
kusano |
2b45e8 |
FMADD f6, f11, f18, f6
|
|
kusano |
2b45e8 |
FMADD f7, f10, f19, f7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f8, 8 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f9, 9 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f10, 10 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f11, 11 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f16, 8 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f17, 9 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f18, 10 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f19, 11 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f24, f12, f20, f24
|
|
kusano |
2b45e8 |
FMADD f25, f13, f21, f25
|
|
kusano |
2b45e8 |
FMADD f26, f13, f20, f26
|
|
kusano |
2b45e8 |
FMADD f27, f12, f21, f27
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f28, f14, f22, f28
|
|
kusano |
2b45e8 |
FMADD f29, f15, f23, f29
|
|
kusano |
2b45e8 |
FMADD f30, f15, f22, f30
|
|
kusano |
2b45e8 |
FMADD f31, f14, f23, f31
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f12, 12 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f13, 13 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f14, 14 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f15, 15 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f20, 12 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f21, 13 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f22, 14 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f23, 15 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f0, f8, f16, f0
|
|
kusano |
2b45e8 |
FMADD f1, f9, f17, f1
|
|
kusano |
2b45e8 |
FMADD f2, f9, f16, f2
|
|
kusano |
2b45e8 |
FMADD f3, f8, f17, f3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f4, f10, f18, f4
|
|
kusano |
2b45e8 |
FMADD f5, f11, f19, f5
|
|
kusano |
2b45e8 |
FMADD f6, f11, f18, f6
|
|
kusano |
2b45e8 |
FMADD f7, f10, f19, f7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f8, 16 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f9, 17 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f10, 18 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f11, 19 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f16, 16 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f17, 17 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f18, 18 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f19, 19 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f24, f12, f20, f24
|
|
kusano |
2b45e8 |
FMADD f25, f13, f21, f25
|
|
kusano |
2b45e8 |
FMADD f26, f13, f20, f26
|
|
kusano |
2b45e8 |
FMADD f27, f12, f21, f27
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f28, f14, f22, f28
|
|
kusano |
2b45e8 |
FMADD f29, f15, f23, f29
|
|
kusano |
2b45e8 |
FMADD f30, f15, f22, f30
|
|
kusano |
2b45e8 |
FMADD f31, f14, f23, f31
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f12, 20 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f13, 21 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f14, 22 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f15, 23 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f20, 20 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f21, 21 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f22, 22 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f23, 23 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef POWER6
|
|
kusano |
2b45e8 |
L1_PREFETCH X, PREA
|
|
kusano |
2b45e8 |
#ifdef L1_DUALFETCH
|
|
kusano |
2b45e8 |
L1_PREFETCH Y, PREA
|
|
kusano |
2b45e8 |
#endif
|
|
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 |
L1_PREFETCH X, PREA
|
|
kusano |
2b45e8 |
#ifdef L1_DUALFETCH
|
|
kusano |
2b45e8 |
L1_PREFETCH Y, PREA
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
bdnz LL(10)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(20):
|
|
kusano |
2b45e8 |
FMADD f0, f8, f16, f0
|
|
kusano |
2b45e8 |
FMADD f1, f9, f17, f1
|
|
kusano |
2b45e8 |
FMADD f2, f9, f16, f2
|
|
kusano |
2b45e8 |
FMADD f3, f8, f17, f3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f4, f10, f18, f4
|
|
kusano |
2b45e8 |
FMADD f5, f11, f19, f5
|
|
kusano |
2b45e8 |
FMADD f6, f11, f18, f6
|
|
kusano |
2b45e8 |
FMADD f7, f10, f19, f7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f8, 8 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f9, 9 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f10, 10 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f11, 11 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f16, 8 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f17, 9 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f18, 10 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f19, 11 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f24, f12, f20, f24
|
|
kusano |
2b45e8 |
FMADD f25, f13, f21, f25
|
|
kusano |
2b45e8 |
FMADD f26, f13, f20, f26
|
|
kusano |
2b45e8 |
FMADD f27, f12, f21, f27
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f28, f14, f22, f28
|
|
kusano |
2b45e8 |
FMADD f29, f15, f23, f29
|
|
kusano |
2b45e8 |
FMADD f30, f15, f22, f30
|
|
kusano |
2b45e8 |
FMADD f31, f14, f23, f31
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f12, 12 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f13, 13 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f14, 14 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f15, 15 * SIZE(X)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFD f20, 12 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f21, 13 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f22, 14 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f23, 15 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f0, f8, f16, f0
|
|
kusano |
2b45e8 |
FMADD f1, f9, f17, f1
|
|
kusano |
2b45e8 |
FMADD f2, f9, f16, f2
|
|
kusano |
2b45e8 |
FMADD f3, f8, f17, f3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f4, f10, f18, f4
|
|
kusano |
2b45e8 |
FMADD f5, f11, f19, f5
|
|
kusano |
2b45e8 |
FMADD f6, f11, f18, f6
|
|
kusano |
2b45e8 |
FMADD f7, f10, f19, f7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f24, f12, f20, f24
|
|
kusano |
2b45e8 |
FMADD f25, f13, f21, f25
|
|
kusano |
2b45e8 |
FMADD f26, f13, f20, f26
|
|
kusano |
2b45e8 |
FMADD f27, f12, f21, f27
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f28, f14, f22, f28
|
|
kusano |
2b45e8 |
FMADD f29, f15, f23, f29
|
|
kusano |
2b45e8 |
FMADD f30, f15, f22, f30
|
|
kusano |
2b45e8 |
FMADD f31, f14, f23, f31
|
|
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 f8, 0 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f9, 1 * SIZE(X)
|
|
kusano |
2b45e8 |
LFD f16, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
LFD f17, 1 * SIZE(Y)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addi X, X, 2 * SIZE
|
|
kusano |
2b45e8 |
addi Y, Y, 2 * SIZE
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f0, f8, f16, f0
|
|
kusano |
2b45e8 |
FMADD f1, f9, f17, f1
|
|
kusano |
2b45e8 |
FMADD f2, f9, f16, f2
|
|
kusano |
2b45e8 |
FMADD f3, f8, f17, f3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
bdnz LL(60)
|
|
kusano |
2b45e8 |
b LL(999)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(100):
|
|
kusano |
2b45e8 |
#ifdef F_INTERFACE
|
|
kusano |
2b45e8 |
cmpwi cr0, INCX, 0
|
|
kusano |
2b45e8 |
bge+ LL(102)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
subi r0, N, 1
|
|
kusano |
2b45e8 |
mullw r0, r0, INCX
|
|
kusano |
2b45e8 |
sub X, X, r0
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(102):
|
|
kusano |
2b45e8 |
cmpwi cr0, INCY, 0
|
|
kusano |
2b45e8 |
bge+ LL(104)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
subi r0, N, 1
|
|
kusano |
2b45e8 |
mullw r0, r0, INCY
|
|
kusano |
2b45e8 |
sub Y, Y, r0
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(104):
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
sub X, X, INCXM1
|
|
kusano |
2b45e8 |
sub Y, Y, INCYM1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
srawi. r0, N, 3
|
|
kusano |
2b45e8 |
mtspr CTR, r0
|
|
kusano |
2b45e8 |
beq- LL(150)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDX f8, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f16, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f9, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f17, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDX f10, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f18, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f11, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f19, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDX f12, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f20, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f13, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f21, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDX f14, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f22, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f15, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f23, Y, INCY
|
|
kusano |
2b45e8 |
bdz LL(120)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(110):
|
|
kusano |
2b45e8 |
FMADD f0, f8, f16, f0
|
|
kusano |
2b45e8 |
FMADD f1, f9, f17, f1
|
|
kusano |
2b45e8 |
FMADD f2, f9, f16, f2
|
|
kusano |
2b45e8 |
FMADD f3, f8, f17, f3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f4, f10, f18, f4
|
|
kusano |
2b45e8 |
FMADD f5, f11, f19, f5
|
|
kusano |
2b45e8 |
FMADD f6, f11, f18, f6
|
|
kusano |
2b45e8 |
FMADD f7, f10, f19, f7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDX f8, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f16, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f9, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f17, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDX f10, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f18, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f11, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f19, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f24, f12, f20, f24
|
|
kusano |
2b45e8 |
FMADD f25, f13, f21, f25
|
|
kusano |
2b45e8 |
FMADD f26, f13, f20, f26
|
|
kusano |
2b45e8 |
FMADD f27, f12, f21, f27
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f28, f14, f22, f28
|
|
kusano |
2b45e8 |
FMADD f29, f15, f23, f29
|
|
kusano |
2b45e8 |
FMADD f30, f15, f22, f30
|
|
kusano |
2b45e8 |
FMADD f31, f14, f23, f31
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDX f12, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f20, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f13, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f21, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDX f14, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f22, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f15, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f23, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f0, f8, f16, f0
|
|
kusano |
2b45e8 |
FMADD f1, f9, f17, f1
|
|
kusano |
2b45e8 |
FMADD f2, f9, f16, f2
|
|
kusano |
2b45e8 |
FMADD f3, f8, f17, f3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f4, f10, f18, f4
|
|
kusano |
2b45e8 |
FMADD f5, f11, f19, f5
|
|
kusano |
2b45e8 |
FMADD f6, f11, f18, f6
|
|
kusano |
2b45e8 |
FMADD f7, f10, f19, f7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDX f8, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f16, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f9, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f17, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDX f10, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f18, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f11, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f19, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f24, f12, f20, f24
|
|
kusano |
2b45e8 |
FMADD f25, f13, f21, f25
|
|
kusano |
2b45e8 |
FMADD f26, f13, f20, f26
|
|
kusano |
2b45e8 |
FMADD f27, f12, f21, f27
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f28, f14, f22, f28
|
|
kusano |
2b45e8 |
FMADD f29, f15, f23, f29
|
|
kusano |
2b45e8 |
FMADD f30, f15, f22, f30
|
|
kusano |
2b45e8 |
FMADD f31, f14, f23, f31
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDX f12, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f20, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f13, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f21, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDX f14, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f22, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f15, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f23, Y, INCY
|
|
kusano |
2b45e8 |
bdnz LL(110)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(120):
|
|
kusano |
2b45e8 |
FMADD f0, f8, f16, f0
|
|
kusano |
2b45e8 |
FMADD f1, f9, f17, f1
|
|
kusano |
2b45e8 |
FMADD f2, f9, f16, f2
|
|
kusano |
2b45e8 |
FMADD f3, f8, f17, f3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f4, f10, f18, f4
|
|
kusano |
2b45e8 |
FMADD f5, f11, f19, f5
|
|
kusano |
2b45e8 |
FMADD f6, f11, f18, f6
|
|
kusano |
2b45e8 |
FMADD f7, f10, f19, f7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDX f8, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f16, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f9, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f17, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDX f10, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f18, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f11, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f19, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f24, f12, f20, f24
|
|
kusano |
2b45e8 |
FMADD f25, f13, f21, f25
|
|
kusano |
2b45e8 |
FMADD f26, f13, f20, f26
|
|
kusano |
2b45e8 |
FMADD f27, f12, f21, f27
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f28, f14, f22, f28
|
|
kusano |
2b45e8 |
FMADD f29, f15, f23, f29
|
|
kusano |
2b45e8 |
FMADD f30, f15, f22, f30
|
|
kusano |
2b45e8 |
FMADD f31, f14, f23, f31
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDX f12, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f20, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f13, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f21, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDX f14, X, INCXM1
|
|
kusano |
2b45e8 |
LFDX f22, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f15, X, INCX
|
|
kusano |
2b45e8 |
LFDUX f23, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f0, f8, f16, f0
|
|
kusano |
2b45e8 |
FMADD f1, f9, f17, f1
|
|
kusano |
2b45e8 |
FMADD f2, f9, f16, f2
|
|
kusano |
2b45e8 |
FMADD f3, f8, f17, f3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f4, f10, f18, f4
|
|
kusano |
2b45e8 |
FMADD f5, f11, f19, f5
|
|
kusano |
2b45e8 |
FMADD f6, f11, f18, f6
|
|
kusano |
2b45e8 |
FMADD f7, f10, f19, f7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f24, f12, f20, f24
|
|
kusano |
2b45e8 |
FMADD f25, f13, f21, f25
|
|
kusano |
2b45e8 |
FMADD f26, f13, f20, f26
|
|
kusano |
2b45e8 |
FMADD f27, f12, f21, f27
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f28, f14, f22, f28
|
|
kusano |
2b45e8 |
FMADD f29, f15, f23, f29
|
|
kusano |
2b45e8 |
FMADD f30, f15, f22, f30
|
|
kusano |
2b45e8 |
FMADD f31, f14, f23, f31
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(150):
|
|
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(160):
|
|
kusano |
2b45e8 |
LFDX f8, X, INCXM1
|
|
kusano |
2b45e8 |
LFDUX f9, X, INCX
|
|
kusano |
2b45e8 |
LFDX f16, Y, INCYM1
|
|
kusano |
2b45e8 |
LFDUX f17, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FMADD f0, f8, f16, f0
|
|
kusano |
2b45e8 |
FMADD f1, f9, f17, f1
|
|
kusano |
2b45e8 |
FMADD f2, f9, f16, f2
|
|
kusano |
2b45e8 |
FMADD f3, f8, f17, f3
|
|
kusano |
2b45e8 |
bdnz LL(160)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(999):
|
|
kusano |
2b45e8 |
FADD f0, f0, f4
|
|
kusano |
2b45e8 |
FADD f1, f1, f5
|
|
kusano |
2b45e8 |
FADD f2, f2, f6
|
|
kusano |
2b45e8 |
FADD f3, f3, f7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FADD f24, f28, f24
|
|
kusano |
2b45e8 |
FADD f25, f29, f25
|
|
kusano |
2b45e8 |
FADD f26, f30, f26
|
|
kusano |
2b45e8 |
FADD f27, f31, f27
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FADD f0, f0, f24
|
|
kusano |
2b45e8 |
FADD f1, f1, f25
|
|
kusano |
2b45e8 |
FADD f2, f2, f26
|
|
kusano |
2b45e8 |
FADD f3, f3, f27
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef CONJ
|
|
kusano |
2b45e8 |
FSUB f1, f0, f1
|
|
kusano |
2b45e8 |
FADD f2, f2, f3
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
FADD f1, f0, f1
|
|
kusano |
2b45e8 |
FSUB f2, f3, f2
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(F_INTERFACE) && defined(F_INTERFACE_F2C)
|
|
kusano |
2b45e8 |
STFD f1, 0 * SIZE(RESULT)
|
|
kusano |
2b45e8 |
STFD f2, 1 * SIZE(RESULT)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(F_INTERFACE) && defined(F_INTERFACE_GFORT)
|
|
kusano |
2b45e8 |
#ifndef __64BIT__
|
|
kusano |
2b45e8 |
#ifndef DOUBLE
|
|
kusano |
2b45e8 |
stfs f1, 144(SP)
|
|
kusano |
2b45e8 |
stfs f2, 148(SP)
|
|
kusano |
2b45e8 |
lwz r3, 144(SP)
|
|
kusano |
2b45e8 |
lwz r4, 148(SP)
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
stfd f1, 144(SP)
|
|
kusano |
2b45e8 |
stfd f2, 152(SP)
|
|
kusano |
2b45e8 |
lwz r3, 144(SP)
|
|
kusano |
2b45e8 |
lwz r4, 148(SP)
|
|
kusano |
2b45e8 |
lwz r5, 152(SP)
|
|
kusano |
2b45e8 |
lwz r6, 156(SP)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
#ifndef DOUBLE
|
|
kusano |
2b45e8 |
stfs f1, 144(SP)
|
|
kusano |
2b45e8 |
stfs f2, 148(SP)
|
|
kusano |
2b45e8 |
ld r3, 144(SP)
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
stfd f1, 144(SP)
|
|
kusano |
2b45e8 |
stfd f2, 152(SP)
|
|
kusano |
2b45e8 |
ld r3, 144(SP)
|
|
kusano |
2b45e8 |
ld r4, 152(SP)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
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 |
lfd f18, 32(SP)
|
|
kusano |
2b45e8 |
lfd f19, 40(SP)
|
|
kusano |
2b45e8 |
lfd f20, 48(SP)
|
|
kusano |
2b45e8 |
lfd f21, 56(SP)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
lfd f22, 64(SP)
|
|
kusano |
2b45e8 |
lfd f23, 72(SP)
|
|
kusano |
2b45e8 |
lfd f24, 80(SP)
|
|
kusano |
2b45e8 |
lfd f25, 88(SP)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
lfd f26, 96(SP)
|
|
kusano |
2b45e8 |
lfd f27, 104(SP)
|
|
kusano |
2b45e8 |
lfd f28, 112(SP)
|
|
kusano |
2b45e8 |
lfd f29, 120(SP)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
lfd f30, 128(SP)
|
|
kusano |
2b45e8 |
lfd f31, 136(SP)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addi SP, SP, STACKSIZE
|
|
kusano |
2b45e8 |
blr
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
EPILOGUE
|