Blame thirdparty/openblas/xianyi-OpenBLAS-e6e87a2/kernel/power/gemv_t_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	BUFFER	r11
kusano 2b45e8
#define	XP	r12
kusano 2b45e8
#define	AO1	r14
kusano 2b45e8
#define	AO2	r15
kusano 2b45e8
#define	AO3	r16
kusano 2b45e8
#define	AO4	r17
kusano 2b45e8
#define	J	r18
kusano 2b45e8
#define YY	r19
kusano 2b45e8
#define	PREA	r20
kusano 2b45e8
#define	PREC	r21
kusano 2b45e8
#define	X1	r22
kusano 2b45e8
kusano 2b45e8
kusano 2b45e8
#if defined(PPCG4)
kusano 2b45e8
#define PREFETCHSIZE_A  42
kusano 2b45e8
#define PREFETCHSIZE_C   7
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(POWER6)
kusano 2b45e8
#define PREFETCHSIZE_A  42
kusano 2b45e8
#define PREFETCHSIZE_C   7
kusano 2b45e8
#endif
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
kusano 2b45e8
#define a1	f8
kusano 2b45e8
#define a2	f9
kusano 2b45e8
#define a3	f10
kusano 2b45e8
#define a4	f11
kusano 2b45e8
#define a5	f12
kusano 2b45e8
#define a6	f13
kusano 2b45e8
#define a7	f14
kusano 2b45e8
#define a8	f15
kusano 2b45e8
kusano 2b45e8
#define b1	f16
kusano 2b45e8
#define b2	f17
kusano 2b45e8
#define b3	f18
kusano 2b45e8
#define b4	f19
kusano 2b45e8
#define b5	f20
kusano 2b45e8
#define b6	f21
kusano 2b45e8
#define b7	f22
kusano 2b45e8
#define b8	f23
kusano 2b45e8
kusano 2b45e8
#define alpha	f23
kusano 2b45e8
kusano 2b45e8
#ifndef NEEDPARAM
kusano 2b45e8
kusano 2b45e8
#ifndef __64BIT__
kusano 2b45e8
#define STACKSIZE 224
kusano 2b45e8
#else
kusano 2b45e8
#define STACKSIZE 288
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#define FZERO     144(SP)
kusano 2b45e8
#define ALPHA     152(SP)
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
kusano 2b45e8
#ifdef __64BIT__
kusano 2b45e8
	std	r0,    FZERO
kusano 2b45e8
	stfd	f1,    ALPHA
kusano 2b45e8
	std	r14,   160(SP)
kusano 2b45e8
	std	r15,   168(SP)
kusano 2b45e8
	std	r16,   176(SP)
kusano 2b45e8
	std	r17,   184(SP)
kusano 2b45e8
	std	r18,   192(SP)
kusano 2b45e8
	std	r19,   200(SP)
kusano 2b45e8
	std	r20,   208(SP)
kusano 2b45e8
	std	r21,   216(SP)
kusano 2b45e8
	std	r22,   224(SP)
kusano 2b45e8
#else
kusano 2b45e8
	stw	r0,    0 + FZERO
kusano 2b45e8
	stw	r0,    4 + FZERO
kusano 2b45e8
	stfd	f1,    ALPHA
kusano 2b45e8
	stw	r14,   160(SP)
kusano 2b45e8
	stw	r15,   164(SP)
kusano 2b45e8
	stw	r16,   168(SP)
kusano 2b45e8
	stw	r17,   172(SP)
kusano 2b45e8
	stw	r18,   176(SP)
kusano 2b45e8
	stw	r19,   180(SP)
kusano 2b45e8
	stw	r20,   184(SP)
kusano 2b45e8
	stw	r21,   188(SP)
kusano 2b45e8
	stw	r22,   192(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
	slwi	LDA,  LDA,  BASE_SHIFT
kusano 2b45e8
	slwi	INCX, INCX, BASE_SHIFT
kusano 2b45e8
	slwi	INCY, INCY, BASE_SHIFT
kusano 2b45e8
kusano 2b45e8
	addi	A, A, -SIZE
kusano 2b45e8
	sub	X, X, INCX
kusano 2b45e8
	sub	Y, Y, INCY
kusano 2b45e8
kusano 2b45e8
	li	PREA, PREFETCHSIZE_A * SIZE
kusano 2b45e8
	li	PREC, PREFETCHSIZE_C * SIZE
kusano 2b45e8
kusano 2b45e8
	cmpi	cr0, 0, M, 0
kusano 2b45e8
	ble	LL(999)
kusano 2b45e8
	cmpi	cr0, 0, N, 0
kusano 2b45e8
	ble	LL(999)
kusano 2b45e8
kusano 2b45e8
	mr	XP, X
kusano 2b45e8
kusano 2b45e8
	cmpi	cr0, 0, INCX, SIZE
kusano 2b45e8
	beq	LL(10)
kusano 2b45e8
kusano 2b45e8
	addi	XP, BUFFER, -SIZE
kusano 2b45e8
	addi	X1, BUFFER, -SIZE
kusano 2b45e8
kusano 2b45e8
	srawi.	r0, M, 3
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
	ble	LL(CopyRemain)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(CopyKernel):
kusano 2b45e8
	LFDUX	f0, X, INCX
kusano 2b45e8
	LFDUX	f1, X, INCX
kusano 2b45e8
	LFDUX	f2, X, INCX
kusano 2b45e8
	LFDUX	f3, X, INCX
kusano 2b45e8
	LFDUX	f4, X, INCX
kusano 2b45e8
	LFDUX	f5, X, INCX
kusano 2b45e8
	LFDUX	f6, X, INCX
kusano 2b45e8
	LFDUX	f7, X, INCX
kusano 2b45e8
kusano 2b45e8
	STFDU	f0,  1 * SIZE(X1)
kusano 2b45e8
	STFDU	f1,  1 * SIZE(X1)
kusano 2b45e8
	STFDU	f2,  1 * SIZE(X1)
kusano 2b45e8
	STFDU	f3,  1 * SIZE(X1)
kusano 2b45e8
	STFDU	f4,  1 * SIZE(X1)
kusano 2b45e8
	STFDU	f5,  1 * SIZE(X1)
kusano 2b45e8
	STFDU	f6,  1 * SIZE(X1)
kusano 2b45e8
	STFDU	f7,  1 * SIZE(X1)
kusano 2b45e8
	bdnz	LL(CopyKernel)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(CopyRemain):
kusano 2b45e8
	andi.	r0, M, 7
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
	ble	LL(10)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(CopySub):
kusano 2b45e8
	LFDUX	f0, X,  INCX
kusano 2b45e8
	STFDU	f0,  1 * SIZE(X1)
kusano 2b45e8
	bdnz	LL(CopySub)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(10):
kusano 2b45e8
	mr	YY, Y
kusano 2b45e8
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
	add    AO3, AO2, LDA
kusano 2b45e8
	add    AO4, AO3, LDA
kusano 2b45e8
	add    A,   AO4, LDA
kusano 2b45e8
kusano 2b45e8
	mr     X1, XP
kusano 2b45e8
kusano 2b45e8
	lfd	 y01, FZERO
kusano 2b45e8
	fmr	 y02, y01
kusano 2b45e8
	fmr	 y03, y01
kusano 2b45e8
	fmr	 y04, y01
kusano 2b45e8
	fmr	 y05, y01
kusano 2b45e8
	fmr	 y06, y01
kusano 2b45e8
	fmr	 y07, y01
kusano 2b45e8
	fmr	 y08, y01
kusano 2b45e8
kusano 2b45e8
	dcbtst	 Y, PREC
kusano 2b45e8
kusano 2b45e8
	srawi.	r0,  M, 3
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
	ble	LL(24)
kusano 2b45e8
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
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
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
	LFDU	b2,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO3)
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	LFDU	b3,  1 * SIZE(X1)
kusano 2b45e8
	LFDU	b4,  1 * SIZE(X1)
kusano 2b45e8
	bdz	LL(23)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(22):
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbt	X1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y02, a2, b1, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y03, a3, b1, y03
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y04, a4, b1, y04
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbt	AO1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y05, a5, b2, y05
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y06, a6, b2, y06
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y07, a7, b2, y07
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y08, a8, b2, y08
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	LFDU	b2,  1 * SIZE(X1)
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbt	AO2, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b3, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y02, a2, b3, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y03, a3, b3, y03
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y04, a4, b3, y04
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	LFDU	b3,  1 * SIZE(X1)
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbt	AO3, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y05, a5, b4, y05
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y06, a6, b4, y06
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y07, a7, b4, y07
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y08, a8, b4, y08
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbt	AO4, PREA
kusano 2b45e8
#endif
kusano 2b45e8
	LFDU	b4,  1 * SIZE(X1)
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbt	X1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y02, a2, b1, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y03, a3, b1, y03
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y04, a4, b1, y04
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbt	AO1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y05, a5, b2, y05
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y06, a6, b2, y06
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y07, a7, b2, y07
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y08, a8, b2, y08
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	LFDU	b2,  1 * SIZE(X1)
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbt	AO2, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b3, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y02, a2, b3, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y03, a3, b3, y03
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y04, a4, b3, y04
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	LFDU	b3,  1 * SIZE(X1)
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbt	AO3, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y05, a5, b4, y05
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y06, a6, b4, y06
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y07, a7, b4, y07
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y08, a8, b4, y08
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	LFDU	b4,  1 * SIZE(X1)
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbt	AO4, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
 	bdnz	LL(22)
kusano 2b45e8
	.align 4	
kusano 2b45e8
kusano 2b45e8
LL(23):
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y02, a2, b1, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y03, a3, b1, y03
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y04, a4, b1, y04
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y05, a5, b2, y05
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y06, a6, b2, y06
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y07, a7, b2, y07
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y08, a8, b2, y08
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	LFDU	b2,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b3, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y02, a2, b3, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y03, a3, b3, y03
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y04, a4, b3, y04
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	LFDU	b3,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y05, a5, b4, y05
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y06, a6, b4, y06
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y07, a7, b4, y07
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y08, a8, b4, y08
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	LFDU	b4,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y02, a2, b1, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y03, a3, b1, y03
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y04, a4, b1, y04
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	FMADD	y05, a5, b2, y05
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y06, a6, b2, y06
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y07, a7, b2, y07
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y08, a8, b2, y08
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b3, y01
kusano 2b45e8
	FMADD	y02, a2, b3, y02
kusano 2b45e8
	FMADD	y03, a3, b3, y03
kusano 2b45e8
	FMADD	y04, a4, b3, y04
kusano 2b45e8
kusano 2b45e8
	FMADD	y05, a5, b4, y05
kusano 2b45e8
	FMADD	y06, a6, b4, y06
kusano 2b45e8
	FMADD	y07, a7, b4, y07
kusano 2b45e8
	FMADD	y08, a8, b4, y08
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(24):
kusano 2b45e8
	andi.	r0, M,  7
kusano 2b45e8
	ble	LL(28)
kusano 2b45e8
kusano 2b45e8
	andi.	r0, M,  4
kusano 2b45e8
	ble	LL(26)
kusano 2b45e8
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO3)
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO4)
kusano 2b45e8
	LFDU	b2,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y02, a2, b1, y02
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y03, a3, b1, y03
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y04, a4, b1, y04
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	LFDU	b3,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y05, a5, b2, y05
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y06, a6, b2, y06
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y07, a7, b2, y07
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y08, a8, b2, y08
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	LFDU	b4,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b3, y01
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y02, a2, b3, y02
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y03, a3, b3, y03
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y04, a4, b3, y04
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	FMADD	y05, a5, b4, y05
kusano 2b45e8
	FMADD	y06, a6, b4, y06
kusano 2b45e8
	FMADD	y07, a7, b4, y07
kusano 2b45e8
	FMADD	y08, a8, b4, y08
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(26):
kusano 2b45e8
	andi.	r0, M,  2
kusano 2b45e8
	ble	LL(27)
kusano 2b45e8
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO3)
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO4)
kusano 2b45e8
	LFDU	b2,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y02, a2, b1, y02
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
	FMADD	y03, a3, b1, y03
kusano 2b45e8
	LFDU	a7,  1 * SIZE(AO3)
kusano 2b45e8
	FMADD	y04, a4, b1, y04
kusano 2b45e8
	LFDU	a8,  1 * SIZE(AO4)
kusano 2b45e8
kusano 2b45e8
	FMADD	y05, a5, b2, y05
kusano 2b45e8
	FMADD	y06, a6, b2, y06
kusano 2b45e8
	FMADD	y07, a7, b2, y07
kusano 2b45e8
	FMADD	y08, a8, b2, y08
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(27):
kusano 2b45e8
	andi.	r0, M,  1
kusano 2b45e8
	ble	LL(28)
kusano 2b45e8
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
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, a1, b1, y01
kusano 2b45e8
	FMADD	y02, a2, b1, y02
kusano 2b45e8
	FMADD	y03, a3, b1, y03
kusano 2b45e8
	FMADD	y04, a4, b1, y04
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(28):
kusano 2b45e8
	lfd	alpha, ALPHA
kusano 2b45e8
kusano 2b45e8
	LFDUX	a1, Y, INCY
kusano 2b45e8
	LFDUX	a2, Y, INCY
kusano 2b45e8
	LFDUX	a3, Y, INCY
kusano 2b45e8
	LFDUX	a4, Y, INCY
kusano 2b45e8
kusano 2b45e8
	FADD	y01, y05, y01
kusano 2b45e8
	FADD	y02, y06, y02
kusano 2b45e8
	FADD	y03, y07, y03
kusano 2b45e8
	FADD	y04, y08, y04
kusano 2b45e8
kusano 2b45e8
	FMADD	a1, alpha, f0, a1
kusano 2b45e8
	FMADD	a2, alpha, f1, a2
kusano 2b45e8
	FMADD	a3, alpha, f2, a3
kusano 2b45e8
	FMADD	a4, alpha, f3, a4
kusano 2b45e8
kusano 2b45e8
	STFDUX	a1, YY, INCY
kusano 2b45e8
	addi	J, J, -1
kusano 2b45e8
	STFDUX	a2, YY, INCY
kusano 2b45e8
	cmpi	cr0, 0, J, 0
kusano 2b45e8
	STFDUX	a3, YY, INCY
kusano 2b45e8
	STFDUX	a4, YY, INCY
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
	mr     AO1, A
kusano 2b45e8
	add    AO2, A,   LDA
kusano 2b45e8
	add    A,   AO2, LDA
kusano 2b45e8
kusano 2b45e8
	mr     X1, XP
kusano 2b45e8
kusano 2b45e8
	lfd	 y01, FZERO
kusano 2b45e8
	fmr	 y02, y01
kusano 2b45e8
	fmr	 y03, y01
kusano 2b45e8
	fmr	 y04, y01
kusano 2b45e8
kusano 2b45e8
	srawi.	r0,  M, 3
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
	ble	LL(34)
kusano 2b45e8
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
	LFDU	b2,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
	LFDU	b3,  1 * SIZE(X1)
kusano 2b45e8
	LFDU	b4,  1 * SIZE(X1)
kusano 2b45e8
	bdz	LL(33)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(32):
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbt	X1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y02, a2, b1, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbt	AO1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y03, a5, b2, y03
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y04, a6, b2, y04
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	LFDU	b2,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b3, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y02, a2, b3, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	LFDU	b3,  1 * SIZE(X1)
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbt	AO2, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y03, a5, b4, y03
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y04, a6, b4, y04
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	LFDU	b4,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y02, a2, b1, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbt	X1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbt	AO1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y03, a5, b2, y03
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y04, a6, b2, y04
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	LFDU	b2,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b3, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y02, a2, b3, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	LFDU	b3,  1 * SIZE(X1)
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbt	AO2, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y03, a5, b4, y03
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y04, a6, b4, y04
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	LFDU	b4,  1 * SIZE(X1)
kusano 2b45e8
 	bdnz	LL(32)
kusano 2b45e8
	.align 4	
kusano 2b45e8
kusano 2b45e8
LL(33):
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y02, a2, b1, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y03, a5, b2, y03
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y04, a6, b2, y04
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	LFDU	b2,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b3, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y02, a2, b3, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	LFDU	b3,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y03, a5, b4, y03
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y04, a6, b4, y04
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	LFDU	b4,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y02, a2, b1, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	FMADD	y03, a5, b2, y03
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y04, a6, b2, y04
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b3, y01
kusano 2b45e8
	FMADD	y02, a2, b3, y02
kusano 2b45e8
kusano 2b45e8
	FMADD	y03, a5, b4, y03
kusano 2b45e8
	FMADD	y04, a6, b4, y04
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(34):
kusano 2b45e8
	andi.	r0, M,  7
kusano 2b45e8
	ble	LL(38)
kusano 2b45e8
kusano 2b45e8
	andi.	r0, M,  4
kusano 2b45e8
	ble	LL(36)
kusano 2b45e8
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	LFDU	b2,  1 * SIZE(X1)
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y02, a2, b1, y02
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	LFDU	b3,  1 * SIZE(X1)
kusano 2b45e8
	FMADD	y03, a5, b2, y03
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y04, a6, b2, y04
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	LFDU	b4,  1 * SIZE(X1)
kusano 2b45e8
	FMADD	y01, a1, b3, y01
kusano 2b45e8
	LFDU	a5,  1 * SIZE(AO1)
kusano 2b45e8
	FMADD	y02, a2, b3, y02
kusano 2b45e8
	LFDU	a6,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	FMADD	y03, a5, b4, y03
kusano 2b45e8
	FMADD	y04, a6, b4, y04
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(36):
kusano 2b45e8
	andi.	r0, M,  2
kusano 2b45e8
	ble	LL(37)
kusano 2b45e8
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
	LFDU	b2,  1 * SIZE(X1)
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	FMADD	y02, a2, b1, y02
kusano 2b45e8
	FMADD	y03, a3, b2, y03
kusano 2b45e8
	FMADD	y04, a4, b2, y04
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(37):
kusano 2b45e8
	andi.	r0, M,  1
kusano 2b45e8
	ble	LL(38)
kusano 2b45e8
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO2)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	FMADD	y02, a2, b1, y02
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(38):
kusano 2b45e8
	lfd	alpha, ALPHA
kusano 2b45e8
kusano 2b45e8
	LFDUX	a1, Y, INCY
kusano 2b45e8
	LFDUX	a2, Y, INCY
kusano 2b45e8
kusano 2b45e8
	FADD	y01, y03, y01
kusano 2b45e8
	FADD	y02, y04, y02
kusano 2b45e8
kusano 2b45e8
	FMADD	a1, alpha, f0, a1
kusano 2b45e8
	FMADD	a2, alpha, f1, a2
kusano 2b45e8
kusano 2b45e8
	STFDUX	a1, YY, INCY
kusano 2b45e8
	STFDUX	a2, YY, INCY
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(40):
kusano 2b45e8
	andi.	J, N, 1
kusano 2b45e8
	ble	LL(999)
kusano 2b45e8
kusano 2b45e8
	mr     AO1, A
kusano 2b45e8
	add    A,   A, LDA
kusano 2b45e8
kusano 2b45e8
	mr     X1, XP
kusano 2b45e8
kusano 2b45e8
	lfd	 y01, FZERO
kusano 2b45e8
	fmr	 y02, y01
kusano 2b45e8
kusano 2b45e8
	srawi.	r0,  M, 3
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
	ble	LL(44)
kusano 2b45e8
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO1)
kusano 2b45e8
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
	LFDU	b2,  1 * SIZE(X1)
kusano 2b45e8
	LFDU	b3,  1 * SIZE(X1)
kusano 2b45e8
	LFDU	b4,  1 * SIZE(X1)
kusano 2b45e8
	bdz	LL(43)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(42):
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbt	X1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y02, a2, b2, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b2,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
#ifdef PPCG4
kusano 2b45e8
	dcbt	AO1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a3, b3, y01
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b3,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y02, a4, b4, y02
kusano 2b45e8
 	LFDU	a4,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b4,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y02, a2, b2, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b2,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbt	AO1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a3, b3, y01
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b3,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
#if defined(PPCG4) && defined(DOUBLE)
kusano 2b45e8
	dcbt	X1, PREA
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	FMADD	y02, a4, b4, y02
kusano 2b45e8
 	LFDU	a4,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b4,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
 	bdnz	LL(42)
kusano 2b45e8
	.align 4	
kusano 2b45e8
kusano 2b45e8
LL(43):
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y02, a2, b2, y02
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b2,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a3, b3, y01
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b3,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y02, a4, b4, y02
kusano 2b45e8
 	LFDU	a4,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b4,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	FMADD	y02, a2, b2, y02
kusano 2b45e8
	FMADD	y01, a3, b3, y01
kusano 2b45e8
	FMADD	y02, a4, b4, y02
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(44):
kusano 2b45e8
	andi.	r0, M,  7
kusano 2b45e8
	ble	LL(48)
kusano 2b45e8
kusano 2b45e8
	andi.	r0, M,  4
kusano 2b45e8
	ble	LL(46)
kusano 2b45e8
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b2,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	LFDU	a3,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b3,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y02, a2, b2, y02
kusano 2b45e8
	LFDU	a4,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b4,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a3, b3, y01
kusano 2b45e8
	FMADD	y02, a4, b4, y02
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(46):
kusano 2b45e8
	andi.	r0, M,  2
kusano 2b45e8
	ble	LL(47)
kusano 2b45e8
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b2,  1 * SIZE(X1)
kusano 2b45e8
	LFDU	a2,  1 * SIZE(AO1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	FMADD	y02, a2, b2, y02
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(47):
kusano 2b45e8
	andi.	r0, M,  1
kusano 2b45e8
	ble	LL(48)
kusano 2b45e8
kusano 2b45e8
	LFDU	a1,  1 * SIZE(AO1)
kusano 2b45e8
	LFDU	b1,  1 * SIZE(X1)
kusano 2b45e8
kusano 2b45e8
	FMADD	y01, a1, b1, y01
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(48):
kusano 2b45e8
	lfd	alpha, ALPHA
kusano 2b45e8
kusano 2b45e8
	LFDUX	a1, Y, INCY
kusano 2b45e8
kusano 2b45e8
	FADD	y01, y02, y01
kusano 2b45e8
kusano 2b45e8
	FMADD	a1, alpha, f0, a1
kusano 2b45e8
kusano 2b45e8
	STFDUX	a1, YY, 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
kusano 2b45e8
#ifdef __64BIT__
kusano 2b45e8
	ld	r14,   160(SP)
kusano 2b45e8
	ld	r15,   168(SP)
kusano 2b45e8
	ld	r16,   176(SP)
kusano 2b45e8
	ld	r17,   184(SP)
kusano 2b45e8
	ld	r18,   192(SP)
kusano 2b45e8
	ld	r19,   200(SP)
kusano 2b45e8
	ld	r20,   208(SP)
kusano 2b45e8
	ld	r21,   216(SP)
kusano 2b45e8
	ld	r22,   224(SP)
kusano 2b45e8
#else
kusano 2b45e8
	lwz	r14,   160(SP)
kusano 2b45e8
	lwz	r15,   164(SP)
kusano 2b45e8
	lwz	r16,   168(SP)
kusano 2b45e8
	lwz	r17,   172(SP)
kusano 2b45e8
	lwz	r18,   176(SP)
kusano 2b45e8
	lwz	r19,   180(SP)
kusano 2b45e8
	lwz	r20,   184(SP)
kusano 2b45e8
	lwz	r21,   188(SP)
kusano 2b45e8
	lwz	r22,   192(SP)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	addi	SP, SP, STACKSIZE
kusano 2b45e8
kusano 2b45e8
	blr
kusano 2b45e8
kusano 2b45e8
	EPILOGUE
kusano 2b45e8
kusano 2b45e8
#endif