Blame thirdparty/openblas/xianyi-OpenBLAS-e6e87a2/kernel/power/gemv_n_ppc440.S

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
#ifdef linux
kusano 2b45e8
#ifndef __64BIT__
kusano 2b45e8
#define M	r3
kusano 2b45e8
#define	N	r4
kusano 2b45e8
#define A	r6
kusano 2b45e8
#define LDA	r7
kusano 2b45e8
#define X	r8
kusano 2b45e8
#define	INCX	r9
kusano 2b45e8
#define	Y	r10
kusano 2b45e8
#define	INCY	r5
kusano 2b45e8
#else
kusano 2b45e8
#define M	r3
kusano 2b45e8
#define	N	r4
kusano 2b45e8
#define A	r7
kusano 2b45e8
#define LDA	r8
kusano 2b45e8
#define X	r9
kusano 2b45e8
#define	INCX	r10
kusano 2b45e8
#define	Y	r5
kusano 2b45e8
#define	INCY	r6
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(_AIX) || defined(__APPLE__)
kusano 2b45e8
#if !defined(__64BIT__) && defined(DOUBLE)
kusano 2b45e8
#define M	r3
kusano 2b45e8
#define	N	r4
kusano 2b45e8
#define A	r8
kusano 2b45e8
#define LDA	r9
kusano 2b45e8
#define X	r10
kusano 2b45e8
#define	INCX	r5
kusano 2b45e8
#define	Y	r6
kusano 2b45e8
#define	INCY	r7
kusano 2b45e8
#else
kusano 2b45e8
#define M	r3
kusano 2b45e8
#define	N	r4
kusano 2b45e8
#define A	r7
kusano 2b45e8
#define LDA	r8
kusano 2b45e8
#define X	r9
kusano 2b45e8
#define	INCX	r10
kusano 2b45e8
#define	Y	r5
kusano 2b45e8
#define	INCY	r6
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#define I	r11
kusano 2b45e8
#define	J	r12
kusano 2b45e8
kusano 2b45e8
#define AO1	r14
kusano 2b45e8
#define AO2	r15
kusano 2b45e8
#define AO3	r16
kusano 2b45e8
#define AO4	r17
kusano 2b45e8
#define LDA8	r18
kusano 2b45e8
kusano 2b45e8
#define	Y1	r19
kusano 2b45e8
#define Y2	r20
kusano 2b45e8
#define	PREA	r21
kusano 2b45e8
#define YY	r22
kusano 2b45e8
#define BUFFER	r23
kusano 2b45e8
kusano 2b45e8
#define y01 f0
kusano 2b45e8
#define y02 f1
kusano 2b45e8
#define y03 f2
kusano 2b45e8
#define y04 f3
kusano 2b45e8
#define y05 f4
kusano 2b45e8
#define y06 f5
kusano 2b45e8
#define y07 f6
kusano 2b45e8
#define y08 f7
kusano 2b45e8
#define y09 f8
kusano 2b45e8
#define y10 f9
kusano 2b45e8
#define y11 f10
kusano 2b45e8
#define y12 f11
kusano 2b45e8
#define y13 f12
kusano 2b45e8
#define y14 f13
kusano 2b45e8
#define y15 f14
kusano 2b45e8
#define y16 f15
kusano 2b45e8
kusano 2b45e8
#define alpha1 f16
kusano 2b45e8
#define alpha2 f17
kusano 2b45e8
#define alpha3 f18
kusano 2b45e8
#define alpha4 f19
kusano 2b45e8
kusano 2b45e8
#define a1     f20
kusano 2b45e8
#define a2     f21
kusano 2b45e8
#define a3     f22
kusano 2b45e8
#define a4     f23
kusano 2b45e8
#define a5     f24
kusano 2b45e8
#define a6     f25
kusano 2b45e8
#define a7     f26
kusano 2b45e8
#define a8     f27
kusano 2b45e8
kusano 2b45e8
#define alpha  f27
kusano 2b45e8
kusano 2b45e8
#if defined(PPCG4)
kusano 2b45e8
#define PREFETCHSIZE_A  (3 * 4)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(POWER6)
kusano 2b45e8
#define PREFETCHSIZE_A  (3 * 4)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifndef NEEDPARAM
kusano 2b45e8
kusano 2b45e8
#ifndef __64BIT__
kusano 2b45e8
#define STACKSIZE 224
kusano 2b45e8
#define ALPHA     200(SP)
kusano 2b45e8
#define	FZERO	  208(SP)
kusano 2b45e8
#else
kusano 2b45e8
#define STACKSIZE 280
kusano 2b45e8
#define ALPHA     256(SP)
kusano 2b45e8
#define FZERO	  264(SP)
kusano 2b45e8
#endif
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
	stfd	f18,    32(SP)
kusano 2b45e8
	stfd	f19,    40(SP)
kusano 2b45e8
	stfd	f20,    48(SP)
kusano 2b45e8
	stfd	f21,    56(SP)
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
	stfd	f26,    96(SP)
kusano 2b45e8
	stfd	f27,   104(SP)
kusano 2b45e8
kusano 2b45e8
#ifdef __64BIT__
kusano 2b45e8
	std	r0,    FZERO
kusano 2b45e8
	std	r14,   144(SP)
kusano 2b45e8
	std	r15,   152(SP)
kusano 2b45e8
	std	r16,   160(SP)
kusano 2b45e8
	std	r17,   168(SP)
kusano 2b45e8
	std	r18,   176(SP)
kusano 2b45e8
	std	r19,   184(SP)
kusano 2b45e8
	std	r20,   192(SP)
kusano 2b45e8
	std	r21,   200(SP)
kusano 2b45e8
	std	r22,   208(SP)
kusano 2b45e8
	std	r23,   216(SP)
kusano 2b45e8
#else
kusano 2b45e8
	stw	r0,    0 + FZERO
kusano 2b45e8
	stw	r0,    4 + FZERO
kusano 2b45e8
	stw	r14,   144(SP)
kusano 2b45e8
	stw	r15,   148(SP)
kusano 2b45e8
	stw	r16,   152(SP)
kusano 2b45e8
	stw	r17,   156(SP)
kusano 2b45e8
	stw	r18,   160(SP)
kusano 2b45e8
	stw	r19,   164(SP)
kusano 2b45e8
	stw	r20,   168(SP)
kusano 2b45e8
	stw	r21,   172(SP)
kusano 2b45e8
	stw	r22,   176(SP)
kusano 2b45e8
	stw	r23,   180(SP)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef linux
kusano 2b45e8
#ifndef __64BIT__
kusano 2b45e8
	lwz	INCY,      8 + STACKSIZE(SP)
kusano 2b45e8
	lwz	BUFFER,  12 + STACKSIZE(SP)
kusano 2b45e8
#else
kusano 2b45e8
	ld	Y,       112 + STACKSIZE(SP)
kusano 2b45e8
	ld	INCY,    120 + STACKSIZE(SP)
kusano 2b45e8
	ld	BUFFER,  128 + STACKSIZE(SP)
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(_AIX) || defined(__APPLE__)
kusano 2b45e8
#ifndef __64BIT__
kusano 2b45e8
#ifdef DOUBLE
kusano 2b45e8
	lwz	INCX,    56 + STACKSIZE(SP)
kusano 2b45e8
	lwz	Y,       60 + STACKSIZE(SP)
kusano 2b45e8
	lwz	INCY,    64 + STACKSIZE(SP)
kusano 2b45e8
	lwz	BUFFER,  68 + STACKSIZE(SP)
kusano 2b45e8
#else
kusano 2b45e8
	lwz	Y,       56 + STACKSIZE(SP)
kusano 2b45e8
	lwz	INCY,    60 + STACKSIZE(SP)
kusano 2b45e8
	lwz	BUFFER,  64 + STACKSIZE(SP)
kusano 2b45e8
#endif
kusano 2b45e8
#else
kusano 2b45e8
	ld	Y,       112 + STACKSIZE(SP)
kusano 2b45e8
	ld	INCY,    120 + STACKSIZE(SP)
kusano 2b45e8
	ld	BUFFER,  128 + STACKSIZE(SP)
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	stfd	f1, ALPHA
kusano 2b45e8
	fmr	alpha, f1
kusano 2b45e8
kusano 2b45e8
	slwi	LDA,  LDA,  BASE_SHIFT
kusano 2b45e8
	slwi	INCX, INCX, BASE_SHIFT
kusano 2b45e8
	slwi	INCY, INCY, BASE_SHIFT
kusano 2b45e8
kusano 2b45e8
	li	PREA, PREFETCHSIZE_A * SIZE
kusano 2b45e8
kusano 2b45e8
	cmpwi	cr0, M, 0
kusano 2b45e8
	ble-	LL(999)
kusano 2b45e8
kusano 2b45e8
	cmpwi	cr0, N, 0
kusano 2b45e8
	ble-	LL(999)
kusano 2b45e8
kusano 2b45e8
	addi	A, A, -SIZE
kusano 2b45e8
	sub	X, X, INCX
kusano 2b45e8
	sub	Y, Y, INCY
kusano 2b45e8
kusano 2b45e8
	mr	YY, Y
kusano 2b45e8
	lfd	f0, FZERO
kusano 2b45e8
kusano 2b45e8
	cmpi	cr0, 0, INCY, SIZE
kusano 2b45e8
	beq	LL(10)
kusano 2b45e8
kusano 2b45e8
	addi	YY, BUFFER, -SIZE
kusano 2b45e8
	addi	Y1, BUFFER, -SIZE
kusano 2b45e8
kusano 2b45e8
	addi	r0, M,  7
kusano 2b45e8
	srawi.	r0, r0, 3
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(02):
kusano 2b45e8
	STFDU	f0, 1 * SIZE(Y1)
kusano 2b45e8
	STFDU	f0, 1 * SIZE(Y1)
kusano 2b45e8
	STFDU	f0, 1 * SIZE(Y1)
kusano 2b45e8
	STFDU	f0, 1 * SIZE(Y1)
kusano 2b45e8
	STFDU	f0, 1 * SIZE(Y1)
kusano 2b45e8
	STFDU	f0, 1 * SIZE(Y1)
kusano 2b45e8
	STFDU	f0, 1 * SIZE(Y1)
kusano 2b45e8
	STFDU	f0, 1 * SIZE(Y1)
kusano 2b45e8
	bdnz	LL(02)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(10):
kusano 2b45e8
	srawi.	J, N, 2
kusano 2b45e8
	ble	LL(30)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(21):
kusano 2b45e8
	mr	AO1, A
kusano 2b45e8
	add	AO2, A,   LDA
kusano 2b45e8
kusano 2b45e8
	LFDUX	alpha1, X, INCX
kusano 2b45e8
	LFDUX	alpha2, X, INCX
kusano 2b45e8
	LFDUX	alpha3, X, INCX
kusano 2b45e8
	LFDUX	alpha4, X, INCX
kusano 2b45e8
kusano 2b45e8
	FMUL	alpha1, alpha, alpha1
kusano 2b45e8
	add	AO3, AO2, LDA
kusano 2b45e8
	FMUL	alpha2, alpha, alpha2
kusano 2b45e8
	add	AO4, AO3, LDA
kusano 2b45e8
	FMUL	alpha3, alpha, alpha3
kusano 2b45e8
	add	A,   AO4, LDA
kusano 2b45e8
	FMUL	alpha4, alpha, alpha4
kusano 2b45e8
	mr	Y1, YY
kusano 2b45e8
	mr	Y2, YY
kusano 2b45e8
kusano 2b45e8
	srawi.	r0,  M, 3
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
	ble	LL(25)
kusano 2b45e8
kusano 2b45e8
	LFDU	y01, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y02, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y03, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y04, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y05, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y06, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y07, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y08, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO1)
kusano 2b45e8
	bdz	LL(23)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(22):
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbtst	Y1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y09, alpha1, a1, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y10, alpha1, a2, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y11, alpha1, a3, y03
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y12, alpha1, a4, y04
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	LFDU	y01, 1 * SIZE(Y1)
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbt	AO2, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y13, alpha1, a5, y05
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y14, alpha1, a6, y06
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y15, alpha1, a7, y07
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y16, alpha1, a8, y08
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	LFDU	y02, 1 * SIZE(Y1)
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbt	AO2, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y09, alpha2, a1, y09
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y10, alpha2, a2, y10
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y11, alpha2, a3, y11
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y12, alpha2, a4, y12
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO3)
kusano 2b45e8
kusano 2b45e8
	LFDU	y03, 1 * SIZE(Y1)
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbt	AO3, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y13, alpha2, a5, y13
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y14, alpha2, a6, y14
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y15, alpha2, a7, y15
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y16, alpha2, a8, y16
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO3)
kusano 2b45e8
kusano 2b45e8
	LFDU	y04, 1 * SIZE(Y1)
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbt	AO3, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y09, alpha3, a1, y09
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO4)
kusano 2b45e8
	FMADD	y10, alpha3, a2, y10
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO4)
kusano 2b45e8
	FMADD	y11, alpha3, a3, y11
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO4)
kusano 2b45e8
	FMADD	y12, alpha3, a4, y12
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbtst	Y1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
	LFDU	y05, 1 * SIZE(Y1)
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbt	AO4, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y13, alpha3, a5, y13
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO4)
kusano 2b45e8
	FMADD	y14, alpha3, a6, y14
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO4)
kusano 2b45e8
	FMADD	y15, alpha3, a7, y15
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO4)
kusano 2b45e8
	FMADD	y16, alpha3, a8, y16
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	LFDU	y06, 1 * SIZE(Y1)
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbt	AO4, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y09, alpha4, a1, y09
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y10, alpha4, a2, y10
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y11, alpha4, a3, y11
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y12, alpha4, a4, y12
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO1)
kusano 2b45e8
kusano 2b45e8
	LFDU	y07, 1 * SIZE(Y1)
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbt	AO1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	STFDU	y09, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y10, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y11, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y12, 1 * SIZE(Y2)
kusano 2b45e8
kusano 2b45e8
	FMADD	y13, alpha4, a5, y13
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y14, alpha4, a6, y14
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y15, alpha4, a7, y15
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y16, alpha4, a8, y16
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO1)
kusano 2b45e8
kusano 2b45e8
	LFDU	y08, 1 * SIZE(Y1)
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbt	AO1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	STFDU	y13, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y14, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y15, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y16, 1 * SIZE(Y2)
kusano 2b45e8
	bdnz	LL(22)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(23):
kusano 2b45e8
	FMADD	y01, alpha1, a1, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y02, alpha1, a2, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y03, alpha1, a3, y03
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y04, alpha1, a4, y04
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	FMADD	y05, alpha1, a5, y05
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y06, alpha1, a6, y06
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y07, alpha1, a7, y07
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y08, alpha1, a8, y08
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, alpha2, a1, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y02, alpha2, a2, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y03, alpha2, a3, y03
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y04, alpha2, a4, y04
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO3)
kusano 2b45e8
kusano 2b45e8
	FMADD	y05, alpha2, a5, y05
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y06, alpha2, a6, y06
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y07, alpha2, a7, y07
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y08, alpha2, a8, y08
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO3)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, alpha3, a1, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO4)
kusano 2b45e8
	FMADD	y02, alpha3, a2, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO4)
kusano 2b45e8
	FMADD	y03, alpha3, a3, y03
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO4)
kusano 2b45e8
	FMADD	y04, alpha3, a4, y04
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	FMADD	y05, alpha3, a5, y05
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO4)
kusano 2b45e8
	FMADD	y06, alpha3, a6, y06
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO4)
kusano 2b45e8
	FMADD	y07, alpha3, a7, y07
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO4)
kusano 2b45e8
	FMADD	y08, alpha3, a8, y08
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, alpha4, a1, y01
kusano 2b45e8
	FMADD	y02, alpha4, a2, y02
kusano 2b45e8
	FMADD	y03, alpha4, a3, y03
kusano 2b45e8
	FMADD	y04, alpha4, a4, y04
kusano 2b45e8
kusano 2b45e8
	FMADD	y05, alpha4, a5, y05
kusano 2b45e8
	STFDU	y01, 1 * SIZE(Y2)
kusano 2b45e8
	FMADD	y06, alpha4, a6, y06
kusano 2b45e8
	STFDU	y02, 1 * SIZE(Y2)
kusano 2b45e8
	FMADD	y07, alpha4, a7, y07
kusano 2b45e8
	STFDU	y03, 1 * SIZE(Y2)
kusano 2b45e8
	FMADD	y08, alpha4, a8, y08
kusano 2b45e8
	STFDU	y04, 1 * SIZE(Y2)
kusano 2b45e8
kusano 2b45e8
	STFDU	y05, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y06, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y07, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y08, 1 * SIZE(Y2)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(25):
kusano 2b45e8
	andi.	r0, M, 7
kusano 2b45e8
	ble	LL(29)
kusano 2b45e8
kusano 2b45e8
	andi.	r0, M, 4
kusano 2b45e8
	ble	LL(27)
kusano 2b45e8
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y01, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y02, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y03, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y04, 1 * SIZE(Y1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, alpha1, a1, y01
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y02, alpha1, a2, y02
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y03, alpha1, a3, y03
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y04, alpha1, a4, y04
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, alpha2, a5, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y02, alpha2, a6, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y03, alpha2, a7, y03
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y04, alpha2, a8, y04
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO3)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, alpha3, a1, y01
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO4)
kusano 2b45e8
	FMADD	y02, alpha3, a2, y02
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO4)
kusano 2b45e8
	FMADD	y03, alpha3, a3, y03
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO4)
kusano 2b45e8
	FMADD	y04, alpha3, a4, y04
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, alpha4, a5, y01
kusano 2b45e8
	FMADD	y02, alpha4, a6, y02
kusano 2b45e8
	FMADD	y03, alpha4, a7, y03
kusano 2b45e8
	FMADD	y04, alpha4, a8, y04
kusano 2b45e8
kusano 2b45e8
	STFDU	y01, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y02, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y03, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y04, 1 * SIZE(Y2)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(27):
kusano 2b45e8
	andi.	r0, M, 2
kusano 2b45e8
	ble	LL(28)
kusano 2b45e8
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y01, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y02, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO2)
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, alpha1, a1, y01
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y02, alpha1, a2, y02
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y01, alpha2, a3, y01
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO4)
kusano 2b45e8
	FMADD	y02, alpha2, a4, y02
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, alpha3, a5, y01
kusano 2b45e8
	FMADD	y02, alpha3, a6, y02
kusano 2b45e8
	FMADD	y01, alpha4, a7, y01
kusano 2b45e8
	FMADD	y02, alpha4, a8, y02
kusano 2b45e8
kusano 2b45e8
	STFDU	y01, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y02, 1 * SIZE(Y2)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(28):
kusano 2b45e8
	andi.	r0, M, 1
kusano 2b45e8
	ble	LL(29)
kusano 2b45e8
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y01, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO3)
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, alpha1, a1, y01
kusano 2b45e8
	FMADD	y01, alpha2, a2, y01
kusano 2b45e8
	FMADD	y01, alpha3, a3, y01
kusano 2b45e8
	FMADD	y01, alpha4, a4, y01
kusano 2b45e8
kusano 2b45e8
	STFDU	y01, 1 * SIZE(Y2)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(29):
kusano 2b45e8
	addi	J, J, -1
kusano 2b45e8
	lfd	alpha, ALPHA
kusano 2b45e8
	cmpi	cr0, 0, J, 0
kusano 2b45e8
	bgt	LL(21)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(30):
kusano 2b45e8
	andi.	J, N, 2
kusano 2b45e8
	ble	LL(40)
kusano 2b45e8
kusano 2b45e8
	LFDUX	alpha1, X, INCX
kusano 2b45e8
	LFDUX	alpha2, X, INCX
kusano 2b45e8
kusano 2b45e8
	mr	AO1, A
kusano 2b45e8
	add	AO2, A,   LDA
kusano 2b45e8
	add	A,   AO2, LDA
kusano 2b45e8
kusano 2b45e8
	FMUL	alpha1, alpha, alpha1
kusano 2b45e8
	mr	Y1, YY
kusano 2b45e8
	FMUL	alpha2, alpha, alpha2
kusano 2b45e8
	mr	Y2, YY
kusano 2b45e8
kusano 2b45e8
	srawi.	r0,  M, 3
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
	ble	LL(35)
kusano 2b45e8
kusano 2b45e8
	LFDU	y01, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y02, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y03, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y04, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y05, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y06, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y07, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y08, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO1)
kusano 2b45e8
	bdz	LL(33)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(32):
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbtst	Y1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y09, alpha1, a1, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y10, alpha1, a2, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y11, alpha1, a3, y03
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y12, alpha1, a4, y04
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	LFDU	y01, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	y02, 1 * SIZE(Y1)
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbt	AO2, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y13, alpha1, a5, y05
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y14, alpha1, a6, y06
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y15, alpha1, a7, y07
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y16, alpha1, a8, y08
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	LFDU	y03, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	y04, 1 * SIZE(Y1)
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbt	AO2, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y09, alpha2, a1, y09
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y10, alpha2, a2, y10
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y11, alpha2, a3, y11
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y12, alpha2, a4, y12
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO1)
kusano 2b45e8
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbtst	Y1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
	LFDU	y05, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	y06, 1 * SIZE(Y1)
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbt	AO1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y13, alpha2, a5, y13
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y14, alpha2, a6, y14
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y15, alpha2, a7, y15
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y16, alpha2, a8, y16
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO1)
kusano 2b45e8
kusano 2b45e8
	LFDU	y07, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	y08, 1 * SIZE(Y1)
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbt	AO1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	STFDU	y09, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y10, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y11, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y12, 1 * SIZE(Y2)
kusano 2b45e8
kusano 2b45e8
	STFDU	y13, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y14, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y15, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y16, 1 * SIZE(Y2)
kusano 2b45e8
	bdnz	LL(32)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(33):
kusano 2b45e8
	FMADD	y01, alpha1, a1, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y02, alpha1, a2, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y03, alpha1, a3, y03
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y04, alpha1, a4, y04
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	FMADD	y05, alpha1, a5, y05
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y06, alpha1, a6, y06
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y07, alpha1, a7, y07
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y08, alpha1, a8, y08
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, alpha2, a1, y01
kusano 2b45e8
	FMADD	y02, alpha2, a2, y02
kusano 2b45e8
	FMADD	y03, alpha2, a3, y03
kusano 2b45e8
	FMADD	y04, alpha2, a4, y04
kusano 2b45e8
kusano 2b45e8
	FMADD	y05, alpha2, a5, y05
kusano 2b45e8
	STFDU	y01, 1 * SIZE(Y2)
kusano 2b45e8
	FMADD	y06, alpha2, a6, y06
kusano 2b45e8
	STFDU	y02, 1 * SIZE(Y2)
kusano 2b45e8
	FMADD	y07, alpha2, a7, y07
kusano 2b45e8
	STFDU	y03, 1 * SIZE(Y2)
kusano 2b45e8
	FMADD	y08, alpha2, a8, y08
kusano 2b45e8
	STFDU	y04, 1 * SIZE(Y2)
kusano 2b45e8
kusano 2b45e8
	STFDU	y05, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y06, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y07, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y08, 1 * SIZE(Y2)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(35):
kusano 2b45e8
	andi.	r0, M, 7
kusano 2b45e8
	ble	LL(40)
kusano 2b45e8
kusano 2b45e8
	andi.	r0, M, 4
kusano 2b45e8
	ble	LL(37)
kusano 2b45e8
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y01, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y02, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y03, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y04, 1 * SIZE(Y1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, alpha1, a1, y01
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y02, alpha1, a2, y02
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y03, alpha1, a3, y03
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y04, alpha1, a4, y04
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, alpha2, a5, y01
kusano 2b45e8
	FMADD	y02, alpha2, a6, y02
kusano 2b45e8
	FMADD	y03, alpha2, a7, y03
kusano 2b45e8
	FMADD	y04, alpha2, a8, y04
kusano 2b45e8
kusano 2b45e8
	STFDU	y01, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y02, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y03, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y04, 1 * SIZE(Y2)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(37):
kusano 2b45e8
	andi.	r0, M, 2
kusano 2b45e8
	ble	LL(38)
kusano 2b45e8
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y01, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y02, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO2)
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, alpha1, a1, y01
kusano 2b45e8
	FMADD	y02, alpha1, a2, y02
kusano 2b45e8
	FMADD	y01, alpha2, a3, y01
kusano 2b45e8
	FMADD	y02, alpha2, a4, y02
kusano 2b45e8
kusano 2b45e8
	STFDU	y01, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y02, 1 * SIZE(Y2)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(38):
kusano 2b45e8
	andi.	r0, M, 1
kusano 2b45e8
	ble	LL(40)
kusano 2b45e8
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y01, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, alpha1, a1, y01
kusano 2b45e8
	FMADD	y01, alpha2, a2, y01
kusano 2b45e8
kusano 2b45e8
	STFDU	y01, 1 * SIZE(Y2)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(40):
kusano 2b45e8
	andi.	J, N, 1
kusano 2b45e8
	lfd	alpha, ALPHA
kusano 2b45e8
	ble	LL(990)
kusano 2b45e8
kusano 2b45e8
	LFDUX	alpha1, X, INCX
kusano 2b45e8
kusano 2b45e8
	mr	AO1, A
kusano 2b45e8
	add	A,   A, LDA
kusano 2b45e8
kusano 2b45e8
	FMUL	alpha1, alpha, alpha1
kusano 2b45e8
	mr	Y1, YY
kusano 2b45e8
	mr	Y2, YY
kusano 2b45e8
kusano 2b45e8
	srawi.	r0,  M, 3
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
	ble	LL(45)
kusano 2b45e8
kusano 2b45e8
	LFDU	y01, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y02, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y03, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y04, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y05, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y06, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y07, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y08, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO1)
kusano 2b45e8
	bdz	LL(43)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(42):
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbtst	Y1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y09, alpha1, a1, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y10, alpha1, a2, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y11, alpha1, a3, y03
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y12, alpha1, a4, y04
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO1)
kusano 2b45e8
kusano 2b45e8
	LFDU	y01, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	y02, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	y03, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	y04, 1 * SIZE(Y1)
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbt	AO1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y13, alpha1, a5, y05
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y14, alpha1, a6, y06
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y15, alpha1, a7, y07
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y16, alpha1, a8, y08
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO1)
kusano 2b45e8
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbtst	Y1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
	LFDU	y05, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	y06, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	y07, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	y08, 1 * SIZE(Y1)
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbt	AO1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	STFDU	y09, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y10, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y11, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y12, 1 * SIZE(Y2)
kusano 2b45e8
kusano 2b45e8
	STFDU	y13, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y14, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y15, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y16, 1 * SIZE(Y2)
kusano 2b45e8
	bdnz	LL(42)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(43):
kusano 2b45e8
	FMADD	y01, alpha1, a1, y01
kusano 2b45e8
	FMADD	y02, alpha1, a2, y02
kusano 2b45e8
	FMADD	y03, alpha1, a3, y03
kusano 2b45e8
	FMADD	y04, alpha1, a4, y04
kusano 2b45e8
kusano 2b45e8
	FMADD	y05, alpha1, a5, y05
kusano 2b45e8
	STFDU	y01, 1 * SIZE(Y2)
kusano 2b45e8
	FMADD	y06, alpha1, a6, y06
kusano 2b45e8
	STFDU	y02, 1 * SIZE(Y2)
kusano 2b45e8
	FMADD	y07, alpha1, a7, y07
kusano 2b45e8
	STFDU	y03, 1 * SIZE(Y2)
kusano 2b45e8
	FMADD	y08, alpha1, a8, y08
kusano 2b45e8
	STFDU	y04, 1 * SIZE(Y2)
kusano 2b45e8
kusano 2b45e8
	STFDU	y05, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y06, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y07, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y08, 1 * SIZE(Y2)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(45):
kusano 2b45e8
	andi.	r0, M, 7
kusano 2b45e8
	ble	LL(990)
kusano 2b45e8
kusano 2b45e8
	andi.	r0, M, 4
kusano 2b45e8
	ble	LL(47)
kusano 2b45e8
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y01, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y02, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y03, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y04, 1 * SIZE(Y1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, alpha1, a1, y01
kusano 2b45e8
	FMADD	y02, alpha1, a2, y02
kusano 2b45e8
	FMADD	y03, alpha1, a3, y03
kusano 2b45e8
	FMADD	y04, alpha1, a4, y04
kusano 2b45e8
kusano 2b45e8
	STFDU	y01, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y02, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y03, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y04, 1 * SIZE(Y2)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(47):
kusano 2b45e8
	andi.	r0, M, 2
kusano 2b45e8
	ble	LL(48)
kusano 2b45e8
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y01, 1 * SIZE(Y1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y02, 1 * SIZE(Y1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, alpha1, a1, y01
kusano 2b45e8
	FMADD	y02, alpha1, a2, y02
kusano 2b45e8
kusano 2b45e8
	STFDU	y01, 1 * SIZE(Y2)
kusano 2b45e8
	STFDU	y02, 1 * SIZE(Y2)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(48):
kusano 2b45e8
	andi.	r0, M, 1
kusano 2b45e8
	ble	LL(990)
kusano 2b45e8
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	y01, 1 * SIZE(Y1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, alpha1, a1, y01
kusano 2b45e8
kusano 2b45e8
	STFDU	y01, 1 * SIZE(Y2)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(990):
kusano 2b45e8
	cmpi	cr0, 0, INCY, SIZE
kusano 2b45e8
	beq	LL(999)
kusano 2b45e8
kusano 2b45e8
	addi	YY, BUFFER, -SIZE
kusano 2b45e8
	mr	Y1, Y
kusano 2b45e8
kusano 2b45e8
	srawi.	r0, M, 3
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
	ble	LL(995)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(991):
kusano 2b45e8
	LFDUX	f0, Y, INCY
kusano 2b45e8
	LFDUX	f1, Y, INCY
kusano 2b45e8
	LFDUX	f2, Y, INCY
kusano 2b45e8
	LFDUX	f3, Y, INCY
kusano 2b45e8
	LFDUX	f4, Y, INCY
kusano 2b45e8
	LFDUX	f5, Y, INCY
kusano 2b45e8
	LFDUX	f6, Y, INCY
kusano 2b45e8
	LFDUX	f7, Y, INCY
kusano 2b45e8
kusano 2b45e8
	LFDU	f8,   1 * SIZE(YY)
kusano 2b45e8
	LFDU	f9,   1 * SIZE(YY)
kusano 2b45e8
	LFDU	f10,  1 * SIZE(YY)
kusano 2b45e8
	LFDU	f11,  1 * SIZE(YY)
kusano 2b45e8
	LFDU	f12,  1 * SIZE(YY)
kusano 2b45e8
	LFDU	f13,  1 * SIZE(YY)
kusano 2b45e8
	LFDU	f14,  1 * SIZE(YY)
kusano 2b45e8
	LFDU	f15,  1 * SIZE(YY)
kusano 2b45e8
kusano 2b45e8
	FADD	f8,  f8,  f0
kusano 2b45e8
	FADD	f9,  f9,  f1
kusano 2b45e8
	FADD	f10, f10, f2
kusano 2b45e8
	FADD	f11, f11, f3
kusano 2b45e8
	FADD	f12, f12, f4
kusano 2b45e8
	FADD	f13, f13, f5
kusano 2b45e8
	FADD	f14, f14, f6
kusano 2b45e8
	FADD	f15, f15, f7
kusano 2b45e8
kusano 2b45e8
	STFDUX	f8,  Y1, INCY
kusano 2b45e8
	STFDUX	f9,  Y1, INCY
kusano 2b45e8
	STFDUX	f10, Y1, INCY
kusano 2b45e8
	STFDUX	f11, Y1, INCY
kusano 2b45e8
	STFDUX	f12, Y1, INCY
kusano 2b45e8
	STFDUX	f13, Y1, INCY
kusano 2b45e8
	STFDUX	f14, Y1, INCY
kusano 2b45e8
	STFDUX	f15, Y1, INCY
kusano 2b45e8
	bdnz	LL(991)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(995):
kusano 2b45e8
	andi.	J, M, 4
kusano 2b45e8
	ble	LL(996)
kusano 2b45e8
kusano 2b45e8
	LFDUX	f0, Y, INCY
kusano 2b45e8
	LFDUX	f1, Y, INCY
kusano 2b45e8
	LFDUX	f2, Y, INCY
kusano 2b45e8
	LFDUX	f3, Y, INCY
kusano 2b45e8
kusano 2b45e8
	LFDU	f8,   1 * SIZE(YY)
kusano 2b45e8
	LFDU	f9,   1 * SIZE(YY)
kusano 2b45e8
	LFDU	f10,  1 * SIZE(YY)
kusano 2b45e8
	LFDU	f11,  1 * SIZE(YY)
kusano 2b45e8
kusano 2b45e8
	FADD	f8,  f8,  f0
kusano 2b45e8
	FADD	f9,  f9,  f1
kusano 2b45e8
	FADD	f10, f10, f2
kusano 2b45e8
	FADD	f11, f11, f3
kusano 2b45e8
kusano 2b45e8
	STFDUX	f8,  Y1, INCY
kusano 2b45e8
	STFDUX	f9,  Y1, INCY
kusano 2b45e8
	STFDUX	f10, Y1, INCY
kusano 2b45e8
	STFDUX	f11, Y1, INCY
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(996):
kusano 2b45e8
	andi.	J, M, 2
kusano 2b45e8
	ble	LL(997)
kusano 2b45e8
kusano 2b45e8
	LFDUX	f0, Y, INCY
kusano 2b45e8
	LFDUX	f1, Y, INCY
kusano 2b45e8
kusano 2b45e8
	LFDU	f8,   1 * SIZE(YY)
kusano 2b45e8
	LFDU	f9,   1 * SIZE(YY)
kusano 2b45e8
kusano 2b45e8
	FADD	f8,  f8,  f0
kusano 2b45e8
	FADD	f9,  f9,  f1
kusano 2b45e8
kusano 2b45e8
	STFDUX	f8,  Y1, INCY
kusano 2b45e8
	STFDUX	f9,  Y1, INCY
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(997):
kusano 2b45e8
	andi.	J, M, 1
kusano 2b45e8
	ble	LL(999)
kusano 2b45e8
kusano 2b45e8
	LFDUX	f0, Y, INCY
kusano 2b45e8
	LFDU	f8,   1 * SIZE(YY)
kusano 2b45e8
kusano 2b45e8
	FADD	f8,  f8,  f0
kusano 2b45e8
kusano 2b45e8
	STFDUX	f8,  Y1, INCY
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(999):
kusano 2b45e8
	li	r3, 0
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
	lfd	f18,    32(SP)
kusano 2b45e8
	lfd	f19,    40(SP)
kusano 2b45e8
	lfd	f20,    48(SP)
kusano 2b45e8
	lfd	f21,    56(SP)
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
	lfd	f26,    96(SP)
kusano 2b45e8
	lfd	f27,   104(SP)
kusano 2b45e8
kusano 2b45e8
#ifdef __64BIT__
kusano 2b45e8
	ld	r14,   144(SP)
kusano 2b45e8
	ld	r15,   152(SP)
kusano 2b45e8
	ld	r16,   160(SP)
kusano 2b45e8
	ld	r17,   168(SP)
kusano 2b45e8
	ld	r18,   176(SP)
kusano 2b45e8
	ld	r19,   184(SP)
kusano 2b45e8
	ld	r20,   192(SP)
kusano 2b45e8
	ld	r21,   200(SP)
kusano 2b45e8
	ld	r22,   208(SP)
kusano 2b45e8
	ld	r23,   216(SP)
kusano 2b45e8
#else
kusano 2b45e8
	lwz	r14,   144(SP)
kusano 2b45e8
	lwz	r15,   148(SP)
kusano 2b45e8
	lwz	r16,   152(SP)
kusano 2b45e8
	lwz	r17,   156(SP)
kusano 2b45e8
	lwz	r18,   160(SP)
kusano 2b45e8
	lwz	r19,   164(SP)
kusano 2b45e8
	lwz	r20,   168(SP)
kusano 2b45e8
	lwz	r21,   172(SP)
kusano 2b45e8
	lwz	r22,   176(SP)
kusano 2b45e8
	lwz	r23,   180(SP)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	addi	SP, SP, STACKSIZE
kusano 2b45e8
	blr
kusano 2b45e8
kusano 2b45e8
	EPILOGUE
kusano 2b45e8
#endif