Blame thirdparty/openblas/xianyi-OpenBLAS-e6e87a2/kernel/power/gemm_kernel_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
#ifndef __64BIT__
kusano 2b45e8
#define LOAD	lwz
kusano 2b45e8
#else
kusano 2b45e8
#define LOAD	ld
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef __64BIT__
kusano 2b45e8
#define STACKSIZE 320
kusano 2b45e8
#define ALPHA   296(SP)
kusano 2b45e8
#define FZERO	304(SP)
kusano 2b45e8
#else
kusano 2b45e8
#define STACKSIZE 240
kusano 2b45e8
#define ALPHA   224(SP)
kusano 2b45e8
#define FZERO	232(SP)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#define	M	r3
kusano 2b45e8
#define	N	r4
kusano 2b45e8
#define	K	r5
kusano 2b45e8
kusano 2b45e8
#ifdef linux
kusano 2b45e8
#ifndef __64BIT__
kusano 2b45e8
#define A	r6
kusano 2b45e8
#define	B	r7
kusano 2b45e8
#define	C	r8
kusano 2b45e8
#define	LDC	r9
kusano 2b45e8
#define OFFSET	r10
kusano 2b45e8
#else
kusano 2b45e8
#define A	r7
kusano 2b45e8
#define	B	r8
kusano 2b45e8
#define	C	r9
kusano 2b45e8
#define	LDC	r10
kusano 2b45e8
#define OFFSET	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 A	r8
kusano 2b45e8
#define	B	r9
kusano 2b45e8
#define	C	r10
kusano 2b45e8
#define	LDC	r7
kusano 2b45e8
#define OFFSET	r6
kusano 2b45e8
#else
kusano 2b45e8
#define A	r7
kusano 2b45e8
#define	B	r8
kusano 2b45e8
#define	C	r9
kusano 2b45e8
#define	LDC	r10
kusano 2b45e8
#define OFFSET	r6
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#define AORIG	r18
kusano 2b45e8
#define TEMP	r19
kusano 2b45e8
#define KK	r20
kusano 2b45e8
#define	I	r21
kusano 2b45e8
#define J	r22
kusano 2b45e8
#define AO	r23
kusano 2b45e8
#define	BO	r24
kusano 2b45e8
#define	CO1	r25
kusano 2b45e8
#define CO2	r26
kusano 2b45e8
#define	CO3	r27
kusano 2b45e8
#define	CO4	r28
kusano 2b45e8
kusano 2b45e8
#define PREA	r29
kusano 2b45e8
kusano 2b45e8
kusano 2b45e8
	PROLOGUE
kusano 2b45e8
	PROFCODE
kusano 2b45e8
kusano 2b45e8
	addi	SP, SP, -STACKSIZE
kusano 2b45e8
	li	r0, 0
kusano 2b45e8
kusano 2b45e8
	stfd	f14,    0(SP)
kusano 2b45e8
	stfd	f15,    8(SP)
kusano 2b45e8
	stfd	f16,   16(SP)
kusano 2b45e8
	stfd	f17,   24(SP)
kusano 2b45e8
kusano 2b45e8
	stfd	f18,   32(SP)
kusano 2b45e8
	stfd	f19,   40(SP)
kusano 2b45e8
	stfd	f20,   48(SP)
kusano 2b45e8
	stfd	f21,   56(SP)
kusano 2b45e8
kusano 2b45e8
	stfd	f22,   64(SP)
kusano 2b45e8
	stfd	f23,   72(SP)
kusano 2b45e8
	stfd	f24,   80(SP)
kusano 2b45e8
	stfd	f25,   88(SP)
kusano 2b45e8
kusano 2b45e8
	stfd	f26,   96(SP)
kusano 2b45e8
	stfd	f27,  104(SP)
kusano 2b45e8
	stfd	f28,  112(SP)
kusano 2b45e8
	stfd	f29,  120(SP)
kusano 2b45e8
kusano 2b45e8
	stfd	f30,  128(SP)
kusano 2b45e8
	stfd	f31,  136(SP)
kusano 2b45e8
kusano 2b45e8
#ifdef __64BIT__
kusano 2b45e8
	std	r31,  144(SP)
kusano 2b45e8
	std	r30,  152(SP)
kusano 2b45e8
	std	r29,  160(SP)
kusano 2b45e8
	std	r28,  168(SP)
kusano 2b45e8
	std	r27,  176(SP)
kusano 2b45e8
	std	r26,  184(SP)
kusano 2b45e8
	std	r25,  192(SP)
kusano 2b45e8
	std	r24,  200(SP)
kusano 2b45e8
	std	r23,  208(SP)
kusano 2b45e8
	std	r22,  216(SP)
kusano 2b45e8
	std	r21,  224(SP)
kusano 2b45e8
	std	r20,  232(SP)
kusano 2b45e8
#if defined(TRMMKERNEL)
kusano 2b45e8
	std	r19,  240(SP)
kusano 2b45e8
	std	r18,  248(SP)
kusano 2b45e8
#endif
kusano 2b45e8
#else
kusano 2b45e8
	stw	r31,  144(SP)
kusano 2b45e8
	stw	r30,  148(SP)
kusano 2b45e8
	stw	r29,  152(SP)
kusano 2b45e8
	stw	r28,  156(SP)
kusano 2b45e8
	stw	r27,  160(SP)
kusano 2b45e8
	stw	r26,  164(SP)
kusano 2b45e8
	stw	r25,  168(SP)
kusano 2b45e8
	stw	r24,  172(SP)
kusano 2b45e8
	stw	r23,  176(SP)
kusano 2b45e8
	stw	r22,  180(SP)
kusano 2b45e8
	stw	r21,  184(SP)
kusano 2b45e8
	stw	r20,  188(SP)
kusano 2b45e8
#if defined(TRMMKERNEL)
kusano 2b45e8
	stw	r19,  192(SP)
kusano 2b45e8
	stw	r18,  196(SP)
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	stfd	f1,  ALPHA
kusano 2b45e8
	stw	r0,  FZERO
kusano 2b45e8
kusano 2b45e8
#if defined(_AIX) || defined(__APPLE__)
kusano 2b45e8
#if !defined(__64BIT__) && defined(DOUBLE)
kusano 2b45e8
	lwz	LDC,    56 + STACKSIZE(SP)
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	slwi	LDC, LDC, BASE_SHIFT
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL)
kusano 2b45e8
#if defined(linux) && defined(__64BIT__)
kusano 2b45e8
	ld	OFFSET,   112 + STACKSIZE(SP)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(_AIX) || defined(__APPLE__)
kusano 2b45e8
#ifdef __64BIT__
kusano 2b45e8
	ld	OFFSET,  112 + STACKSIZE(SP)
kusano 2b45e8
#else
kusano 2b45e8
#ifdef DOUBLE
kusano 2b45e8
	lwz	OFFSET,   60 + STACKSIZE(SP)
kusano 2b45e8
#else
kusano 2b45e8
	lwz	OFFSET,   56 + STACKSIZE(SP)
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL) && !defined(LEFT)
kusano 2b45e8
	neg	KK, OFFSET
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	cmpwi	cr0, M, 0
kusano 2b45e8
	ble	.L999
kusano 2b45e8
	cmpwi	cr0, N, 0
kusano 2b45e8
	ble	.L999
kusano 2b45e8
	cmpwi	cr0, K, 0
kusano 2b45e8
	ble	.L999
kusano 2b45e8
kusano 2b45e8
	srawi.	J, N,  2
kusano 2b45e8
	ble	.L40
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
#define A1	f16
kusano 2b45e8
#define A2	f17
kusano 2b45e8
#define A3	f18
kusano 2b45e8
#define A4	f19
kusano 2b45e8
#define A5	f20
kusano 2b45e8
#define A6	f21
kusano 2b45e8
#define B1	f22
kusano 2b45e8
#define B2	f23
kusano 2b45e8
#define B3	f24
kusano 2b45e8
#define B4	f25
kusano 2b45e8
#define B5	f26
kusano 2b45e8
#define B6	f27
kusano 2b45e8
#define B7	f28
kusano 2b45e8
#define B8	f29
kusano 2b45e8
#define B9	f30
kusano 2b45e8
#define B10	f31
kusano 2b45e8
kusano 2b45e8
kusano 2b45e8
.L10:
kusano 2b45e8
	mr	CO1, C
kusano 2b45e8
	add	CO2, C,  LDC
kusano 2b45e8
	add	CO3, CO2, LDC
kusano 2b45e8
	add	CO4, CO3, LDC
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL) &&  defined(LEFT)
kusano 2b45e8
	mr	KK, OFFSET
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	lfs	f0,  FZERO
kusano 2b45e8
 	fmr	f1,  f0
kusano 2b45e8
	fmr	f2,  f0
kusano 2b45e8
	fmr	f3,  f0
kusano 2b45e8
	fmr	f4,  f0
kusano 2b45e8
	fmr	f5,  f0
kusano 2b45e8
	fmr	f6,  f0
kusano 2b45e8
	fmr	f7,  f0
kusano 2b45e8
	fmr	f8,  f0
kusano 2b45e8
	fmr	f9,  f0
kusano 2b45e8
	fmr	f10, f0
kusano 2b45e8
	fmr	f11, f0
kusano 2b45e8
	fmr	f12, f0
kusano 2b45e8
	fmr	f13, f0
kusano 2b45e8
	fmr	f14, f0
kusano 2b45e8
	fmr	f15, f0
kusano 2b45e8
	
kusano 2b45e8
	srawi.	I, M,  2
kusano 2b45e8
	mr	AO, A
kusano 2b45e8
	add	C,  CO4, LDC
kusano 2b45e8
	ble	.L20
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L11:
kusano 2b45e8
#if defined(TRMMKERNEL)
kusano 2b45e8
#if (defined(LEFT) &&  defined(TRANSA)) || (!defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
kusano 2b45e8
	LFD	A1,  0 * SIZE(AO)
kusano 2b45e8
	LFD	A2,  1 * SIZE(AO)
kusano 2b45e8
	LFD	A4,  4 * SIZE(AO)
kusano 2b45e8
	LFD	A5,  8 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	B1,  0 * SIZE(B)
kusano 2b45e8
	LFD	B2,  1 * SIZE(B)
kusano 2b45e8
	LFD	B3,  2 * SIZE(B)
kusano 2b45e8
	LFD	B4,  3 * SIZE(B)
kusano 2b45e8
	LFD	B5,  4 * SIZE(B)
kusano 2b45e8
	LFD	B6,  8 * SIZE(B)
kusano 2b45e8
	LFD	B7, 12 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	mr	BO,  B
kusano 2b45e8
#else
kusano 2b45e8
	slwi	r0, KK, 2 + BASE_SHIFT
kusano 2b45e8
	add	AO, AO, r0
kusano 2b45e8
	add	BO, B,  r0
kusano 2b45e8
kusano 2b45e8
	LFD	A1,  0 * SIZE(AO)
kusano 2b45e8
	LFD	A2,  1 * SIZE(AO)
kusano 2b45e8
	LFD	A4,  4 * SIZE(AO)
kusano 2b45e8
	LFD	A5,  8 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	B1,  0 * SIZE(BO)
kusano 2b45e8
	LFD	B2,  1 * SIZE(BO)
kusano 2b45e8
	LFD	B3,  2 * SIZE(BO)
kusano 2b45e8
	LFD	B4,  3 * SIZE(BO)
kusano 2b45e8
	LFD	B5,  4 * SIZE(BO)
kusano 2b45e8
	LFD	B6,  8 * SIZE(BO)
kusano 2b45e8
	LFD	B7, 12 * SIZE(BO)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#elif defined(LEFT)
kusano 2b45e8
	addi	TEMP, KK, 4
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, KK, 4
kusano 2b45e8
#endif
kusano 2b45e8
	srawi.	TEMP,  TEMP,  2
kusano 2b45e8
	mtspr	CTR, TEMP
kusano 2b45e8
	ble	.L15
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
	LFD	A1,  0 * SIZE(AO)
kusano 2b45e8
	LFD	A2,  1 * SIZE(AO)
kusano 2b45e8
	LFD	A4,  4 * SIZE(AO)
kusano 2b45e8
	LFD	A5,  8 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	B1,  0 * SIZE(B)
kusano 2b45e8
	LFD	B2,  1 * SIZE(B)
kusano 2b45e8
	LFD	B3,  2 * SIZE(B)
kusano 2b45e8
	LFD	B4,  3 * SIZE(B)
kusano 2b45e8
	LFD	B5,  4 * SIZE(B)
kusano 2b45e8
	LFD	B6,  8 * SIZE(B)
kusano 2b45e8
	LFD	B7, 12 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	srawi.	r0,  K,  2
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
	mr	BO,  B
kusano 2b45e8
	ble	.L15
kusano 2b45e8
#endif
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L12:
kusano 2b45e8
	FMADD	f0,  A1, B1, f0
kusano 2b45e8
	LFD	A3,  2 * SIZE(AO)
kusano 2b45e8
	FMADD	f4,  A1, B2, f4
kusano 2b45e8
	LFD	A6, 12 * SIZE(AO)
kusano 2b45e8
	FMADD	f8,  A1, B3, f8
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f12, A1, B4, f12
kusano 2b45e8
	nop
kusano 2b45e8
kusano 2b45e8
	FMADD	f1,  A2, B1, f1
kusano 2b45e8
	LFD	A1,  3 * SIZE(AO)
kusano 2b45e8
	FMADD	f5,  A2, B2, f5
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f9,  A2, B3, f9
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f13, A2, B4, f13
kusano 2b45e8
	nop
kusano 2b45e8
kusano 2b45e8
	FMADD	f2,  A3, B1, f2
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f6,  A3, B2, f6
kusano 2b45e8
	LFD	B8,  5 * SIZE(BO)
kusano 2b45e8
	FMADD	f10, A3, B3, f10
kusano 2b45e8
	LFD	B9,  6 * SIZE(BO)
kusano 2b45e8
	FMADD	f14, A3, B4, f14
kusano 2b45e8
	LFD	B10, 7 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f3,  A1, B1, f3
kusano 2b45e8
	LFD	A2,  5 * SIZE(AO)
kusano 2b45e8
	FMADD	f7,  A1, B2, f7
kusano 2b45e8
	LFD	B1, 16 * SIZE(BO)
kusano 2b45e8
	FMADD	f11, A1, B3, f11
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f15, A1, B4, f15
kusano 2b45e8
	nop
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  A4, B5, f0
kusano 2b45e8
 	LFD	A3,  6 * SIZE(AO)
kusano 2b45e8
	FMADD	f4,  A4, B8, f4
kusano 2b45e8
	LFD	A1, 16 * SIZE(AO)
kusano 2b45e8
	FMADD	f8,  A4, B9, f8
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f12, A4, B10, f12
kusano 2b45e8
	nop
kusano 2b45e8
kusano 2b45e8
	FMADD	f1,  A2, B5, f1
kusano 2b45e8
	LFD	A4,  7 * SIZE(AO)
kusano 2b45e8
	FMADD	f5,  A2, B8, f5
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f9,  A2, B9, f9
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f13, A2, B10, f13
kusano 2b45e8
	nop
kusano 2b45e8
kusano 2b45e8
	FMADD	f2,  A3, B5, f2
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f6,  A3, B8, f6
kusano 2b45e8
	LFD	B2,  9 * SIZE(BO)
kusano 2b45e8
	FMADD	f10, A3, B9, f10
kusano 2b45e8
	LFD	B3, 10 * SIZE(BO)
kusano 2b45e8
	FMADD	f14, A3, B10, f14
kusano 2b45e8
	LFD	B4, 11 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f3,  A4, B5, f3
kusano 2b45e8
	LFD	A2,  9 * SIZE(AO)
kusano 2b45e8
	FMADD	f7,  A4, B8, f7
kusano 2b45e8
	LFD	B5, 20 * SIZE(BO)
kusano 2b45e8
	FMADD	f11, A4, B9, f11
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f15, A4, B10, f15
kusano 2b45e8
	nop
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  A5, B6, f0
kusano 2b45e8
	LFD	A3, 10 * SIZE(AO)
kusano 2b45e8
	FMADD	f4,  A5, B2, f4
kusano 2b45e8
	LFD	A4, 20 * SIZE(AO)
kusano 2b45e8
	FMADD	f8,  A5, B3, f8
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f12, A5, B4, f12
kusano 2b45e8
	nop
kusano 2b45e8
kusano 2b45e8
	FMADD	f1,  A2, B6, f1
kusano 2b45e8
	LFD	A5, 11 * SIZE(AO)
kusano 2b45e8
	FMADD	f5,  A2, B2, f5
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f9,  A2, B3, f9
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f13, A2, B4, f13
kusano 2b45e8
	nop
kusano 2b45e8
kusano 2b45e8
	FMADD	f2,  A3, B6, f2
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f6,  A3, B2, f6
kusano 2b45e8
	LFD	B8, 13 * SIZE(BO)
kusano 2b45e8
	FMADD	f10, A3, B3, f10
kusano 2b45e8
	LFD	B9, 14 * SIZE(BO)
kusano 2b45e8
	FMADD	f14, A3, B4, f14
kusano 2b45e8
	LFD	B10,15 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f3,  A5, B6, f3
kusano 2b45e8
	LFD	A2, 13 * SIZE(AO)
kusano 2b45e8
	FMADD	f7,  A5, B2, f7
kusano 2b45e8
	LFD	B6, 24 * SIZE(BO)
kusano 2b45e8
	FMADD	f11, A5, B3, f11
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f15, A5, B4, f15
kusano 2b45e8
	nop
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  A6, B7, f0
kusano 2b45e8
	LFD	A3, 14 * SIZE(AO)
kusano 2b45e8
	FMADD	f4,  A6, B8, f4
kusano 2b45e8
	LFD	A5, 24 * SIZE(AO)
kusano 2b45e8
	FMADD	f8,  A6, B9, f8
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f12, A6, B10, f12
kusano 2b45e8
	nop
kusano 2b45e8
kusano 2b45e8
	FMADD	f1,  A2, B7, f1
kusano 2b45e8
	LFD	A6, 15 * SIZE(AO)
kusano 2b45e8
	FMADD	f5,  A2, B8, f5
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f9,  A2, B9, f9
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f13, A2, B10, f13
kusano 2b45e8
	nop
kusano 2b45e8
kusano 2b45e8
	FMADD	f2,  A3, B7, f2
kusano 2b45e8
	addi	AO, AO, 16 * SIZE
kusano 2b45e8
	FMADD	f6,  A3, B8, f6
kusano 2b45e8
	LFD	B2, 17 * SIZE(BO)
kusano 2b45e8
	FMADD	f10, A3, B9, f10
kusano 2b45e8
	LFD	B3, 18 * SIZE(BO)
kusano 2b45e8
	FMADD	f14, A3, B10, f14
kusano 2b45e8
	LFD	B4, 19 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f3,  A6, B7, f3
kusano 2b45e8
	LFD	A2,  1 * SIZE(AO)
kusano 2b45e8
	FMADD	f7,  A6, B8, f7
kusano 2b45e8
	LFD	B7, 28 * SIZE(BO)
kusano 2b45e8
	FMADD	f11, A6, B9, f11
kusano 2b45e8
	addi	BO, BO, 16 * SIZE
kusano 2b45e8
	FMADD	f15, A6, B10, f15
kusano 2b45e8
	bdnz	.L12
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L15:
kusano 2b45e8
	lfd	f30,  ALPHA
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL)
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#elif defined(LEFT)
kusano 2b45e8
	addi	TEMP, KK, 4
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, KK, 4
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	andi.	TEMP,  TEMP,  3
kusano 2b45e8
	mtspr	CTR, TEMP
kusano 2b45e8
#else
kusano 2b45e8
kusano 2b45e8
	andi.	r0,  K,  3
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
kusano 2b45e8
#endif
kusano 2b45e8
	ble+	.L18
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L16:
kusano 2b45e8
	FMADD	f0,  A1, B1, f0
kusano 2b45e8
	LFD	A3,  2 * SIZE(AO)
kusano 2b45e8
	FMADD	f4,  A1, B2, f4
kusano 2b45e8
	FMADD	f8,  A1, B3, f8
kusano 2b45e8
	FMADD	f12, A1, B4, f12
kusano 2b45e8
	LFD	A4,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f1,  A2, B1, f1
kusano 2b45e8
	FMADD	f5,  A2, B2, f5
kusano 2b45e8
	FMADD	f9,  A2, B3, f9
kusano 2b45e8
	FMADD	f13, A2, B4, f13
kusano 2b45e8
	LFDU	A1,  4 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f2,  A3, B1, f2
kusano 2b45e8
	FMADD	f6,  A3, B2, f6
kusano 2b45e8
	FMADD	f10, A3, B3, f10
kusano 2b45e8
	FMADD	f14, A3, B4, f14
kusano 2b45e8
	LFD	A2,  1 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f3,  A4, B1, f3
kusano 2b45e8
	LFDU	B1,  4 * SIZE(BO)
kusano 2b45e8
	FMADD	f7,  A4, B2, f7
kusano 2b45e8
	LFD	B2,  1 * SIZE(BO)
kusano 2b45e8
	FMADD	f11, A4, B3, f11
kusano 2b45e8
	LFD	B3,  2 * SIZE(BO)
kusano 2b45e8
	FMADD	f15, A4, B4, f15
kusano 2b45e8
	LFD	B4,  3 * SIZE(BO)
kusano 2b45e8
	bdnz	.L16
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L18:
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	LFD	f16, 0 * SIZE(CO1)
kusano 2b45e8
	LFD	f17, 1 * SIZE(CO1)
kusano 2b45e8
	LFD	f18, 2 * SIZE(CO1)
kusano 2b45e8
	LFD	f19, 3 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
	LFD	f20, 0 * SIZE(CO2)
kusano 2b45e8
	LFD	f21, 1 * SIZE(CO2)
kusano 2b45e8
	LFD	f22, 2 * SIZE(CO2)
kusano 2b45e8
	LFD	f23, 3 * SIZE(CO2)
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f0, f30, f16
kusano 2b45e8
	LFD	f16, 0 * SIZE(CO3)
kusano 2b45e8
	FMADD	f1,  f1, f30, f17
kusano 2b45e8
	LFD	f17, 1 * SIZE(CO3)
kusano 2b45e8
	FMADD	f2,  f2, f30, f18
kusano 2b45e8
	LFD	f18, 2 * SIZE(CO3)
kusano 2b45e8
	FMADD	f3,  f3, f30, f19
kusano 2b45e8
	LFD	f19, 3 * SIZE(CO3)
kusano 2b45e8
kusano 2b45e8
	FMADD	f4,  f4, f30, f20
kusano 2b45e8
	LFD	f20, 0 * SIZE(CO4)
kusano 2b45e8
	FMADD	f5,  f5, f30, f21
kusano 2b45e8
	LFD	f21, 1 * SIZE(CO4)
kusano 2b45e8
	FMADD	f6,  f6, f30, f22
kusano 2b45e8
	LFD	f22, 2 * SIZE(CO4)
kusano 2b45e8
	FMADD	f7,  f7, f30, f23
kusano 2b45e8
	LFD	f23, 3 * SIZE(CO4)
kusano 2b45e8
kusano 2b45e8
	FMADD	f8,  f8,  f30, f16
kusano 2b45e8
	FMADD	f9,  f9,  f30, f17
kusano 2b45e8
	FMADD	f10, f10, f30, f18
kusano 2b45e8
	FMADD	f11, f11, f30, f19
kusano 2b45e8
kusano 2b45e8
	FMADD	f12, f12, f30, f20
kusano 2b45e8
	FMADD	f13, f13, f30, f21
kusano 2b45e8
	FMADD	f14, f14, f30, f22
kusano 2b45e8
	FMADD	f15, f15, f30, f23
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
kusano 2b45e8
	FMUL	f0,  f0, f30
kusano 2b45e8
	FMUL	f1,  f1, f30
kusano 2b45e8
	FMUL	f2,  f2, f30
kusano 2b45e8
	FMUL	f3,  f3, f30
kusano 2b45e8
kusano 2b45e8
	FMUL	f4,  f4, f30
kusano 2b45e8
	FMUL	f5,  f5, f30
kusano 2b45e8
	FMUL	f6,  f6, f30
kusano 2b45e8
	FMUL	f7,  f7, f30
kusano 2b45e8
kusano 2b45e8
	FMUL	f8,  f8,  f30
kusano 2b45e8
	FMUL	f9,  f9,  f30
kusano 2b45e8
	FMUL	f10, f10, f30
kusano 2b45e8
	FMUL	f11, f11, f30
kusano 2b45e8
kusano 2b45e8
	FMUL	f12, f12, f30
kusano 2b45e8
	FMUL	f13, f13, f30
kusano 2b45e8
	FMUL	f14, f14, f30
kusano 2b45e8
	FMUL	f15, f15, f30
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	STFD	f0,  0 * SIZE(CO1)
kusano 2b45e8
	STFD	f1,  1 * SIZE(CO1)
kusano 2b45e8
	STFD	f2,  2 * SIZE(CO1)
kusano 2b45e8
	STFD	f3,  3 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
	lfs	f0,  FZERO
kusano 2b45e8
 	fmr	f1,  f0
kusano 2b45e8
	fmr	f2,  f0
kusano 2b45e8
	fmr	f3,  f0
kusano 2b45e8
kusano 2b45e8
	STFD	f4,  0 * SIZE(CO2)
kusano 2b45e8
	fmr	f4,  f0
kusano 2b45e8
	STFD	f5,  1 * SIZE(CO2)
kusano 2b45e8
	fmr	f5,  f0
kusano 2b45e8
	STFD	f6,  2 * SIZE(CO2)
kusano 2b45e8
	fmr	f6,  f0
kusano 2b45e8
	STFD	f7,  3 * SIZE(CO2)
kusano 2b45e8
	fmr	f7,  f0
kusano 2b45e8
kusano 2b45e8
	STFD	f8,  0 * SIZE(CO3)
kusano 2b45e8
	fmr	f8,  f0
kusano 2b45e8
	STFD	f9,  1 * SIZE(CO3)
kusano 2b45e8
	fmr	f9,  f0
kusano 2b45e8
	STFD	f10, 2 * SIZE(CO3)
kusano 2b45e8
	fmr	f10, f0
kusano 2b45e8
	STFD	f11, 3 * SIZE(CO3)
kusano 2b45e8
	fmr	f11, f0
kusano 2b45e8
kusano 2b45e8
	STFD	f12, 0 * SIZE(CO4)
kusano 2b45e8
	fmr	f12, f0
kusano 2b45e8
	STFD	f13, 1 * SIZE(CO4)
kusano 2b45e8
	fmr	f13, f0
kusano 2b45e8
	STFD	f14, 2 * SIZE(CO4)
kusano 2b45e8
	fmr	f14, f0
kusano 2b45e8
	STFD	f15, 3 * SIZE(CO4)
kusano 2b45e8
	fmr	f15, f0
kusano 2b45e8
kusano 2b45e8
	addi	CO1, CO1, 4 * SIZE
kusano 2b45e8
	addi	CO2, CO2, 4 * SIZE
kusano 2b45e8
	addi	CO3, CO3, 4 * SIZE
kusano 2b45e8
	addi	CO4, CO4, 4 * SIZE
kusano 2b45e8
	
kusano 2b45e8
#ifdef TRMMKERNEL
kusano 2b45e8
#if ( defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
    (!defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addi	TEMP, TEMP, -4
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, TEMP, -4
kusano 2b45e8
#endif
kusano 2b45e8
	slwi	TEMP, TEMP, 2 + BASE_SHIFT
kusano 2b45e8
	add	AO, AO, TEMP
kusano 2b45e8
	add	BO, BO, TEMP
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addi	KK, KK, 4
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	addic.	I, I, -1
kusano 2b45e8
	bgt+	.L11
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L20:
kusano 2b45e8
	andi.	I,  M,  2
kusano 2b45e8
	ble	.L30
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL)
kusano 2b45e8
#if ( defined(LEFT) &&  defined(TRANSA)) || (!defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(B)
kusano 2b45e8
	LFD	f21,  1 * SIZE(B)
kusano 2b45e8
	LFD	f22,  2 * SIZE(B)
kusano 2b45e8
	LFD	f23,  3 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	LFD	f24,  4 * SIZE(B)
kusano 2b45e8
	LFD	f25,  5 * SIZE(B)
kusano 2b45e8
	LFD	f26,  6 * SIZE(B)
kusano 2b45e8
	LFD	f27,  7 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	mr	BO,  B
kusano 2b45e8
#else
kusano 2b45e8
	slwi	r0,   KK, 1 + BASE_SHIFT
kusano 2b45e8
	slwi	TEMP, KK, 2 + BASE_SHIFT
kusano 2b45e8
	add	AO, AO, r0
kusano 2b45e8
	add	BO, B,  TEMP
kusano 2b45e8
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(BO)
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
	LFD	f22,  2 * SIZE(BO)
kusano 2b45e8
	LFD	f23,  3 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	LFD	f24,  4 * SIZE(BO)
kusano 2b45e8
	LFD	f25,  5 * SIZE(BO)
kusano 2b45e8
	LFD	f26,  6 * SIZE(BO)
kusano 2b45e8
	LFD	f27,  7 * SIZE(BO)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#elif defined(LEFT)
kusano 2b45e8
	addi	TEMP, KK, 2
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, KK, 4
kusano 2b45e8
#endif
kusano 2b45e8
	srawi.	TEMP,  TEMP,  2
kusano 2b45e8
	mtspr	CTR, TEMP
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(B)
kusano 2b45e8
	LFD	f21,  1 * SIZE(B)
kusano 2b45e8
	LFD	f22,  2 * SIZE(B)
kusano 2b45e8
	LFD	f23,  3 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	LFD	f24,  4 * SIZE(B)
kusano 2b45e8
	LFD	f25,  5 * SIZE(B)
kusano 2b45e8
	LFD	f26,  6 * SIZE(B)
kusano 2b45e8
	LFD	f27,  7 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	srawi.	r0,  K,  2
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
	mr	BO,  B
kusano 2b45e8
#endif
kusano 2b45e8
	ble	.L25
kusano 2b45e8
	.align 5
kusano 2b45e8
kusano 2b45e8
.L22:
kusano 2b45e8
	FMADD	f0,  f16, f20, f0
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f1,  f17, f20, f1
kusano 2b45e8
	LFD	f20,  8 * SIZE(BO)
kusano 2b45e8
	FMADD	f4,  f16, f21, f4
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f5,  f17, f21, f5
kusano 2b45e8
	LFD	f21,  9 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f8,  f16, f22, f8
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f9,  f17, f22, f9
kusano 2b45e8
	LFD	f22, 10 * SIZE(BO)
kusano 2b45e8
	FMADD	f12, f16, f23, f12
kusano 2b45e8
	LFD	f16,  4 * SIZE(AO)
kusano 2b45e8
	FMADD	f13, f17, f23, f13
kusano 2b45e8
	LFD	f23, 11 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f2,  f18, f24, f2
kusano 2b45e8
	LFD	f17,  5 * SIZE(AO)
kusano 2b45e8
	FMADD	f3,  f19, f24, f3
kusano 2b45e8
	LFD	f24, 12 * SIZE(BO)
kusano 2b45e8
	FMADD	f6,  f18, f25, f6
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f7,  f19, f25, f7
kusano 2b45e8
	LFD	f25, 13 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f10, f18, f26, f10
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f11, f19, f26, f11
kusano 2b45e8
	LFD	f26, 14 * SIZE(BO)
kusano 2b45e8
	FMADD	f14, f18, f27, f14
kusano 2b45e8
	LFD	f18,  6 * SIZE(AO)
kusano 2b45e8
	FMADD	f15, f19, f27, f15
kusano 2b45e8
	LFD	f27, 15 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f16, f20, f0
kusano 2b45e8
	LFD	f19,  7 * SIZE(AO)
kusano 2b45e8
	FMADD	f1,  f17, f20, f1
kusano 2b45e8
	LFDU	f20, 16 * SIZE(BO)
kusano 2b45e8
	FMADD	f4,  f16, f21, f4
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f5,  f17, f21, f5
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f8,  f16, f22, f8
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f9,  f17, f22, f9
kusano 2b45e8
	LFD	f22,  2 * SIZE(BO)
kusano 2b45e8
	FMADD	f12, f16, f23, f12
kusano 2b45e8
	LFDU	f16,  8 * SIZE(AO)
kusano 2b45e8
	FMADD	f13, f17, f23, f13
kusano 2b45e8
	LFD	f23,  3 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f2,  f18, f24, f2
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	FMADD	f3,  f19, f24, f3
kusano 2b45e8
	LFD	f24,  4 * SIZE(BO)
kusano 2b45e8
	FMADD	f6,  f18, f25, f6
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f7,  f19, f25, f7
kusano 2b45e8
	LFD	f25,  5 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f10, f18, f26, f10
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f11, f19, f26, f11
kusano 2b45e8
	LFD	f26,  6 * SIZE(BO)
kusano 2b45e8
	FMADD	f14, f18, f27, f14
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	FMADD	f15, f19, f27, f15
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
	LFD	f27,  7 * SIZE(BO)
kusano 2b45e8
	bdnz	.L22
kusano 2b45e8
kusano 2b45e8
	fadd	f0,  f2,  f0
kusano 2b45e8
	fadd	f1,  f3,  f1
kusano 2b45e8
	fadd	f4,  f6,  f4
kusano 2b45e8
	fadd	f5,  f7,  f5
kusano 2b45e8
	fadd	f8,  f10, f8
kusano 2b45e8
	fadd	f9,  f11, f9
kusano 2b45e8
	fadd	f12, f14, f12
kusano 2b45e8
	fadd	f13, f15, f13
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L25:
kusano 2b45e8
	lfd	f30,  ALPHA
kusano 2b45e8
kusano 2b45e8
#if   defined(TRMMKERNEL)
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#elif defined(LEFT)
kusano 2b45e8
	addi	TEMP, KK, 2
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, KK, 4
kusano 2b45e8
#endif
kusano 2b45e8
	andi.	TEMP,  TEMP,  3
kusano 2b45e8
	mtspr	CTR, TEMP
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
kusano 2b45e8
	andi.	r0,  K,  3
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
kusano 2b45e8
#endif
kusano 2b45e8
	ble+	.L28
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L26:
kusano 2b45e8
	FMADD	f0,  f16, f20, f0
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f1,  f17, f20, f1
kusano 2b45e8
	LFDU	f20,  4 * SIZE(BO)
kusano 2b45e8
	FMADD	f4,  f16, f21, f4
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f5,  f17, f21, f5
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f8,  f16, f22, f8
kusano 2b45e8
	nop
kusano 2b45e8
	FMADD	f9,  f17, f22, f9
kusano 2b45e8
	LFD	f22,  2 * SIZE(BO)
kusano 2b45e8
	FMADD	f12, f16, f23, f12
kusano 2b45e8
	LFDU	f16,  2 * SIZE(AO)
kusano 2b45e8
	FMADD	f13, f17, f23, f13
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f23,  3 * SIZE(BO)
kusano 2b45e8
	bdnz	.L26
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L28:
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	LFD	f16, 0 * SIZE(CO1)
kusano 2b45e8
	LFD	f17, 1 * SIZE(CO1)
kusano 2b45e8
	LFD	f18, 0 * SIZE(CO2)
kusano 2b45e8
	LFD	f19, 1 * SIZE(CO2)
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f0, f30, f16
kusano 2b45e8
	FMADD	f1,  f1, f30, f17
kusano 2b45e8
	FMADD	f4,  f4, f30, f18
kusano 2b45e8
	FMADD	f5,  f5, f30, f19
kusano 2b45e8
kusano 2b45e8
	LFD	f20, 0 * SIZE(CO3)
kusano 2b45e8
	LFD	f21, 1 * SIZE(CO3)
kusano 2b45e8
	LFD	f22, 0 * SIZE(CO4)
kusano 2b45e8
	LFD	f23, 1 * SIZE(CO4)
kusano 2b45e8
kusano 2b45e8
	FMADD	f8,  f8,  f30, f20
kusano 2b45e8
	FMADD	f9,  f9,  f30, f21
kusano 2b45e8
	FMADD	f12, f12, f30, f22
kusano 2b45e8
	FMADD	f13, f13, f30, f23
kusano 2b45e8
#else
kusano 2b45e8
	FMUL	f0,  f0, f30
kusano 2b45e8
	FMUL	f1,  f1, f30
kusano 2b45e8
	FMUL	f4,  f4, f30
kusano 2b45e8
	FMUL	f5,  f5, f30
kusano 2b45e8
kusano 2b45e8
	FMUL	f8,  f8,  f30
kusano 2b45e8
	FMUL	f9,  f9,  f30
kusano 2b45e8
	FMUL	f12, f12, f30
kusano 2b45e8
	FMUL	f13, f13, f30
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	STFD	f0,  0 * SIZE(CO1)
kusano 2b45e8
	STFD	f1,  1 * SIZE(CO1)
kusano 2b45e8
	STFD	f4,  0 * SIZE(CO2)
kusano 2b45e8
	STFD	f5,  1 * SIZE(CO2)
kusano 2b45e8
kusano 2b45e8
	lfs	f0,  FZERO
kusano 2b45e8
 	fmr	f1,  f0
kusano 2b45e8
	fmr	f2,  f0
kusano 2b45e8
	fmr	f3,  f0
kusano 2b45e8
kusano 2b45e8
	STFD	f8,  0 * SIZE(CO3)
kusano 2b45e8
	STFD	f9,  1 * SIZE(CO3)
kusano 2b45e8
	STFD	f12, 0 * SIZE(CO4)
kusano 2b45e8
	STFD	f13, 1 * SIZE(CO4)
kusano 2b45e8
kusano 2b45e8
	fmr	f4,  f0
kusano 2b45e8
	fmr	f5,  f0
kusano 2b45e8
	fmr	f6,  f0
kusano 2b45e8
	fmr	f7,  f0
kusano 2b45e8
kusano 2b45e8
	fmr	f8,  f0
kusano 2b45e8
	fmr	f9,  f0
kusano 2b45e8
	fmr	f10, f0
kusano 2b45e8
	fmr	f11, f0
kusano 2b45e8
kusano 2b45e8
	fmr	f12, f0
kusano 2b45e8
	fmr	f13, f0
kusano 2b45e8
	fmr	f14, f0
kusano 2b45e8
	fmr	f15, f0
kusano 2b45e8
kusano 2b45e8
	addi	CO1, CO1, 2 * SIZE
kusano 2b45e8
	addi	CO2, CO2, 2 * SIZE
kusano 2b45e8
	addi	CO3, CO3, 2 * SIZE
kusano 2b45e8
	addi	CO4, CO4, 2 * SIZE
kusano 2b45e8
kusano 2b45e8
#ifdef TRMMKERNEL
kusano 2b45e8
#if ( defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
    (!defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addi	TEMP, TEMP, -2
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, TEMP, -4
kusano 2b45e8
#endif
kusano 2b45e8
	slwi	r0,   TEMP, 1 + BASE_SHIFT
kusano 2b45e8
	slwi	TEMP, TEMP, 2 + BASE_SHIFT
kusano 2b45e8
	add	AO, AO, r0
kusano 2b45e8
	add	BO, BO, TEMP
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addi	KK, KK, 2
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L30:
kusano 2b45e8
	andi.	I,  M,  1
kusano 2b45e8
	ble	.L39
kusano 2b45e8
kusano 2b45e8
#if   defined(TRMMKERNEL)
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) && defined(TRANSA)) || (!defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(B)
kusano 2b45e8
	LFD	f21,  1 * SIZE(B)
kusano 2b45e8
	LFD	f22,  2 * SIZE(B)
kusano 2b45e8
	LFD	f23,  3 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	LFD	f24,  4 * SIZE(B)
kusano 2b45e8
	LFD	f25,  5 * SIZE(B)
kusano 2b45e8
	LFD	f26,  6 * SIZE(B)
kusano 2b45e8
	LFD	f27,  7 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	mr	BO,  B
kusano 2b45e8
#else
kusano 2b45e8
	slwi	r0,   KK, 0 + BASE_SHIFT
kusano 2b45e8
	slwi	TEMP, KK, 2 + BASE_SHIFT
kusano 2b45e8
	add	AO, AO, r0
kusano 2b45e8
	add	BO, B,  TEMP
kusano 2b45e8
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(BO)
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
	LFD	f22,  2 * SIZE(BO)
kusano 2b45e8
	LFD	f23,  3 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	LFD	f24,  4 * SIZE(BO)
kusano 2b45e8
	LFD	f25,  5 * SIZE(BO)
kusano 2b45e8
	LFD	f26,  6 * SIZE(BO)
kusano 2b45e8
	LFD	f27,  7 * SIZE(BO)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#elif defined(LEFT)
kusano 2b45e8
	addi	TEMP, KK, 1
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, KK, 4
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	srawi.	TEMP,  TEMP,  2
kusano 2b45e8
	mtspr	CTR, TEMP
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(B)
kusano 2b45e8
	LFD	f21,  1 * SIZE(B)
kusano 2b45e8
	LFD	f22,  2 * SIZE(B)
kusano 2b45e8
	LFD	f23,  3 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	LFD	f24,  4 * SIZE(B)
kusano 2b45e8
	LFD	f25,  5 * SIZE(B)
kusano 2b45e8
	LFD	f26,  6 * SIZE(B)
kusano 2b45e8
	LFD	f27,  7 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	srawi.	r0,  K,  2
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
	mr	BO,  B
kusano 2b45e8
#endif
kusano 2b45e8
	ble	.L35
kusano 2b45e8
	.align 5
kusano 2b45e8
kusano 2b45e8
.L32:
kusano 2b45e8
	FMADD	f0,  f16, f20, f0
kusano 2b45e8
	LFD	f20,  8 * SIZE(BO)
kusano 2b45e8
	FMADD	f4,  f16, f21, f4
kusano 2b45e8
	LFD	f21,  9 * SIZE(BO)
kusano 2b45e8
	FMADD	f8,  f16, f22, f8
kusano 2b45e8
	LFD	f22, 10 * SIZE(BO)
kusano 2b45e8
	FMADD	f12, f16, f23, f12
kusano 2b45e8
	LFD	f23, 11 * SIZE(BO)
kusano 2b45e8
	LFDU	f16,  4 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f1,  f17, f24, f1
kusano 2b45e8
	LFD	f24, 12 * SIZE(BO)
kusano 2b45e8
	FMADD	f5,  f17, f25, f5
kusano 2b45e8
	LFD	f25, 13 * SIZE(BO)
kusano 2b45e8
	FMADD	f9,  f17, f26, f9
kusano 2b45e8
	LFD	f26, 14 * SIZE(BO)
kusano 2b45e8
	FMADD	f13, f17, f27, f13
kusano 2b45e8
	LFD	f27, 15 * SIZE(BO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f18, f20, f0
kusano 2b45e8
	LFDU	f20, 16 * SIZE(BO)
kusano 2b45e8
	FMADD	f4,  f18, f21, f4
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
	FMADD	f8,  f18, f22, f8
kusano 2b45e8
	LFD	f22,  2 * SIZE(BO)
kusano 2b45e8
	FMADD	f12, f18, f23, f12
kusano 2b45e8
	LFD	f23,  3 * SIZE(BO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f1,  f19, f24, f1
kusano 2b45e8
	LFD	f24,  4 * SIZE(BO)
kusano 2b45e8
	FMADD	f5,  f19, f25, f5
kusano 2b45e8
	LFD	f25,  5 * SIZE(BO)
kusano 2b45e8
	FMADD	f9,  f19, f26, f9
kusano 2b45e8
	LFD	f26,  6 * SIZE(BO)
kusano 2b45e8
	FMADD	f13, f19, f27, f13
kusano 2b45e8
	LFD	f27,  7 * SIZE(BO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
	bdnz	.L32
kusano 2b45e8
kusano 2b45e8
	fadd	f0,  f1,   f0
kusano 2b45e8
	fadd	f4,  f5,   f4
kusano 2b45e8
	fadd	f8,  f9,   f8
kusano 2b45e8
	fadd	f12, f13, f12
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L35:
kusano 2b45e8
	lfd	f30,  ALPHA
kusano 2b45e8
#if  defined(TRMMKERNEL)
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#elif defined(LEFT)
kusano 2b45e8
	addi	TEMP, KK, 1
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, KK, 4
kusano 2b45e8
#endif
kusano 2b45e8
	andi.	TEMP,  TEMP,  3
kusano 2b45e8
	mtspr	CTR, TEMP
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
	andi.	r0,  K,  3
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
kusano 2b45e8
#endif
kusano 2b45e8
	ble+	.L38
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L36:
kusano 2b45e8
	FMADD	f0,  f16, f20, f0
kusano 2b45e8
	LFDU	f20,  4 * SIZE(BO)
kusano 2b45e8
	FMADD	f4,  f16, f21, f4
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
	FMADD	f8,  f16, f22, f8
kusano 2b45e8
	LFD	f22,  2 * SIZE(BO)
kusano 2b45e8
	FMADD	f12, f16, f23, f12
kusano 2b45e8
	LFDU	f16,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f23,  3 * SIZE(BO)
kusano 2b45e8
	bdnz	.L36
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L38:
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	LFD	f16, 0 * SIZE(CO1)
kusano 2b45e8
	LFD	f18, 0 * SIZE(CO2)
kusano 2b45e8
	LFD	f20, 0 * SIZE(CO3)
kusano 2b45e8
	LFD	f22, 0 * SIZE(CO4)
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f0,  f30, f16
kusano 2b45e8
	FMADD	f4,  f4,  f30, f18
kusano 2b45e8
	FMADD	f8,  f8,  f30, f20
kusano 2b45e8
	FMADD	f12, f12, f30, f22
kusano 2b45e8
#else
kusano 2b45e8
	FMUL	f0,  f0,  f30
kusano 2b45e8
	FMUL	f4,  f4,  f30
kusano 2b45e8
	FMUL	f8,  f8,  f30
kusano 2b45e8
	FMUL	f12, f12, f30
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	STFD	f0,  0 * SIZE(CO1)
kusano 2b45e8
	STFD	f4,  0 * SIZE(CO2)
kusano 2b45e8
	STFD	f8,  0 * SIZE(CO3)
kusano 2b45e8
	STFD	f12, 0 * SIZE(CO4)
kusano 2b45e8
kusano 2b45e8
	lfs	f0,  FZERO
kusano 2b45e8
 	fmr	f1,  f0
kusano 2b45e8
	fmr	f4,  f0
kusano 2b45e8
	fmr	f5,  f0
kusano 2b45e8
kusano 2b45e8
	fmr	f8,  f0
kusano 2b45e8
	fmr	f9,  f0
kusano 2b45e8
	fmr	f12, f0
kusano 2b45e8
	fmr	f13, f0
kusano 2b45e8
kusano 2b45e8
#ifdef TRMMKERNEL
kusano 2b45e8
#if ( defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
    (!defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addi	TEMP, TEMP, -1
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, TEMP, -4
kusano 2b45e8
#endif
kusano 2b45e8
	slwi	r0,   TEMP, 0 + BASE_SHIFT
kusano 2b45e8
	slwi	TEMP, TEMP, 2 + BASE_SHIFT
kusano 2b45e8
	add	AO, AO, r0
kusano 2b45e8
	add	BO, BO, TEMP
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addi	KK, KK, 2
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
kusano 2b45e8
.L39:
kusano 2b45e8
#if defined(TRMMKERNEL) && !defined(LEFT)
kusano 2b45e8
	addi	KK, KK, 4
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	mr	B,  BO
kusano 2b45e8
	addic.	J, J, -1
kusano 2b45e8
	bgt	.L10
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L40:
kusano 2b45e8
	mr	CO1, C
kusano 2b45e8
	add	CO2, C,  LDC
kusano 2b45e8
	andi.	J, N,  2
kusano 2b45e8
	ble	.L70
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL) && defined(LEFT)
kusano 2b45e8
	mr	KK, OFFSET
kusano 2b45e8
#endif
kusano 2b45e8
	lfs	f0,  FZERO
kusano 2b45e8
 	fmr	f1,  f0
kusano 2b45e8
	fmr	f2,  f0
kusano 2b45e8
	fmr	f3,  f0
kusano 2b45e8
	fmr	f4,  f0
kusano 2b45e8
	fmr	f5,  f0
kusano 2b45e8
	fmr	f6,  f0
kusano 2b45e8
	fmr	f7,  f0
kusano 2b45e8
	
kusano 2b45e8
	srawi.	I, M,  2
kusano 2b45e8
	add	C,  CO2, LDC
kusano 2b45e8
	mr	AO, A
kusano 2b45e8
	ble	.L50
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L41:
kusano 2b45e8
#if defined(TRMMKERNEL)
kusano 2b45e8
#if (defined(LEFT) &&  defined(TRANSA)) || (!defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(B)
kusano 2b45e8
	LFD	f21,  1 * SIZE(B)
kusano 2b45e8
	LFD	f22,  2 * SIZE(B)
kusano 2b45e8
	LFD	f23,  3 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	mr	BO,  B
kusano 2b45e8
#else
kusano 2b45e8
	slwi	r0,   KK, 2 + BASE_SHIFT
kusano 2b45e8
	slwi	TEMP, KK, 1 + BASE_SHIFT
kusano 2b45e8
	add	AO, AO, r0
kusano 2b45e8
	add	BO, B,  TEMP
kusano 2b45e8
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(BO)
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
	LFD	f22,  2 * SIZE(BO)
kusano 2b45e8
	LFD	f23,  3 * SIZE(BO)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#elif defined(LEFT)
kusano 2b45e8
	addi	TEMP, KK, 4
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, KK, 2
kusano 2b45e8
#endif
kusano 2b45e8
	srawi.	TEMP,  TEMP,  2
kusano 2b45e8
	mtspr	CTR, TEMP
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(B)
kusano 2b45e8
	LFD	f21,  1 * SIZE(B)
kusano 2b45e8
	LFD	f22,  2 * SIZE(B)
kusano 2b45e8
	LFD	f23,  3 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	srawi.	r0,  K,  2
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
	mr	BO,  B
kusano 2b45e8
#endif
kusano 2b45e8
	ble	.L45
kusano 2b45e8
	.align 5
kusano 2b45e8
kusano 2b45e8
.L42:
kusano 2b45e8
	FMADD	f0,  f16, f20, f0
kusano 2b45e8
	FMADD	f1,  f17, f20, f1
kusano 2b45e8
	FMADD	f2,  f18, f20, f2
kusano 2b45e8
	FMADD	f3,  f19, f20, f3
kusano 2b45e8
	LFD	f20,  4 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f4,  f16, f21, f4
kusano 2b45e8
	LFD	f16,  4 * SIZE(AO)
kusano 2b45e8
	FMADD	f5,  f17, f21, f5
kusano 2b45e8
	LFD	f17,  5 * SIZE(AO)
kusano 2b45e8
	FMADD	f6,  f18, f21, f6
kusano 2b45e8
	LFD	f18,  6 * SIZE(AO)
kusano 2b45e8
	FMADD	f7,  f19, f21, f7
kusano 2b45e8
	LFD	f19,  7 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f16, f22, f0
kusano 2b45e8
	LFD	f21,  5 * SIZE(BO)
kusano 2b45e8
	FMADD	f1,  f17, f22, f1
kusano 2b45e8
	FMADD	f2,  f18, f22, f2
kusano 2b45e8
	FMADD	f3,  f19, f22, f3
kusano 2b45e8
	LFD	f22,  6 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f4,  f16, f23, f4
kusano 2b45e8
	LFD	f16,  8 * SIZE(AO)
kusano 2b45e8
	FMADD	f5,  f17, f23, f5
kusano 2b45e8
	LFD	f17,  9 * SIZE(AO)
kusano 2b45e8
	FMADD	f6,  f18, f23, f6
kusano 2b45e8
	LFD	f18, 10 * SIZE(AO)
kusano 2b45e8
	FMADD	f7,  f19, f23, f7
kusano 2b45e8
	LFD	f19, 11 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f16, f20, f0
kusano 2b45e8
	LFD	f23,  7 * SIZE(BO)
kusano 2b45e8
	FMADD	f1,  f17, f20, f1
kusano 2b45e8
	FMADD	f2,  f18, f20, f2
kusano 2b45e8
	FMADD	f3,  f19, f20, f3
kusano 2b45e8
	LFDU	f20,  8 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f4,  f16, f21, f4
kusano 2b45e8
	LFD	f16, 12 * SIZE(AO)
kusano 2b45e8
	FMADD	f5,  f17, f21, f5
kusano 2b45e8
	LFD	f17, 13 * SIZE(AO)
kusano 2b45e8
	FMADD	f6,  f18, f21, f6
kusano 2b45e8
	LFD	f18, 14 * SIZE(AO)
kusano 2b45e8
	FMADD	f7,  f19, f21, f7
kusano 2b45e8
	LFD	f19, 15 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f16, f22, f0
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
	FMADD	f1,  f17, f22, f1
kusano 2b45e8
	FMADD	f2,  f18, f22, f2
kusano 2b45e8
	FMADD	f3,  f19, f22, f3
kusano 2b45e8
	LFD	f22,  2 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f4,  f16, f23, f4
kusano 2b45e8
	LFDU	f16, 16 * SIZE(AO)
kusano 2b45e8
	FMADD	f5,  f17, f23, f5
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	FMADD	f6,  f18, f23, f6
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	FMADD	f7,  f19, f23, f7
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f23,  3 * SIZE(BO)
kusano 2b45e8
	bdnz	.L42
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L45:
kusano 2b45e8
	lfd	f30,  ALPHA
kusano 2b45e8
#if defined(TRMMKERNEL)
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#elif defined(LEFT)
kusano 2b45e8
	addi	TEMP, KK, 4
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, KK, 2
kusano 2b45e8
#endif
kusano 2b45e8
	andi.	TEMP,  TEMP,  3
kusano 2b45e8
	mtspr	CTR, TEMP
kusano 2b45e8
#else
kusano 2b45e8
	andi.	r0,  K,  3
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
#endif
kusano 2b45e8
	ble+	.L48
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L46:
kusano 2b45e8
	FMADD	f0,  f16, f20, f0
kusano 2b45e8
	FMADD	f1,  f17, f20, f1
kusano 2b45e8
	FMADD	f2,  f18, f20, f2
kusano 2b45e8
	FMADD	f3,  f19, f20, f3
kusano 2b45e8
	LFDU	f20,  2 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f4,  f16, f21, f4
kusano 2b45e8
	LFDU	f16,  4 * SIZE(AO)
kusano 2b45e8
	FMADD	f5,  f17, f21, f5
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	FMADD	f6,  f18, f21, f6
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	FMADD	f7,  f19, f21, f7
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
	bdnz	.L46
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L48:
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	LFD	f16, 0 * SIZE(CO1)
kusano 2b45e8
	LFD	f17, 1 * SIZE(CO1)
kusano 2b45e8
	LFD	f18, 2 * SIZE(CO1)
kusano 2b45e8
	LFD	f19, 3 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
	LFD	f20, 0 * SIZE(CO2)
kusano 2b45e8
	LFD	f21, 1 * SIZE(CO2)
kusano 2b45e8
	LFD	f22, 2 * SIZE(CO2)
kusano 2b45e8
	LFD	f23, 3 * SIZE(CO2)
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f0, f30, f16
kusano 2b45e8
	FMADD	f1,  f1, f30, f17
kusano 2b45e8
	FMADD	f2,  f2, f30, f18
kusano 2b45e8
	FMADD	f3,  f3, f30, f19
kusano 2b45e8
kusano 2b45e8
	FMADD	f4,  f4, f30, f20
kusano 2b45e8
	FMADD	f5,  f5, f30, f21
kusano 2b45e8
	FMADD	f6,  f6, f30, f22
kusano 2b45e8
	FMADD	f7,  f7, f30, f23
kusano 2b45e8
#else
kusano 2b45e8
	FMUL	f0,  f0, f30
kusano 2b45e8
	FMUL	f1,  f1, f30
kusano 2b45e8
	FMUL	f2,  f2, f30
kusano 2b45e8
	FMUL	f3,  f3, f30
kusano 2b45e8
kusano 2b45e8
	FMUL	f4,  f4, f30
kusano 2b45e8
	FMUL	f5,  f5, f30
kusano 2b45e8
	FMUL	f6,  f6, f30
kusano 2b45e8
	FMUL	f7,  f7, f30
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	STFD	f0,  0 * SIZE(CO1)
kusano 2b45e8
	STFD	f1,  1 * SIZE(CO1)
kusano 2b45e8
	STFD	f2,  2 * SIZE(CO1)
kusano 2b45e8
	STFD	f3,  3 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
	lfs	f0,  FZERO
kusano 2b45e8
 	fmr	f1,  f0
kusano 2b45e8
	fmr	f2,  f0
kusano 2b45e8
	fmr	f3,  f0
kusano 2b45e8
kusano 2b45e8
	STFD	f4,  0 * SIZE(CO2)
kusano 2b45e8
	STFD	f5,  1 * SIZE(CO2)
kusano 2b45e8
	STFD	f6,  2 * SIZE(CO2)
kusano 2b45e8
	STFD	f7,  3 * SIZE(CO2)
kusano 2b45e8
kusano 2b45e8
	fmr	f4,  f0
kusano 2b45e8
	fmr	f5,  f0
kusano 2b45e8
	fmr	f6,  f0
kusano 2b45e8
	fmr	f7,  f0
kusano 2b45e8
kusano 2b45e8
	addi	CO1, CO1, 4 * SIZE
kusano 2b45e8
	addi	CO2, CO2, 4 * SIZE
kusano 2b45e8
kusano 2b45e8
#ifdef TRMMKERNEL
kusano 2b45e8
#if ( defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
    (!defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addi	TEMP, TEMP, -4
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, TEMP, -2
kusano 2b45e8
#endif
kusano 2b45e8
	slwi	r0,   TEMP, 2 + BASE_SHIFT
kusano 2b45e8
	slwi	TEMP, TEMP, 1 + BASE_SHIFT
kusano 2b45e8
	add	AO, AO, r0
kusano 2b45e8
	add	BO, BO, TEMP
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addi	KK, KK, 4
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	addic.	I, I, -1
kusano 2b45e8
	bgt+	.L41
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L50:
kusano 2b45e8
	andi.	I,  M,  2
kusano 2b45e8
	ble	.L60
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL)
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) &&  defined(TRANSA)) || (!defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(B)
kusano 2b45e8
	LFD	f21,  1 * SIZE(B)
kusano 2b45e8
	LFD	f22,  2 * SIZE(B)
kusano 2b45e8
	LFD	f23,  3 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	LFD	f24,  4 * SIZE(B)
kusano 2b45e8
	LFD	f25,  5 * SIZE(B)
kusano 2b45e8
	LFD	f26,  6 * SIZE(B)
kusano 2b45e8
	LFD	f27,  7 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	mr	BO,  B
kusano 2b45e8
#else
kusano 2b45e8
	slwi	r0,   KK, 1 + BASE_SHIFT
kusano 2b45e8
	slwi	TEMP, KK, 1 + BASE_SHIFT
kusano 2b45e8
	add	AO, AO, r0
kusano 2b45e8
	add	BO, B,  TEMP
kusano 2b45e8
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(BO)
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
	LFD	f22,  2 * SIZE(BO)
kusano 2b45e8
	LFD	f23,  3 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	LFD	f24,  4 * SIZE(BO)
kusano 2b45e8
	LFD	f25,  5 * SIZE(BO)
kusano 2b45e8
	LFD	f26,  6 * SIZE(BO)
kusano 2b45e8
	LFD	f27,  7 * SIZE(BO)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#elif defined(LEFT)
kusano 2b45e8
	addi	TEMP, KK, 2
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, KK, 2
kusano 2b45e8
#endif
kusano 2b45e8
	srawi.	TEMP,  TEMP,  2
kusano 2b45e8
	mtspr	CTR, TEMP
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(B)
kusano 2b45e8
	LFD	f21,  1 * SIZE(B)
kusano 2b45e8
	LFD	f22,  2 * SIZE(B)
kusano 2b45e8
	LFD	f23,  3 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	LFD	f24,  4 * SIZE(B)
kusano 2b45e8
	LFD	f25,  5 * SIZE(B)
kusano 2b45e8
	LFD	f26,  6 * SIZE(B)
kusano 2b45e8
	LFD	f27,  7 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	srawi.	r0,  K,  2
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
	mr	BO,  B
kusano 2b45e8
#endif
kusano 2b45e8
	ble	.L55
kusano 2b45e8
	.align 5
kusano 2b45e8
kusano 2b45e8
.L52:
kusano 2b45e8
	FMADD	f0,  f16, f20, f0
kusano 2b45e8
	FMADD	f1,  f17, f20, f1
kusano 2b45e8
	LFDU	f20,  8 * SIZE(BO)
kusano 2b45e8
	FMADD	f2,  f16, f21, f2
kusano 2b45e8
	LFD	f16,  4 * SIZE(AO)
kusano 2b45e8
	FMADD	f3,  f17, f21, f3
kusano 2b45e8
	LFD	f17,  5 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f4,  f18, f22, f4
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
	FMADD	f5,  f19, f22, f5
kusano 2b45e8
	LFD	f22,  2 * SIZE(BO)
kusano 2b45e8
	FMADD	f6,  f18, f23, f6
kusano 2b45e8
	LFD	f18,  6 * SIZE(AO)
kusano 2b45e8
	FMADD	f7,  f19, f23, f7
kusano 2b45e8
	LFD	f19,  7 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f16, f24, f0
kusano 2b45e8
	LFD	f23,  3 * SIZE(BO)
kusano 2b45e8
	FMADD	f1,  f17, f24, f1
kusano 2b45e8
	LFD	f24,  4 * SIZE(BO)
kusano 2b45e8
	FMADD	f2,  f16, f25, f2
kusano 2b45e8
	LFDU	f16,  8 * SIZE(AO)
kusano 2b45e8
	FMADD	f3,  f17, f25, f3
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f4,  f18, f26, f4
kusano 2b45e8
	LFD	f25,  5 * SIZE(BO)
kusano 2b45e8
	FMADD	f5,  f19, f26, f5
kusano 2b45e8
	LFD	f26,  6 * SIZE(BO)
kusano 2b45e8
	FMADD	f6,  f18, f27, f6
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	FMADD	f7,  f19, f27, f7
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f27,  7 * SIZE(BO)
kusano 2b45e8
	bdnz	.L52
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L55:
kusano 2b45e8
	lfd	f30,  ALPHA
kusano 2b45e8
#if defined(TRMMKERNEL)
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#elif defined(LEFT)
kusano 2b45e8
	addi	TEMP, KK, 2
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, KK, 2
kusano 2b45e8
#endif
kusano 2b45e8
	andi.	TEMP,  TEMP,  3
kusano 2b45e8
	mtspr	CTR, TEMP
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
	andi.	r0,  K,  3
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
#endif
kusano 2b45e8
	ble+	.L58
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L56:
kusano 2b45e8
	FMADD	f0,  f16, f20, f0
kusano 2b45e8
	FMADD	f1,  f17, f20, f1
kusano 2b45e8
	LFDU	f20,  2 * SIZE(BO)
kusano 2b45e8
	FMADD	f2,  f16, f21, f2
kusano 2b45e8
	LFDU	f16,  2 * SIZE(AO)
kusano 2b45e8
	FMADD	f3,  f17, f21, f3
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
	bdnz	.L56
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L58:
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	LFD	f16, 0 * SIZE(CO1)
kusano 2b45e8
	LFD	f17, 1 * SIZE(CO1)
kusano 2b45e8
	LFD	f18, 0 * SIZE(CO2)
kusano 2b45e8
	LFD	f19, 1 * SIZE(CO2)
kusano 2b45e8
kusano 2b45e8
	FADD	f0, f4,  f0
kusano 2b45e8
	FADD	f1, f5,  f1
kusano 2b45e8
	FADD	f2, f6,  f2
kusano 2b45e8
	FADD	f3, f7,  f3
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f0, f30, f16
kusano 2b45e8
	FMADD	f1,  f1, f30, f17
kusano 2b45e8
	FMADD	f2,  f2, f30, f18
kusano 2b45e8
	FMADD	f3,  f3, f30, f19
kusano 2b45e8
#else
kusano 2b45e8
	FADD	f0, f4,  f0
kusano 2b45e8
	FADD	f1, f5,  f1
kusano 2b45e8
	FADD	f2, f6,  f2
kusano 2b45e8
	FADD	f3, f7,  f3
kusano 2b45e8
kusano 2b45e8
	FMUL	f0,  f0, f30
kusano 2b45e8
	FMUL	f1,  f1, f30
kusano 2b45e8
	FMUL	f2,  f2, f30
kusano 2b45e8
	FMUL	f3,  f3, f30
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	STFD	f0,  0 * SIZE(CO1)
kusano 2b45e8
	STFD	f1,  1 * SIZE(CO1)
kusano 2b45e8
	STFD	f2,  0 * SIZE(CO2)
kusano 2b45e8
	STFD	f3,  1 * SIZE(CO2)
kusano 2b45e8
kusano 2b45e8
	lfs	f0,  FZERO
kusano 2b45e8
 	fmr	f1,  f0
kusano 2b45e8
	fmr	f2,  f0
kusano 2b45e8
	fmr	f3,  f0
kusano 2b45e8
kusano 2b45e8
	fmr	f4,  f0
kusano 2b45e8
	fmr	f5,  f0
kusano 2b45e8
	fmr	f6,  f0
kusano 2b45e8
	fmr	f7,  f0
kusano 2b45e8
kusano 2b45e8
	addi	CO1, CO1, 2 * SIZE
kusano 2b45e8
	addi	CO2, CO2, 2 * SIZE
kusano 2b45e8
kusano 2b45e8
#ifdef TRMMKERNEL
kusano 2b45e8
#if ( defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
    (!defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addi	TEMP, TEMP, -2
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, TEMP, -2
kusano 2b45e8
#endif
kusano 2b45e8
	slwi	r0,   TEMP, 1 + BASE_SHIFT
kusano 2b45e8
	slwi	TEMP, TEMP, 1 + BASE_SHIFT
kusano 2b45e8
	add	AO, AO, r0
kusano 2b45e8
	add	BO, BO, TEMP
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addi	KK, KK, 2
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L60:
kusano 2b45e8
	andi.	I,  M,  1
kusano 2b45e8
	ble	.L69
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL)
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) &&  defined(TRANSA)) || (!defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(B)
kusano 2b45e8
	LFD	f21,  1 * SIZE(B)
kusano 2b45e8
	LFD	f22,  2 * SIZE(B)
kusano 2b45e8
	LFD	f23,  3 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	LFD	f24,  4 * SIZE(B)
kusano 2b45e8
	LFD	f25,  5 * SIZE(B)
kusano 2b45e8
	LFD	f26,  6 * SIZE(B)
kusano 2b45e8
	LFD	f27,  7 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	mr	BO,  B
kusano 2b45e8
#else
kusano 2b45e8
	slwi	r0,   KK, 0 + BASE_SHIFT
kusano 2b45e8
	slwi	TEMP, KK, 1 + BASE_SHIFT
kusano 2b45e8
	add	AO, AO, r0
kusano 2b45e8
	add	BO, B,  TEMP
kusano 2b45e8
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(BO)
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
	LFD	f22,  2 * SIZE(BO)
kusano 2b45e8
	LFD	f23,  3 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	LFD	f24,  4 * SIZE(BO)
kusano 2b45e8
	LFD	f25,  5 * SIZE(BO)
kusano 2b45e8
	LFD	f26,  6 * SIZE(BO)
kusano 2b45e8
	LFD	f27,  7 * SIZE(BO)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#elif defined(LEFT)
kusano 2b45e8
	addi	TEMP, KK, 1
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, KK, 2
kusano 2b45e8
#endif
kusano 2b45e8
	srawi.	TEMP,  TEMP,  2
kusano 2b45e8
	mtspr	CTR, TEMP
kusano 2b45e8
#else
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(B)
kusano 2b45e8
	LFD	f21,  1 * SIZE(B)
kusano 2b45e8
	LFD	f22,  2 * SIZE(B)
kusano 2b45e8
	LFD	f23,  3 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	LFD	f24,  4 * SIZE(B)
kusano 2b45e8
	LFD	f25,  5 * SIZE(B)
kusano 2b45e8
	LFD	f26,  6 * SIZE(B)
kusano 2b45e8
	LFD	f27,  7 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	srawi.	r0,  K,  2
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
	mr	BO,  B
kusano 2b45e8
#endif
kusano 2b45e8
	ble	.L65
kusano 2b45e8
	.align 5
kusano 2b45e8
kusano 2b45e8
.L62:
kusano 2b45e8
	FMADD	f0,  f16, f20, f0
kusano 2b45e8
	LFDU	f20,  8 * SIZE(BO)
kusano 2b45e8
	FMADD	f1,  f16, f21, f1
kusano 2b45e8
	LFDU	f16,  4 * SIZE(AO)
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
	FMADD	f2,  f17, f22, f2
kusano 2b45e8
	LFD	f22,  2 * SIZE(BO)
kusano 2b45e8
	FMADD	f3,  f17, f23, f3
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f23,  3 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f18, f24, f0
kusano 2b45e8
	LFD	f24,  4 * SIZE(BO)
kusano 2b45e8
	FMADD	f1,  f18, f25, f1
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f25,  5 * SIZE(BO)
kusano 2b45e8
	FMADD	f2,  f19, f26, f2
kusano 2b45e8
	LFD	f26,  6 * SIZE(BO)
kusano 2b45e8
	FMADD	f3,  f19, f27, f3
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
	LFD	f27,  7 * SIZE(BO)
kusano 2b45e8
	bdnz	.L62
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L65:
kusano 2b45e8
	lfd	f30,  ALPHA
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL)
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#elif defined(LEFT)
kusano 2b45e8
	addi	TEMP, KK, 1
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, KK, 2
kusano 2b45e8
#endif
kusano 2b45e8
	andi.	TEMP,  TEMP,  3
kusano 2b45e8
	mtspr	CTR, TEMP
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
	andi.	r0,  K,  3
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
kusano 2b45e8
#endif
kusano 2b45e8
	ble+	.L68
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L66:
kusano 2b45e8
	FMADD	f0,  f16, f20, f0
kusano 2b45e8
	LFDU	f20,  2 * SIZE(BO)
kusano 2b45e8
	FMADD	f1,  f16, f21, f1
kusano 2b45e8
	LFDU	f16,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
	bdnz	.L66
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L68:
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	LFD	f16, 0 * SIZE(CO1)
kusano 2b45e8
	LFD	f18, 0 * SIZE(CO2)
kusano 2b45e8
kusano 2b45e8
	FADD	f0, f2, f0
kusano 2b45e8
	FADD	f1, f3, f1
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f0,  f30, f16
kusano 2b45e8
	FMADD	f1,  f1,  f30, f18
kusano 2b45e8
#else
kusano 2b45e8
	FADD	f0, f2, f0
kusano 2b45e8
	FADD	f1, f3, f1
kusano 2b45e8
kusano 2b45e8
	FMUL	f0,  f0,  f30
kusano 2b45e8
	FMUL	f1,  f1,  f30
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	STFD	f0,  0 * SIZE(CO1)
kusano 2b45e8
	STFD	f1,  0 * SIZE(CO2)
kusano 2b45e8
kusano 2b45e8
	lfs	f0,  FZERO
kusano 2b45e8
 	fmr	f1,  f0
kusano 2b45e8
	fmr	f4,  f0
kusano 2b45e8
	fmr	f5,  f0
kusano 2b45e8
kusano 2b45e8
kusano 2b45e8
#ifdef TRMMKERNEL
kusano 2b45e8
#if ( defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
    (!defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addi	TEMP, TEMP, -1
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, TEMP, -2
kusano 2b45e8
#endif
kusano 2b45e8
	slwi	r0,   TEMP, 0 + BASE_SHIFT
kusano 2b45e8
	slwi	TEMP, TEMP, 1 + BASE_SHIFT
kusano 2b45e8
	add	AO, AO, r0
kusano 2b45e8
	add	BO, BO, TEMP
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addi	KK, KK, 1
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L69:
kusano 2b45e8
#if defined(TRMMKERNEL) && !defined(LEFT)
kusano 2b45e8
	addi	KK, KK, 2
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	mr	B,  BO
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L70:
kusano 2b45e8
	mr	CO1, C
kusano 2b45e8
	andi.	J, N,  1
kusano 2b45e8
	ble	.L999
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL) && defined(LEFT)
kusano 2b45e8
	mr	KK, OFFSET
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	lfs	f0,  FZERO
kusano 2b45e8
 	fmr	f1,  f0
kusano 2b45e8
	fmr	f2,  f0
kusano 2b45e8
	fmr	f3,  f0
kusano 2b45e8
kusano 2b45e8
	srawi.	I, M,  2
kusano 2b45e8
	mr	AO, A
kusano 2b45e8
	ble	.L80
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L71:
kusano 2b45e8
#if defined(TRMMKERNEL)
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) &&  defined(TRANSA)) || (!defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(B)
kusano 2b45e8
	LFD	f21,  1 * SIZE(B)
kusano 2b45e8
	LFD	f22,  2 * SIZE(B)
kusano 2b45e8
	LFD	f23,  3 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	mr	BO,  B
kusano 2b45e8
#else
kusano 2b45e8
	slwi	r0,   KK, 2 + BASE_SHIFT
kusano 2b45e8
	slwi	TEMP, KK, 0 + BASE_SHIFT
kusano 2b45e8
	add	AO, AO, r0
kusano 2b45e8
	add	BO, B,  TEMP
kusano 2b45e8
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(BO)
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
	LFD	f22,  2 * SIZE(BO)
kusano 2b45e8
	LFD	f23,  3 * SIZE(BO)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#elif defined(LEFT)
kusano 2b45e8
	addi	TEMP, KK, 4
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, KK, 1
kusano 2b45e8
#endif
kusano 2b45e8
	srawi.	TEMP,  TEMP,  2
kusano 2b45e8
	mtspr	CTR, TEMP
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(B)
kusano 2b45e8
	LFD	f21,  1 * SIZE(B)
kusano 2b45e8
	LFD	f22,  2 * SIZE(B)
kusano 2b45e8
	LFD	f23,  3 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	srawi.	r0,  K,  2
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
	mr	BO,  B
kusano 2b45e8
	ble	.L75
kusano 2b45e8
kusano 2b45e8
#endif
kusano 2b45e8
	ble	.L75
kusano 2b45e8
	.align 5
kusano 2b45e8
kusano 2b45e8
.L72:
kusano 2b45e8
	FMADD	f0,  f16, f20, f0
kusano 2b45e8
	LFD	f16,  4 * SIZE(AO)
kusano 2b45e8
	FMADD	f1,  f17, f20, f1
kusano 2b45e8
	LFD	f17,  5 * SIZE(AO)
kusano 2b45e8
	FMADD	f2,  f18, f20, f2
kusano 2b45e8
	LFD	f18,  6 * SIZE(AO)
kusano 2b45e8
	FMADD	f3,  f19, f20, f3
kusano 2b45e8
	LFD	f19,  7 * SIZE(AO)
kusano 2b45e8
	LFDU	f20,  4 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f16, f21, f0
kusano 2b45e8
	LFD	f16,  8 * SIZE(AO)
kusano 2b45e8
	FMADD	f1,  f17, f21, f1
kusano 2b45e8
	LFD	f17,  9 * SIZE(AO)
kusano 2b45e8
	FMADD	f2,  f18, f21, f2
kusano 2b45e8
	LFD	f18, 10 * SIZE(AO)
kusano 2b45e8
	FMADD	f3,  f19, f21, f3
kusano 2b45e8
	LFD	f19, 11 * SIZE(AO)
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f16, f22, f0
kusano 2b45e8
	LFD	f16, 12 * SIZE(AO)
kusano 2b45e8
	FMADD	f1,  f17, f22, f1
kusano 2b45e8
	LFD	f17, 13 * SIZE(AO)
kusano 2b45e8
	FMADD	f2,  f18, f22, f2
kusano 2b45e8
	LFD	f18, 14 * SIZE(AO)
kusano 2b45e8
	FMADD	f3,  f19, f22, f3
kusano 2b45e8
	LFD	f19, 15 * SIZE(AO)
kusano 2b45e8
	LFD	f22,  2 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f16, f23, f0
kusano 2b45e8
	LFDU	f16, 16 * SIZE(AO)
kusano 2b45e8
	FMADD	f1,  f17, f23, f1
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	FMADD	f2,  f18, f23, f2
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	FMADD	f3,  f19, f23, f3
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
	LFD	f23,  3 * SIZE(BO)
kusano 2b45e8
	bdnz	.L72
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L75:
kusano 2b45e8
	lfd	f30,  ALPHA
kusano 2b45e8
#if defined(TRMMKERNEL)
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#elif defined(LEFT)
kusano 2b45e8
	addi	TEMP, KK, 4
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, KK, 1
kusano 2b45e8
#endif
kusano 2b45e8
	andi.	TEMP,  TEMP,  3
kusano 2b45e8
	mtspr	CTR, TEMP
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
	andi.	r0,  K,  3
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
kusano 2b45e8
#endif
kusano 2b45e8
	ble+	.L78
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L76:
kusano 2b45e8
	FMADD	f0,  f16, f20, f0
kusano 2b45e8
	LFDU	f16,  4 * SIZE(AO)
kusano 2b45e8
	FMADD	f1,  f17, f20, f1
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	FMADD	f2,  f18, f20, f2
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	FMADD	f3,  f19, f20, f3
kusano 2b45e8
	LFDU	f20,  1 * SIZE(BO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
	bdnz	.L76
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L78:
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	LFD	f16, 0 * SIZE(CO1)
kusano 2b45e8
	LFD	f17, 1 * SIZE(CO1)
kusano 2b45e8
	LFD	f18, 2 * SIZE(CO1)
kusano 2b45e8
	LFD	f19, 3 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f0, f30, f16
kusano 2b45e8
	FMADD	f1,  f1, f30, f17
kusano 2b45e8
	FMADD	f2,  f2, f30, f18
kusano 2b45e8
	FMADD	f3,  f3, f30, f19
kusano 2b45e8
#else
kusano 2b45e8
	FMUL	f0,  f0, f30
kusano 2b45e8
	FMUL	f1,  f1, f30
kusano 2b45e8
	FMUL	f2,  f2, f30
kusano 2b45e8
	FMUL	f3,  f3, f30
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	STFD	f0,  0 * SIZE(CO1)
kusano 2b45e8
	STFD	f1,  1 * SIZE(CO1)
kusano 2b45e8
	STFD	f2,  2 * SIZE(CO1)
kusano 2b45e8
	STFD	f3,  3 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
	lfs	f0,  FZERO
kusano 2b45e8
 	fmr	f1,  f0
kusano 2b45e8
	fmr	f2,  f0
kusano 2b45e8
	fmr	f3,  f0
kusano 2b45e8
 
kusano 2b45e8
#ifdef TRMMKERNEL
kusano 2b45e8
#if ( defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
    (!defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addi	TEMP, TEMP, -4
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, TEMP, -1
kusano 2b45e8
#endif
kusano 2b45e8
	slwi	r0  , TEMP, 2 + BASE_SHIFT
kusano 2b45e8
	slwi	TEMP, TEMP, 0 + BASE_SHIFT
kusano 2b45e8
	add	AO, AO, r0
kusano 2b45e8
	add	BO, BO, TEMP
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addi	KK, KK, 4
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	addi	CO1, CO1, 4 * SIZE
kusano 2b45e8
	addic.	I, I, -1
kusano 2b45e8
	bgt+	.L71
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L80:
kusano 2b45e8
	andi.	I,  M,  2
kusano 2b45e8
	ble	.L90
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL)
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) &&  defined(TRANSA)) || (!defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(B)
kusano 2b45e8
	LFD	f21,  1 * SIZE(B)
kusano 2b45e8
	LFD	f22,  2 * SIZE(B)
kusano 2b45e8
	LFD	f23,  3 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	mr	BO,  B
kusano 2b45e8
#else
kusano 2b45e8
	slwi	r0,   KK, 1 + BASE_SHIFT
kusano 2b45e8
	slwi	TEMP, KK, 0 + BASE_SHIFT
kusano 2b45e8
	add	AO, AO, r0
kusano 2b45e8
	add	BO, B,  TEMP
kusano 2b45e8
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(BO)
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
	LFD	f22,  2 * SIZE(BO)
kusano 2b45e8
	LFD	f23,  3 * SIZE(BO)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#elif defined(LEFT)
kusano 2b45e8
	addi	TEMP, KK, 2
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, KK, 1
kusano 2b45e8
#endif
kusano 2b45e8
	srawi.	TEMP,  TEMP,  2
kusano 2b45e8
	mtspr	CTR, TEMP
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(B)
kusano 2b45e8
	LFD	f21,  1 * SIZE(B)
kusano 2b45e8
	LFD	f22,  2 * SIZE(B)
kusano 2b45e8
	LFD	f23,  3 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	srawi.	r0,  K,  2
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
	mr	BO,  B
kusano 2b45e8
kusano 2b45e8
#endif
kusano 2b45e8
	ble	.L85
kusano 2b45e8
	.align 5
kusano 2b45e8
kusano 2b45e8
.L82:
kusano 2b45e8
	FMADD	f0,  f16, f20, f0
kusano 2b45e8
	LFD	f16,  4 * SIZE(AO)
kusano 2b45e8
	FMADD	f1,  f17, f20, f1
kusano 2b45e8
	LFDU	f20,  4 * SIZE(BO)
kusano 2b45e8
	LFD	f17,  5 * SIZE(AO)
kusano 2b45e8
	FMADD	f2,  f18, f21, f2
kusano 2b45e8
	LFD	f18,  6 * SIZE(AO)
kusano 2b45e8
	FMADD	f3,  f19, f21, f3
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
	LFD	f19,  7 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f16, f22, f0
kusano 2b45e8
	LFDU	f16,  8 * SIZE(AO)
kusano 2b45e8
	FMADD	f1,  f17, f22, f1
kusano 2b45e8
	LFD	f22,  2 * SIZE(BO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	FMADD	f2,  f18, f23, f2
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	FMADD	f3,  f19, f23, f3
kusano 2b45e8
	LFD	f23,  3 * SIZE(BO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
	bdnz	.L82
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L85:
kusano 2b45e8
	lfd	f30,  ALPHA
kusano 2b45e8
#if defined(TRMMKERNEL)
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#elif defined(LEFT)
kusano 2b45e8
	addi	TEMP, KK, 2
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, KK, 1
kusano 2b45e8
#endif
kusano 2b45e8
	andi.	TEMP,  TEMP,  3
kusano 2b45e8
	mtspr	CTR, TEMP
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
kusano 2b45e8
	andi.	r0,  K,  3
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
kusano 2b45e8
#endif
kusano 2b45e8
	ble+	.L88
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L86:
kusano 2b45e8
	FMADD	f0,  f16, f20, f0
kusano 2b45e8
	LFDU	f16,  2 * SIZE(AO)
kusano 2b45e8
	FMADD	f1,  f17, f20, f1
kusano 2b45e8
	LFDU	f20,  1 * SIZE(BO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	bdnz	.L86
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L88:
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	LFD	f16, 0 * SIZE(CO1)
kusano 2b45e8
	LFD	f17, 1 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
	FADD	f0, f2, f0
kusano 2b45e8
	FADD	f1, f3, f1
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f0, f30, f16
kusano 2b45e8
	FMADD	f1,  f1, f30, f17
kusano 2b45e8
#else
kusano 2b45e8
	FADD	f0, f2, f0
kusano 2b45e8
	FADD	f1, f3, f1
kusano 2b45e8
kusano 2b45e8
	FMUL	f0,  f0, f30
kusano 2b45e8
	FMUL	f1,  f1, f30
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	STFD	f0,  0 * SIZE(CO1)
kusano 2b45e8
	STFD	f1,  1 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
	lfs	f0,  FZERO
kusano 2b45e8
 	fmr	f1,  f0
kusano 2b45e8
	fmr	f2,  f0
kusano 2b45e8
	fmr	f3,  f0
kusano 2b45e8
kusano 2b45e8
	addi	CO1, CO1, 2 * SIZE
kusano 2b45e8
kusano 2b45e8
#ifdef TRMMKERNEL
kusano 2b45e8
#if ( defined(LEFT) &&  defined(TRANSA)) || \
kusano 2b45e8
    (!defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addi	TEMP, TEMP, -2
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, TEMP, -1
kusano 2b45e8
#endif
kusano 2b45e8
	slwi	r0  , TEMP, 1 + BASE_SHIFT
kusano 2b45e8
	slwi	TEMP, TEMP, 0 + BASE_SHIFT
kusano 2b45e8
	add	AO, AO, r0
kusano 2b45e8
	add	BO, BO, TEMP
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef LEFT
kusano 2b45e8
	addi	KK, KK, 2
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L90:
kusano 2b45e8
	andi.	I,  M,  1
kusano 2b45e8
	ble	.L999
kusano 2b45e8
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL)
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) &&  defined(TRANSA)) || (!defined(LEFT) && !defined(TRANSA))
kusano 2b45e8
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(B)
kusano 2b45e8
	LFD	f21,  1 * SIZE(B)
kusano 2b45e8
	LFD	f22,  2 * SIZE(B)
kusano 2b45e8
	LFD	f23,  3 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	mr	BO,  B
kusano 2b45e8
#else
kusano 2b45e8
	slwi	r0,   KK, 0 + BASE_SHIFT
kusano 2b45e8
	slwi	TEMP, KK, 0 + BASE_SHIFT
kusano 2b45e8
	add	AO, AO, r0
kusano 2b45e8
	add	BO, B,  TEMP
kusano 2b45e8
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(BO)
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
	LFD	f22,  2 * SIZE(BO)
kusano 2b45e8
	LFD	f23,  3 * SIZE(BO)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#elif defined(LEFT)
kusano 2b45e8
	addi	TEMP, KK, 1
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, KK, 1
kusano 2b45e8
#endif
kusano 2b45e8
	srawi.	TEMP,  TEMP,  3
kusano 2b45e8
	mtspr	CTR, TEMP
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
	LFD	f16,  0 * SIZE(AO)
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
kusano 2b45e8
	LFD	f20,  0 * SIZE(B)
kusano 2b45e8
	LFD	f21,  1 * SIZE(B)
kusano 2b45e8
	LFD	f22,  2 * SIZE(B)
kusano 2b45e8
	LFD	f23,  3 * SIZE(B)
kusano 2b45e8
kusano 2b45e8
	srawi.	r0,  K,  3
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
	mr	BO,  B
kusano 2b45e8
#endif
kusano 2b45e8
	ble	.L95
kusano 2b45e8
	.align 5
kusano 2b45e8
kusano 2b45e8
.L92:
kusano 2b45e8
	FMADD	f0,  f16, f20, f0
kusano 2b45e8
	LFD	f16,  4 * SIZE(AO)
kusano 2b45e8
	LFD	f20,  4 * SIZE(BO)
kusano 2b45e8
	FMADD	f1,  f17, f21, f1
kusano 2b45e8
	LFD	f17,  5 * SIZE(AO)
kusano 2b45e8
	LFD	f21,  5 * SIZE(BO)
kusano 2b45e8
	FMADD	f2,  f18, f22, f2
kusano 2b45e8
	LFD	f18,  6 * SIZE(AO)
kusano 2b45e8
	LFD	f22,  6 * SIZE(BO)
kusano 2b45e8
	FMADD	f3,  f19, f23, f3
kusano 2b45e8
	LFD	f19,  7 * SIZE(AO)
kusano 2b45e8
	LFD	f23,  7 * SIZE(BO)
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f16, f20, f0
kusano 2b45e8
	LFDU	f16,  8 * SIZE(AO)
kusano 2b45e8
	LFDU	f20,  8 * SIZE(BO)
kusano 2b45e8
	FMADD	f1,  f17, f21, f1
kusano 2b45e8
	LFD	f17,  1 * SIZE(AO)
kusano 2b45e8
	LFD	f21,  1 * SIZE(BO)
kusano 2b45e8
	FMADD	f2,  f18, f22, f2
kusano 2b45e8
	LFD	f18,  2 * SIZE(AO)
kusano 2b45e8
	LFD	f22,  2 * SIZE(BO)
kusano 2b45e8
	FMADD	f3,  f19, f23, f3
kusano 2b45e8
	LFD	f19,  3 * SIZE(AO)
kusano 2b45e8
	LFD	f23,  3 * SIZE(BO)
kusano 2b45e8
	bdnz	.L92
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L95:
kusano 2b45e8
	lfd	f30,  ALPHA
kusano 2b45e8
kusano 2b45e8
#if defined(TRMMKERNEL)
kusano 2b45e8
kusano 2b45e8
#if (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
kusano 2b45e8
	sub	TEMP, K, KK
kusano 2b45e8
#elif defined(LEFT)
kusano 2b45e8
	addi	TEMP, KK, 1
kusano 2b45e8
#else
kusano 2b45e8
	addi	TEMP, KK, 1
kusano 2b45e8
#endif
kusano 2b45e8
	andi.	TEMP,  TEMP,  7
kusano 2b45e8
	mtspr	CTR, TEMP
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
kusano 2b45e8
	andi.	r0,  K,  7
kusano 2b45e8
	mtspr	CTR, r0
kusano 2b45e8
kusano 2b45e8
#endif
kusano 2b45e8
	ble+	.L98
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L96:
kusano 2b45e8
	FMADD	f0,  f16, f20, f0
kusano 2b45e8
	LFDU	f16,  1 * SIZE(AO)
kusano 2b45e8
	LFDU	f20,  1 * SIZE(BO)
kusano 2b45e8
	bdnz	.L96
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L98:
kusano 2b45e8
#ifndef TRMMKERNEL
kusano 2b45e8
	LFD	f16, 0 * SIZE(CO1)
kusano 2b45e8
kusano 2b45e8
	FADD	f0, f1, f0
kusano 2b45e8
	FADD	f2, f3, f2
kusano 2b45e8
	FADD	f0, f2, f0
kusano 2b45e8
kusano 2b45e8
	FMADD	f0,  f0,  f30, f16
kusano 2b45e8
#else
kusano 2b45e8
	FADD	f0, f1, f0
kusano 2b45e8
	FADD	f2, f3, f2
kusano 2b45e8
	FADD	f0, f2, f0
kusano 2b45e8
kusano 2b45e8
	FMUL	f0,  f0,  f30
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	STFD	f0,  0 * SIZE(CO1)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
.L999:
kusano 2b45e8
	addi	r3, 0, 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
kusano 2b45e8
	lfd	f18,   32(SP)
kusano 2b45e8
	lfd	f19,   40(SP)
kusano 2b45e8
	lfd	f20,   48(SP)
kusano 2b45e8
	lfd	f21,   56(SP)
kusano 2b45e8
kusano 2b45e8
	lfd	f22,   64(SP)
kusano 2b45e8
	lfd	f23,   72(SP)
kusano 2b45e8
	lfd	f24,   80(SP)
kusano 2b45e8
	lfd	f25,   88(SP)
kusano 2b45e8
kusano 2b45e8
	lfd	f26,   96(SP)
kusano 2b45e8
	lfd	f27,  104(SP)
kusano 2b45e8
	lfd	f28,  112(SP)
kusano 2b45e8
	lfd	f29,  120(SP)
kusano 2b45e8
kusano 2b45e8
	lfd	f30,  128(SP)
kusano 2b45e8
	lfd	f31,  136(SP)
kusano 2b45e8
kusano 2b45e8
#ifdef __64BIT__
kusano 2b45e8
	ld	r31,  144(SP)
kusano 2b45e8
	ld	r30,  152(SP)
kusano 2b45e8
	ld	r29,  160(SP)
kusano 2b45e8
	ld	r28,  168(SP)
kusano 2b45e8
	ld	r27,  176(SP)
kusano 2b45e8
	ld	r26,  184(SP)
kusano 2b45e8
	ld	r25,  192(SP)
kusano 2b45e8
	ld	r24,  200(SP)
kusano 2b45e8
	ld	r23,  208(SP)
kusano 2b45e8
	ld	r22,  216(SP)
kusano 2b45e8
	ld	r21,  224(SP)
kusano 2b45e8
	ld	r20,  232(SP)
kusano 2b45e8
#if defined(TRMMKERNEL) || defined(TRSMKERNEL)
kusano 2b45e8
	ld	r19,  240(SP)
kusano 2b45e8
	ld	r18,  248(SP)
kusano 2b45e8
#endif
kusano 2b45e8
#else
kusano 2b45e8
	lwz	r31,  144(SP)
kusano 2b45e8
	lwz	r30,  148(SP)
kusano 2b45e8
	lwz	r29,  152(SP)
kusano 2b45e8
	lwz	r28,  156(SP)
kusano 2b45e8
	lwz	r27,  160(SP)
kusano 2b45e8
	lwz	r26,  164(SP)
kusano 2b45e8
	lwz	r25,  168(SP)
kusano 2b45e8
	lwz	r24,  172(SP)
kusano 2b45e8
	lwz	r23,  176(SP)
kusano 2b45e8
	lwz	r22,  180(SP)
kusano 2b45e8
	lwz	r21,  184(SP)
kusano 2b45e8
	lwz	r20,  188(SP)
kusano 2b45e8
#if defined(TRMMKERNEL) || defined(TRSMKERNEL)
kusano 2b45e8
	lwz	r19,  192(SP)
kusano 2b45e8
	lwz	r18,  196(SP)
kusano 2b45e8
#endif
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	addi	SP, SP, STACKSIZE
kusano 2b45e8
kusano 2b45e8
	blr
kusano 2b45e8
kusano 2b45e8
	EPILOGUE