|
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 r6
|
|
kusano |
2b45e8 |
#define INCX r7
|
|
kusano |
2b45e8 |
#define Y r8
|
|
kusano |
2b45e8 |
#define INCY r9
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define INCX2 r4
|
|
kusano |
2b45e8 |
#define INCY2 r5
|
|
kusano |
2b45e8 |
#define X2 r10
|
|
kusano |
2b45e8 |
#define Y2 r11
|
|
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 A5 f4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define B1 f5
|
|
kusano |
2b45e8 |
#define B2 f6
|
|
kusano |
2b45e8 |
#define B3 f7
|
|
kusano |
2b45e8 |
#define B4 f8
|
|
kusano |
2b45e8 |
#define B5 f9
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define T1 f10
|
|
kusano |
2b45e8 |
#define T2 f11
|
|
kusano |
2b45e8 |
#define T3 f12
|
|
kusano |
2b45e8 |
#define T4 f13
|
|
kusano |
2b45e8 |
#define T5 f14
|
|
kusano |
2b45e8 |
#define T6 f15
|
|
kusano |
2b45e8 |
#define T7 f16
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PROLOGUE
|
|
kusano |
2b45e8 |
PROFCODE
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
li r10, -16
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
stfpdux f14, SP, r10
|
|
kusano |
2b45e8 |
stfpdux f15, SP, r10
|
|
kusano |
2b45e8 |
stfpdux f16, SP, r10
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
slwi INCX, INCX, BASE_SHIFT
|
|
kusano |
2b45e8 |
slwi INCY, INCY, BASE_SHIFT
|
|
kusano |
2b45e8 |
add INCX2, INCX, INCX
|
|
kusano |
2b45e8 |
add INCY2, INCY, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
cmpwi cr0, N, 0
|
|
kusano |
2b45e8 |
ble LL(999)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
cmpwi cr0, INCX, SIZE
|
|
kusano |
2b45e8 |
bne LL(100)
|
|
kusano |
2b45e8 |
cmpwi cr0, INCY, SIZE
|
|
kusano |
2b45e8 |
bne LL(100)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
sub X, X, INCX2
|
|
kusano |
2b45e8 |
sub Y, Y, INCY2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mr X2, X
|
|
kusano |
2b45e8 |
mr Y2, Y
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
andi. r0, X, 2 * SIZE - 1
|
|
kusano |
2b45e8 |
bne LL(30)
|
|
kusano |
2b45e8 |
andi. r0, Y, 2 * SIZE - 1
|
|
kusano |
2b45e8 |
bne LL(20)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(10): /* X : aligned Y : aligned */
|
|
kusano |
2b45e8 |
srawi. r0, N, 3
|
|
kusano |
2b45e8 |
mtspr CTR, r0
|
|
kusano |
2b45e8 |
beq- LL(15)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFPDUX A1, X, INCX2
|
|
kusano |
2b45e8 |
LFPDUX B1, Y, INCY2
|
|
kusano |
2b45e8 |
LFPDUX A2, X, INCX2
|
|
kusano |
2b45e8 |
LFPDUX B2, Y, INCY2
|
|
kusano |
2b45e8 |
LFPDUX A3, X, INCX2
|
|
kusano |
2b45e8 |
LFPDUX B3, Y, INCY2
|
|
kusano |
2b45e8 |
LFPDUX A4, X, INCX2
|
|
kusano |
2b45e8 |
LFPDUX B4, Y, INCY2
|
|
kusano |
2b45e8 |
bdz LL(13)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(12):
|
|
kusano |
2b45e8 |
STFPDUX B1, X2, INCY2
|
|
kusano |
2b45e8 |
LFPDUX B1, Y, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A1, Y2, INCY2
|
|
kusano |
2b45e8 |
LFPDUX A1, X, INCX2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFPDUX B2, X2, INCY2
|
|
kusano |
2b45e8 |
LFPDUX B2, Y, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A2, Y2, INCY2
|
|
kusano |
2b45e8 |
LFPDUX A2, X, INCX2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFPDUX B3, X2, INCY2
|
|
kusano |
2b45e8 |
LFPDUX B3, Y, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A3, Y2, INCY2
|
|
kusano |
2b45e8 |
LFPDUX A3, X, INCX2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFPDUX B4, X2, INCY2
|
|
kusano |
2b45e8 |
LFPDUX B4, Y, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A4, Y2, INCY2
|
|
kusano |
2b45e8 |
LFPDUX A4, X, INCX2
|
|
kusano |
2b45e8 |
bdnz LL(12)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(13):
|
|
kusano |
2b45e8 |
STFPDUX B1, X2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A1, Y2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX B2, X2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A2, Y2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX B3, X2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A3, Y2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX B4, X2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A4, Y2, INCY2
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(15):
|
|
kusano |
2b45e8 |
andi. r0, N, 7
|
|
kusano |
2b45e8 |
beq LL(999)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
andi. r0, N, 4
|
|
kusano |
2b45e8 |
beq LL(16)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFPDUX A1, X, INCX2
|
|
kusano |
2b45e8 |
LFPDUX B1, Y, INCY2
|
|
kusano |
2b45e8 |
LFPDUX A2, X, INCX2
|
|
kusano |
2b45e8 |
LFPDUX B2, Y, INCY2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFPDUX B1, X2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A1, Y2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX B2, X2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A2, Y2, INCY2
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(16):
|
|
kusano |
2b45e8 |
andi. r0, N, 2
|
|
kusano |
2b45e8 |
beq LL(17)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFPDUX A1, X, INCX2
|
|
kusano |
2b45e8 |
LFPDUX B1, Y, INCY2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFPDUX B1, X2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A1, Y2, INCY2
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(17):
|
|
kusano |
2b45e8 |
andi. r0, N, 1
|
|
kusano |
2b45e8 |
beq LL(999)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDUX A1, X, INCX2
|
|
kusano |
2b45e8 |
LFDUX B1, Y, INCY2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFDUX B1, X2, INCY2
|
|
kusano |
2b45e8 |
STFDUX A1, Y2, INCY2
|
|
kusano |
2b45e8 |
b LL(999)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(20): /* X : aligned Y : unaligned */
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFXDUX A1, X, INCX2
|
|
kusano |
2b45e8 |
LFDX B1, Y, INCY2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFSDX A1, Y2, INCY2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
add Y, Y, INCY
|
|
kusano |
2b45e8 |
add Y2, Y2, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addi N, N, -1
|
|
kusano |
2b45e8 |
cmpwi cr0, N, 0
|
|
kusano |
2b45e8 |
ble LL(29)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
srawi. r0, N, 3
|
|
kusano |
2b45e8 |
mtspr CTR, r0
|
|
kusano |
2b45e8 |
beq- LL(25)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFXDUX T1, X, INCX2
|
|
kusano |
2b45e8 |
LFXDUX T2, Y, INCY2
|
|
kusano |
2b45e8 |
LFXDUX T3, X, INCX2
|
|
kusano |
2b45e8 |
LFXDUX T4, Y, INCY2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFPDUX A4, X, INCX2
|
|
kusano |
2b45e8 |
fsmr A1, T1
|
|
kusano |
2b45e8 |
LFPDUX B4, Y, INCY2
|
|
kusano |
2b45e8 |
fsmr B1, T2
|
|
kusano |
2b45e8 |
LFPDUX A5, X, INCX2
|
|
kusano |
2b45e8 |
fsmr T1, T3
|
|
kusano |
2b45e8 |
LFPDUX B5, Y, INCY2
|
|
kusano |
2b45e8 |
fsmr T2, T4
|
|
kusano |
2b45e8 |
bdz LL(23)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(22):
|
|
kusano |
2b45e8 |
fxmr T5, A4
|
|
kusano |
2b45e8 |
STFPDUX A1, Y2, INCY2
|
|
kusano |
2b45e8 |
fxmr T6, B4
|
|
kusano |
2b45e8 |
STFPDUX B1, X2, INCX2
|
|
kusano |
2b45e8 |
fxmr A1, A5
|
|
kusano |
2b45e8 |
STFPDUX T1, Y2, INCY2
|
|
kusano |
2b45e8 |
fxmr B1, B5
|
|
kusano |
2b45e8 |
STFPDUX T2, X2, INCX2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fsmr T3, T5
|
|
kusano |
2b45e8 |
LFPDUX A2, X, INCX2
|
|
kusano |
2b45e8 |
fsmr T4, T6
|
|
kusano |
2b45e8 |
LFPDUX B2, Y, INCY2
|
|
kusano |
2b45e8 |
fsmr T5, A1
|
|
kusano |
2b45e8 |
LFPDUX A3, X, INCX2
|
|
kusano |
2b45e8 |
fsmr T6, B1
|
|
kusano |
2b45e8 |
LFPDUX B3, Y, INCY2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fxmr T1, A2
|
|
kusano |
2b45e8 |
STFPDUX T3, Y2, INCY2
|
|
kusano |
2b45e8 |
fxmr T2, B2
|
|
kusano |
2b45e8 |
STFPDUX T4, X2, INCX2
|
|
kusano |
2b45e8 |
fxmr T3, A3
|
|
kusano |
2b45e8 |
STFPDUX T5, Y2, INCY2
|
|
kusano |
2b45e8 |
fxmr T4, B3
|
|
kusano |
2b45e8 |
STFPDUX T6, X2, INCX2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fsmr A1, T1
|
|
kusano |
2b45e8 |
LFPDUX A4, X, INCX2
|
|
kusano |
2b45e8 |
fsmr B1, T2
|
|
kusano |
2b45e8 |
LFPDUX B4, Y, INCY2
|
|
kusano |
2b45e8 |
fsmr T1, T3
|
|
kusano |
2b45e8 |
LFPDUX A5, X, INCX2
|
|
kusano |
2b45e8 |
fsmr T2, T4
|
|
kusano |
2b45e8 |
LFPDUX B5, Y, INCY2
|
|
kusano |
2b45e8 |
bdnz LL(22)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(23):
|
|
kusano |
2b45e8 |
fxmr T5, A4
|
|
kusano |
2b45e8 |
STFPDUX A1, Y2, INCY2
|
|
kusano |
2b45e8 |
fxmr T6, B4
|
|
kusano |
2b45e8 |
STFPDUX B1, X2, INCX2
|
|
kusano |
2b45e8 |
fxmr A1, A5
|
|
kusano |
2b45e8 |
STFPDUX T1, Y2, INCY2
|
|
kusano |
2b45e8 |
fxmr B1, B5
|
|
kusano |
2b45e8 |
STFPDUX T2, X2, INCX2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fsmr T3, T5
|
|
kusano |
2b45e8 |
fsmr T4, T6
|
|
kusano |
2b45e8 |
fsmr T5, A1
|
|
kusano |
2b45e8 |
fsmr T6, B1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFPDUX T3, Y2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX T4, X2, INCX2
|
|
kusano |
2b45e8 |
STFPDUX T5, Y2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX T6, X2, INCX2
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(25):
|
|
kusano |
2b45e8 |
andi. r0, N, 7
|
|
kusano |
2b45e8 |
beq LL(29)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
andi. r0, N, 4
|
|
kusano |
2b45e8 |
beq LL(27)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFXDUX A2, X, INCX2
|
|
kusano |
2b45e8 |
LFXDUX B2, Y, INCY2
|
|
kusano |
2b45e8 |
LFXDUX A3, X, INCX2
|
|
kusano |
2b45e8 |
LFXDUX B3, Y, INCY2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fsmr A1, A2
|
|
kusano |
2b45e8 |
fsmr B1, B2
|
|
kusano |
2b45e8 |
fsmr A2, A3
|
|
kusano |
2b45e8 |
fsmr B2, B3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFPDUX A1, Y2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX B1, X2, INCX2
|
|
kusano |
2b45e8 |
STFPDUX A2, Y2, INCY2
|
|
kusano |
2b45e8 |
fpmr A1, A3
|
|
kusano |
2b45e8 |
STFPDUX B2, X2, INCX2
|
|
kusano |
2b45e8 |
fpmr B1, B3
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(27):
|
|
kusano |
2b45e8 |
andi. r0, N, 2
|
|
kusano |
2b45e8 |
beq LL(28)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFXDUX A2, X, INCX2
|
|
kusano |
2b45e8 |
LFXDUX B2, Y, INCY2
|
|
kusano |
2b45e8 |
fsmr A1, A2
|
|
kusano |
2b45e8 |
fsmr B1, B2
|
|
kusano |
2b45e8 |
STFPDUX A1, Y2, INCY2
|
|
kusano |
2b45e8 |
fpmr A1, A2
|
|
kusano |
2b45e8 |
STFPDUX B1, X2, INCX2
|
|
kusano |
2b45e8 |
fpmr B1, B2
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(28):
|
|
kusano |
2b45e8 |
andi. r0, N, 1
|
|
kusano |
2b45e8 |
beq LL(29)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFSDX B1, Y, INCY2
|
|
kusano |
2b45e8 |
STFDX A1, Y2, INCY2
|
|
kusano |
2b45e8 |
STFDX B1, X2, INCX2
|
|
kusano |
2b45e8 |
add X2, X2, INCX
|
|
kusano |
2b45e8 |
fsmtp B1, B1
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(29):
|
|
kusano |
2b45e8 |
STFDX B1, X2, INCX2
|
|
kusano |
2b45e8 |
b LL(999)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(30): /* X : unaligned Y : aligned */
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
andi. r0, Y, 2 * SIZE - 1
|
|
kusano |
2b45e8 |
bne LL(40)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFXDUX A1, Y, INCY2
|
|
kusano |
2b45e8 |
LFDX B1, X, INCX2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFSDX A1, X2, INCX2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
add X, X, INCX
|
|
kusano |
2b45e8 |
add X2, X2, INCX
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addi N, N, -1
|
|
kusano |
2b45e8 |
cmpwi cr0, N, 0
|
|
kusano |
2b45e8 |
ble LL(39)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
srawi. r0, N, 3
|
|
kusano |
2b45e8 |
mtspr CTR, r0
|
|
kusano |
2b45e8 |
beq- LL(35)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFXDUX T1, Y, INCY2
|
|
kusano |
2b45e8 |
LFXDUX T2, X, INCX2
|
|
kusano |
2b45e8 |
LFXDUX T3, Y, INCY2
|
|
kusano |
2b45e8 |
LFXDUX T4, X, INCX2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFPDUX A4, Y, INCY2
|
|
kusano |
2b45e8 |
fsmr A1, T1
|
|
kusano |
2b45e8 |
LFPDUX B4, X, INCX2
|
|
kusano |
2b45e8 |
fsmr B1, T2
|
|
kusano |
2b45e8 |
LFPDUX A5, Y, INCY2
|
|
kusano |
2b45e8 |
fsmr T1, T3
|
|
kusano |
2b45e8 |
LFPDUX B5, X, INCX2
|
|
kusano |
2b45e8 |
fsmr T2, T4
|
|
kusano |
2b45e8 |
bdz LL(33)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(32):
|
|
kusano |
2b45e8 |
fxmr T5, A4
|
|
kusano |
2b45e8 |
STFPDUX A1, X2, INCX2
|
|
kusano |
2b45e8 |
fxmr T6, B4
|
|
kusano |
2b45e8 |
STFPDUX B1, Y2, INCY2
|
|
kusano |
2b45e8 |
fxmr A1, A5
|
|
kusano |
2b45e8 |
STFPDUX T1, X2, INCX2
|
|
kusano |
2b45e8 |
fxmr B1, B5
|
|
kusano |
2b45e8 |
STFPDUX T2, Y2, INCY2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fsmr T3, T5
|
|
kusano |
2b45e8 |
LFPDUX A2, Y, INCY2
|
|
kusano |
2b45e8 |
fsmr T4, T6
|
|
kusano |
2b45e8 |
LFPDUX B2, X, INCX2
|
|
kusano |
2b45e8 |
fsmr T5, A1
|
|
kusano |
2b45e8 |
LFPDUX A3, Y, INCY2
|
|
kusano |
2b45e8 |
fsmr T6, B1
|
|
kusano |
2b45e8 |
LFPDUX B3, X, INCX2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fxmr T1, A2
|
|
kusano |
2b45e8 |
STFPDUX T3, X2, INCX2
|
|
kusano |
2b45e8 |
fxmr T2, B2
|
|
kusano |
2b45e8 |
STFPDUX T4, Y2, INCY2
|
|
kusano |
2b45e8 |
fxmr T3, A3
|
|
kusano |
2b45e8 |
STFPDUX T5, X2, INCX2
|
|
kusano |
2b45e8 |
fxmr T4, B3
|
|
kusano |
2b45e8 |
STFPDUX T6, Y2, INCY2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fsmr A1, T1
|
|
kusano |
2b45e8 |
LFPDUX A4, Y, INCY2
|
|
kusano |
2b45e8 |
fsmr B1, T2
|
|
kusano |
2b45e8 |
LFPDUX B4, X, INCX2
|
|
kusano |
2b45e8 |
fsmr T1, T3
|
|
kusano |
2b45e8 |
LFPDUX A5, Y, INCY2
|
|
kusano |
2b45e8 |
fsmr T2, T4
|
|
kusano |
2b45e8 |
LFPDUX B5, X, INCX2
|
|
kusano |
2b45e8 |
bdnz LL(32)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(33):
|
|
kusano |
2b45e8 |
fxmr T5, A4
|
|
kusano |
2b45e8 |
STFPDUX A1, X2, INCX2
|
|
kusano |
2b45e8 |
fxmr T6, B4
|
|
kusano |
2b45e8 |
STFPDUX B1, Y2, INCY2
|
|
kusano |
2b45e8 |
fxmr A1, A5
|
|
kusano |
2b45e8 |
STFPDUX T1, X2, INCX2
|
|
kusano |
2b45e8 |
fxmr B1, B5
|
|
kusano |
2b45e8 |
STFPDUX T2, Y2, INCY2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fsmr T3, T5
|
|
kusano |
2b45e8 |
fsmr T4, T6
|
|
kusano |
2b45e8 |
fsmr T5, A1
|
|
kusano |
2b45e8 |
fsmr T6, B1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFPDUX T3, X2, INCX2
|
|
kusano |
2b45e8 |
STFPDUX T4, Y2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX T5, X2, INCX2
|
|
kusano |
2b45e8 |
STFPDUX T6, Y2, INCY2
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(35):
|
|
kusano |
2b45e8 |
andi. r0, N, 7
|
|
kusano |
2b45e8 |
beq LL(39)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
andi. r0, N, 4
|
|
kusano |
2b45e8 |
beq LL(37)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFXDUX A2, Y, INCY2
|
|
kusano |
2b45e8 |
LFXDUX B2, X, INCX2
|
|
kusano |
2b45e8 |
LFXDUX A3, Y, INCY2
|
|
kusano |
2b45e8 |
LFXDUX B3, X, INCX2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fsmr A1, A2
|
|
kusano |
2b45e8 |
fsmr B1, B2
|
|
kusano |
2b45e8 |
fsmr A2, A3
|
|
kusano |
2b45e8 |
fsmr B2, B3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFPDUX A1, X2, INCX2
|
|
kusano |
2b45e8 |
STFPDUX B1, Y2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A2, X2, INCX2
|
|
kusano |
2b45e8 |
fpmr A1, A3
|
|
kusano |
2b45e8 |
STFPDUX B2, Y2, INCY2
|
|
kusano |
2b45e8 |
fpmr B1, B3
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(37):
|
|
kusano |
2b45e8 |
andi. r0, N, 2
|
|
kusano |
2b45e8 |
beq LL(38)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFXDUX A2, Y, INCY2
|
|
kusano |
2b45e8 |
LFXDUX B2, X, INCX2
|
|
kusano |
2b45e8 |
fsmr A1, A2
|
|
kusano |
2b45e8 |
fsmr B1, B2
|
|
kusano |
2b45e8 |
STFPDUX A1, X2, INCX2
|
|
kusano |
2b45e8 |
fpmr A1, A2
|
|
kusano |
2b45e8 |
STFPDUX B1, Y2, INCY2
|
|
kusano |
2b45e8 |
fpmr B1, B2
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(38):
|
|
kusano |
2b45e8 |
andi. r0, N, 1
|
|
kusano |
2b45e8 |
beq LL(39)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFSDX B1, X, INCX2
|
|
kusano |
2b45e8 |
STFDX A1, X2, INCX2
|
|
kusano |
2b45e8 |
STFDX B1, Y2, INCY2
|
|
kusano |
2b45e8 |
add Y2, Y2, INCY
|
|
kusano |
2b45e8 |
fsmtp B1, B1
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(39):
|
|
kusano |
2b45e8 |
STFDX B1, Y2, INCY2
|
|
kusano |
2b45e8 |
b LL(999)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(40): /* X : unaligned Y : unaligned */
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDX A1, Y, INCY2
|
|
kusano |
2b45e8 |
LFDX B1, X, INCX2
|
|
kusano |
2b45e8 |
add X, X, INCX
|
|
kusano |
2b45e8 |
add Y, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addi N, N, -1
|
|
kusano |
2b45e8 |
cmpwi cr0, N, 0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFDX A1, X2, INCX2
|
|
kusano |
2b45e8 |
STFDX B1, Y2, INCY2
|
|
kusano |
2b45e8 |
add X2, X2, INCX
|
|
kusano |
2b45e8 |
add Y2, Y2, INCY
|
|
kusano |
2b45e8 |
ble LL(999)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
srawi. r0, N, 3
|
|
kusano |
2b45e8 |
mtspr CTR, r0
|
|
kusano |
2b45e8 |
beq- LL(45)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFPDUX A1, X, INCX2
|
|
kusano |
2b45e8 |
LFPDUX B1, Y, INCY2
|
|
kusano |
2b45e8 |
LFPDUX A2, X, INCX2
|
|
kusano |
2b45e8 |
LFPDUX B2, Y, INCY2
|
|
kusano |
2b45e8 |
LFPDUX A3, X, INCX2
|
|
kusano |
2b45e8 |
LFPDUX B3, Y, INCY2
|
|
kusano |
2b45e8 |
LFPDUX A4, X, INCX2
|
|
kusano |
2b45e8 |
LFPDUX B4, Y, INCY2
|
|
kusano |
2b45e8 |
bdz LL(43)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(42):
|
|
kusano |
2b45e8 |
STFPDUX B1, X2, INCY2
|
|
kusano |
2b45e8 |
LFPDUX B1, Y, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A1, Y2, INCY2
|
|
kusano |
2b45e8 |
LFPDUX A1, X, INCX2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFPDUX B2, X2, INCY2
|
|
kusano |
2b45e8 |
LFPDUX B2, Y, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A2, Y2, INCY2
|
|
kusano |
2b45e8 |
LFPDUX A2, X, INCX2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFPDUX B3, X2, INCY2
|
|
kusano |
2b45e8 |
LFPDUX B3, Y, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A3, Y2, INCY2
|
|
kusano |
2b45e8 |
LFPDUX A3, X, INCX2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFPDUX B4, X2, INCY2
|
|
kusano |
2b45e8 |
LFPDUX B4, Y, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A4, Y2, INCY2
|
|
kusano |
2b45e8 |
LFPDUX A4, X, INCX2
|
|
kusano |
2b45e8 |
bdnz LL(42)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(43):
|
|
kusano |
2b45e8 |
STFPDUX B1, X2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A1, Y2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX B2, X2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A2, Y2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX B3, X2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A3, Y2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX B4, X2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A4, Y2, INCY2
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(45):
|
|
kusano |
2b45e8 |
andi. r0, N, 7
|
|
kusano |
2b45e8 |
beq LL(999)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
andi. r0, N, 4
|
|
kusano |
2b45e8 |
beq LL(46)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFPDUX A1, X, INCX2
|
|
kusano |
2b45e8 |
LFPDUX B1, Y, INCY2
|
|
kusano |
2b45e8 |
LFPDUX A2, X, INCX2
|
|
kusano |
2b45e8 |
LFPDUX B2, Y, INCY2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFPDUX B1, X2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A1, Y2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX B2, X2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A2, Y2, INCY2
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(46):
|
|
kusano |
2b45e8 |
andi. r0, N, 2
|
|
kusano |
2b45e8 |
beq LL(47)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFPDUX A1, X, INCX2
|
|
kusano |
2b45e8 |
LFPDUX B1, Y, INCY2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFPDUX B1, X2, INCY2
|
|
kusano |
2b45e8 |
STFPDUX A1, Y2, INCY2
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(47):
|
|
kusano |
2b45e8 |
andi. r0, N, 1
|
|
kusano |
2b45e8 |
beq LL(999)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDUX A1, X, INCX2
|
|
kusano |
2b45e8 |
LFDUX B1, Y, INCY2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFDUX B1, X2, INCY2
|
|
kusano |
2b45e8 |
STFDUX A1, Y2, INCY2
|
|
kusano |
2b45e8 |
b LL(999)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(100):
|
|
kusano |
2b45e8 |
sub X, X, INCX
|
|
kusano |
2b45e8 |
sub Y, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mr X2, X
|
|
kusano |
2b45e8 |
mr Y2, Y
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
srawi. r0, N, 2
|
|
kusano |
2b45e8 |
mtspr CTR, r0
|
|
kusano |
2b45e8 |
beq- LL(115)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDUX A1, X, INCX
|
|
kusano |
2b45e8 |
LFDUX B1, Y, INCY
|
|
kusano |
2b45e8 |
LFDUX A2, X, INCX
|
|
kusano |
2b45e8 |
LFDUX B2, Y, INCY
|
|
kusano |
2b45e8 |
LFDUX A3, X, INCX
|
|
kusano |
2b45e8 |
LFDUX B3, Y, INCY
|
|
kusano |
2b45e8 |
LFDUX A4, X, INCX
|
|
kusano |
2b45e8 |
LFDUX B4, Y, INCY
|
|
kusano |
2b45e8 |
bdz LL(113)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(112):
|
|
kusano |
2b45e8 |
STFDUX B1, X2, INCX
|
|
kusano |
2b45e8 |
LFDUX B1, Y, INCY
|
|
kusano |
2b45e8 |
STFDUX A1, Y2, INCY
|
|
kusano |
2b45e8 |
LFDUX A1, X, INCX
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFDUX B2, X2, INCX
|
|
kusano |
2b45e8 |
LFDUX B2, Y, INCY
|
|
kusano |
2b45e8 |
STFDUX A2, Y2, INCY
|
|
kusano |
2b45e8 |
LFDUX A2, X, INCX
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFDUX B3, X2, INCX
|
|
kusano |
2b45e8 |
LFDUX B3, Y, INCY
|
|
kusano |
2b45e8 |
STFDUX A3, Y2, INCY
|
|
kusano |
2b45e8 |
LFDUX A3, X, INCX
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFDUX B4, X2, INCX
|
|
kusano |
2b45e8 |
LFDUX B4, Y, INCY
|
|
kusano |
2b45e8 |
STFDUX A4, Y2, INCY
|
|
kusano |
2b45e8 |
LFDUX A4, X, INCX
|
|
kusano |
2b45e8 |
bdnz LL(112)
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(113):
|
|
kusano |
2b45e8 |
STFDUX B1, X2, INCX
|
|
kusano |
2b45e8 |
STFDUX A1, Y2, INCY
|
|
kusano |
2b45e8 |
STFDUX B2, X2, INCX
|
|
kusano |
2b45e8 |
STFDUX A2, Y2, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFDUX B3, X2, INCX
|
|
kusano |
2b45e8 |
STFDUX A3, Y2, INCY
|
|
kusano |
2b45e8 |
STFDUX B4, X2, INCX
|
|
kusano |
2b45e8 |
STFDUX A4, Y2, INCY
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(115):
|
|
kusano |
2b45e8 |
andi. r0, N, 3
|
|
kusano |
2b45e8 |
beq LL(999)
|
|
kusano |
2b45e8 |
andi. r0, N, 2
|
|
kusano |
2b45e8 |
beq LL(117)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDUX A1, X, INCX
|
|
kusano |
2b45e8 |
LFDUX A2, X, INCX
|
|
kusano |
2b45e8 |
LFDUX B1, Y, INCY
|
|
kusano |
2b45e8 |
LFDUX B2, Y, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STFDUX B1, X2, INCX
|
|
kusano |
2b45e8 |
STFDUX B2, X2, INCX
|
|
kusano |
2b45e8 |
STFDUX A1, Y2, INCY
|
|
kusano |
2b45e8 |
STFDUX A2, Y2, INCY
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(117):
|
|
kusano |
2b45e8 |
andi. r0, N, 1
|
|
kusano |
2b45e8 |
beq LL(999)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LFDUX A1, X, INCX
|
|
kusano |
2b45e8 |
LFDUX B1, Y, INCY
|
|
kusano |
2b45e8 |
STFDUX B1, X2, INCX
|
|
kusano |
2b45e8 |
STFDUX A1, Y2, INCY
|
|
kusano |
2b45e8 |
.align 4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
LL(999):
|
|
kusano |
2b45e8 |
li r10, 16
|
|
kusano |
2b45e8 |
addi SP, SP, -16
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
lfpdux f16, SP, r10
|
|
kusano |
2b45e8 |
lfpdux f15, SP, r10
|
|
kusano |
2b45e8 |
lfpdux f14, SP, r10
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addi SP, SP, 16
|
|
kusano |
2b45e8 |
blr
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
EPILOGUE
|