Blame thirdparty/openblas/xianyi-OpenBLAS-e6e87a2/kernel/power/cnrm2_hummer.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
#define N	r3
kusano 2b45e8
#define X	r4
kusano 2b45e8
#define INCX	r5	
kusano 2b45e8
kusano 2b45e8
#define INCX2	r6
kusano 2b45e8
#define X2	r7
kusano 2b45e8
kusano 2b45e8
#define C1	f1
kusano 2b45e8
#define C2	f0
kusano 2b45e8
#define C3	f2
kusano 2b45e8
#define C4	f3
kusano 2b45e8
#define C5	f4
kusano 2b45e8
#define C6	f5
kusano 2b45e8
#define C7	f6
kusano 2b45e8
#define C8	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 A9	f16
kusano 2b45e8
#define A10	f17
kusano 2b45e8
#define A11	f18
kusano 2b45e8
#define A12	f19
kusano 2b45e8
#define A13	f20
kusano 2b45e8
#define A14	f21
kusano 2b45e8
#define A15	f22
kusano 2b45e8
#define A16	f23
kusano 2b45e8
kusano 2b45e8
	PROLOGUE
kusano 2b45e8
	PROFCODE
kusano 2b45e8
kusano 2b45e8
	li	r10, -16
kusano 2b45e8
kusano 2b45e8
	stfpdux	f14, SP, r10
kusano 2b45e8
	stfpdux	f15, SP, r10
kusano 2b45e8
	stfpdux	f16, SP, r10
kusano 2b45e8
	stfpdux	f17, SP, r10
kusano 2b45e8
kusano 2b45e8
	stfpdux	f18, SP, r10
kusano 2b45e8
	stfpdux	f19, SP, r10
kusano 2b45e8
	stfpdux	f20, SP, r10
kusano 2b45e8
	stfpdux	f21, SP, r10
kusano 2b45e8
kusano 2b45e8
	stfpdux	f22, SP, r10
kusano 2b45e8
	stfpdux	f23, SP, r10
kusano 2b45e8
kusano 2b45e8
	li	r10,   0
kusano 2b45e8
	stwu	r10,   -4(SP)
kusano 2b45e8
	stwu	r10,   -4(SP)
kusano 2b45e8
	stwu	r10,   -4(SP)
kusano 2b45e8
	stwu	r10,   -4(SP)
kusano 2b45e8
kusano 2b45e8
#ifdef F_INTERFACE
kusano 2b45e8
	LDINT	N,    0(N)
kusano 2b45e8
	LDINT	INCX, 0(INCX)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	lfpdx	C1, SP, r10		# Zero clear
kusano 2b45e8
kusano 2b45e8
	slwi	INCX,  INCX, BASE_SHIFT
kusano 2b45e8
	add	INCX2, INCX, INCX
kusano 2b45e8
kusano 2b45e8
	fpmr	C2, C1
kusano 2b45e8
	fpmr	C3, C1
kusano 2b45e8
	fpmr	C4, C1
kusano 2b45e8
kusano 2b45e8
	fpmr	C5, C1
kusano 2b45e8
	fpmr	C6, C1
kusano 2b45e8
	fpmr	C7, C1
kusano 2b45e8
	fpmr	C8, C1
kusano 2b45e8
kusano 2b45e8
	cmpwi	cr0, N, 0
kusano 2b45e8
	ble	LL(99)
kusano 2b45e8
	cmpwi	cr0, INCX, 0
kusano 2b45e8
	ble	LL(99)
kusano 2b45e8
kusano 2b45e8
	andi.	r0, X, 2 * SIZE - 1
kusano 2b45e8
	bne	LL(100)
kusano 2b45e8
kusano 2b45e8
	srawi.	r0, N, 4
kusano 2b45e8
	sub	X, X, INCX2
kusano 2b45e8
	mtspr	CTR,  r0
kusano 2b45e8
	beq-	LL(15)
kusano 2b45e8
kusano 2b45e8
	LFPDUX	A1,    X, INCX2
kusano 2b45e8
	LFPDUX	A2,    X, INCX2
kusano 2b45e8
	LFPDUX	A3,    X, INCX2
kusano 2b45e8
	LFPDUX	A4,    X, INCX2
kusano 2b45e8
	LFPDUX	A5,    X, INCX2
kusano 2b45e8
	LFPDUX	A6,    X, INCX2
kusano 2b45e8
	LFPDUX	A7,    X, INCX2
kusano 2b45e8
	LFPDUX	A8,    X, INCX2
kusano 2b45e8
kusano 2b45e8
	LFPDUX	A9,    X, INCX2
kusano 2b45e8
	LFPDUX	A10,   X, INCX2
kusano 2b45e8
	LFPDUX	A11,   X, INCX2
kusano 2b45e8
	LFPDUX	A12,   X, INCX2
kusano 2b45e8
	LFPDUX	A13,   X, INCX2
kusano 2b45e8
	LFPDUX	A14,   X, INCX2
kusano 2b45e8
	LFPDUX	A15,   X, INCX2
kusano 2b45e8
	LFPDUX	A16,   X, INCX2
kusano 2b45e8
	bdz	LL(13)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(12):
kusano 2b45e8
	fpmadd	C1, A1,  A1,  C1
kusano 2b45e8
	LFPDUX	A1,    X, INCX2
kusano 2b45e8
	fpmadd	C2, A2,  A2,  C2
kusano 2b45e8
	LFPDUX	A2,    X, INCX2
kusano 2b45e8
	fpmadd	C3, A3,  A3,  C3
kusano 2b45e8
	LFPDUX	A3,    X, INCX2
kusano 2b45e8
	fpmadd	C4, A4,  A4,  C4
kusano 2b45e8
	LFPDUX	A4,    X, INCX2
kusano 2b45e8
kusano 2b45e8
	fpmadd	C5, A5,  A5,  C5
kusano 2b45e8
	LFPDUX	A5,    X, INCX2
kusano 2b45e8
	fpmadd	C6, A6,  A6,  C6
kusano 2b45e8
	LFPDUX	A6,    X, INCX2
kusano 2b45e8
	fpmadd	C7, A7,  A7,  C7
kusano 2b45e8
	LFPDUX	A7,    X, INCX2
kusano 2b45e8
	fpmadd	C8, A8,  A8,  C8
kusano 2b45e8
	LFPDUX	A8,    X, INCX2
kusano 2b45e8
kusano 2b45e8
	fpmadd	C1, A9,  A9,  C1
kusano 2b45e8
	LFPDUX	A9,    X, INCX2
kusano 2b45e8
	fpmadd	C2, A10, A10, C2
kusano 2b45e8
	LFPDUX	A10,   X, INCX2
kusano 2b45e8
	fpmadd	C3, A11, A11, C3
kusano 2b45e8
	LFPDUX	A11,   X, INCX2
kusano 2b45e8
	fpmadd	C4, A12, A12, C4
kusano 2b45e8
	LFPDUX	A12,   X, INCX2
kusano 2b45e8
kusano 2b45e8
	fpmadd	C5, A13, A13, C5
kusano 2b45e8
	LFPDUX	A13,   X, INCX2
kusano 2b45e8
	fpmadd	C6, A14, A14, C6
kusano 2b45e8
	LFPDUX	A14,   X, INCX2
kusano 2b45e8
	fpmadd	C7, A15, A15, C7
kusano 2b45e8
	LFPDUX	A15,   X, INCX2
kusano 2b45e8
	fpmadd	C8, A16, A16, C8
kusano 2b45e8
	LFPDUX	A16,   X, INCX2
kusano 2b45e8
kusano 2b45e8
	bdnz	LL(12)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(13):
kusano 2b45e8
	fpmadd	C1, A1,  A1,  C1
kusano 2b45e8
	fpmadd	C2, A2,  A2,  C2
kusano 2b45e8
	fpmadd	C3, A3,  A3,  C3
kusano 2b45e8
	fpmadd	C4, A4,  A4,  C4
kusano 2b45e8
kusano 2b45e8
	fpmadd	C5, A5,  A5,  C5
kusano 2b45e8
	fpmadd	C6, A6,  A6,  C6
kusano 2b45e8
	fpmadd	C7, A7,  A7,  C7
kusano 2b45e8
	fpmadd	C8, A8,  A8,  C8
kusano 2b45e8
kusano 2b45e8
	fpmadd	C1, A9,  A9,  C1
kusano 2b45e8
	fpmadd	C2, A10, A10, C2
kusano 2b45e8
	fpmadd	C3, A11, A11, C3
kusano 2b45e8
	fpmadd	C4, A12, A12, C4
kusano 2b45e8
kusano 2b45e8
	fpmadd	C5, A13, A13, C5
kusano 2b45e8
	fpmadd	C6, A14, A14, C6
kusano 2b45e8
	fpmadd	C7, A15, A15, C7
kusano 2b45e8
	fpmadd	C8, A16, A16, C8
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(15):
kusano 2b45e8
	andi.	r0,  N, 15
kusano 2b45e8
	beq	LL(98)
kusano 2b45e8
kusano 2b45e8
	andi.	r0,  N, 8
kusano 2b45e8
	beq	LL(16)
kusano 2b45e8
kusano 2b45e8
	LFPDUX	A1,   X, INCX2
kusano 2b45e8
	LFPDUX	A2,   X, INCX2
kusano 2b45e8
	LFPDUX	A3,   X, INCX2
kusano 2b45e8
	LFPDUX	A4,   X, INCX2
kusano 2b45e8
	LFPDUX	A5,   X, INCX2
kusano 2b45e8
	LFPDUX	A6,   X, INCX2
kusano 2b45e8
	LFPDUX	A7,   X, INCX2
kusano 2b45e8
	LFPDUX	A8,   X, INCX2
kusano 2b45e8
kusano 2b45e8
	fpmadd	C1, A1, A1, C1
kusano 2b45e8
	fpmadd	C2, A2, A2, C2
kusano 2b45e8
	fpmadd	C3, A3, A3, C3
kusano 2b45e8
	fpmadd	C4, A4, A4, C4
kusano 2b45e8
kusano 2b45e8
	fpmadd	C5, A5, A5, C5
kusano 2b45e8
	fpmadd	C6, A6, A6, C6
kusano 2b45e8
	fpmadd	C7, A7, A7, C7
kusano 2b45e8
	fpmadd	C8, A8, A8, C8
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(16):
kusano 2b45e8
	andi.	r0,  N, 4
kusano 2b45e8
	beq	LL(17)
kusano 2b45e8
kusano 2b45e8
	LFPDUX	A1,    X, INCX2
kusano 2b45e8
	LFPDUX	A2,    X, INCX2
kusano 2b45e8
	LFPDUX	A3,    X, INCX2
kusano 2b45e8
	LFPDUX	A4,    X, INCX2
kusano 2b45e8
kusano 2b45e8
	fpmadd	C1, A1, A1, C1
kusano 2b45e8
	fpmadd	C2, A2, A2, C2
kusano 2b45e8
	fpmadd	C3, A3, A3, C3
kusano 2b45e8
	fpmadd	C4, A4, A4, C4
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(17):
kusano 2b45e8
	andi.	r0,  N, 2
kusano 2b45e8
	beq	LL(18)
kusano 2b45e8
kusano 2b45e8
	LFPDUX	A1,    X, INCX2
kusano 2b45e8
	LFPDUX	A2,    X, INCX2
kusano 2b45e8
	fpmadd	C1, A1, A1, C1
kusano 2b45e8
	fpmadd	C2, A2, A2, C2
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(18):
kusano 2b45e8
	andi.	r0,  N, 1
kusano 2b45e8
	beq	LL(98)
kusano 2b45e8
kusano 2b45e8
	LFPDUX	A1,    X, INCX2
kusano 2b45e8
	fpmadd	C3, A1, A1, C3
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(98):
kusano 2b45e8
	fpadd	C1,  C1,  C5
kusano 2b45e8
	lis	r3, 0x3f00
kusano 2b45e8
	fpadd	C2,  C2,  C6
kusano 2b45e8
	lis	r4, 0x4040
kusano 2b45e8
	fpadd	C3,  C3,  C7
kusano 2b45e8
	stw	r3, 4(SP)
kusano 2b45e8
	fpadd	C4,  C4,  C8
kusano 2b45e8
	stw	r4, 8(SP)
kusano 2b45e8
kusano 2b45e8
	fpadd	C1,  C1,  C2
kusano 2b45e8
	lfs	f10, 0(SP)
kusano 2b45e8
	fpadd	C3,  C3,  C4
kusano 2b45e8
	lfs	f11, 4(SP)
kusano 2b45e8
kusano 2b45e8
	fpadd	C1,  C1,  C3
kusano 2b45e8
	lfs	f12, 8(SP)
kusano 2b45e8
kusano 2b45e8
	fsmtp	C2, C1
kusano 2b45e8
	fadd	C1, C2, C1
kusano 2b45e8
kusano 2b45e8
	fcmpu	cr0, f10, C1
kusano 2b45e8
	beq	cr0, LL(99)
kusano 2b45e8
kusano 2b45e8
#ifndef HUMMER_EMULATOR
kusano 2b45e8
	frsqrte	f9, f1
kusano 2b45e8
	li	r10, 16
kusano 2b45e8
kusano 2b45e8
	fmul	f2,  f1,  f9
kusano 2b45e8
	lfpdux	f23, SP, r10
kusano 2b45e8
	fmul	f3,  f9,  f11
kusano 2b45e8
	lfpdux	f22, SP, r10
kusano 2b45e8
	fnmsub	f4,  f2,  f9, f12
kusano 2b45e8
	lfpdux	f21, SP, r10
kusano 2b45e8
	fmul	f9,  f3,  f4
kusano 2b45e8
	lfpdux	f20, SP, r10
kusano 2b45e8
	fadd	f13, f11, f11
kusano 2b45e8
	lfpdux	f19, SP, r10
kusano 2b45e8
	fmul	f12, f1,  f9
kusano 2b45e8
	lfpdux	f18, SP, r10
kusano 2b45e8
	fmul	f11, f12, f11
kusano 2b45e8
	lfpdux	f17, SP, r10
kusano 2b45e8
	fnmsub	f1,  f12, f9, f13
kusano 2b45e8
	lfpdux	f16, SP, r10
kusano 2b45e8
	lfpdux	f15, SP, r10
kusano 2b45e8
	lfpdux	f14, SP, r10
kusano 2b45e8
	addi	SP, SP,  16
kusano 2b45e8
	fmadd	f1,  f11, f1, f12
kusano 2b45e8
	blr
kusano 2b45e8
#else
kusano 2b45e8
	fsqrt	f1, f1
kusano 2b45e8
kusano 2b45e8
	li	r10, 16
kusano 2b45e8
	lfpdux	f23, SP, r10
kusano 2b45e8
	lfpdux	f22, SP, r10
kusano 2b45e8
	lfpdux	f21, SP, r10
kusano 2b45e8
	lfpdux	f20, SP, r10
kusano 2b45e8
	lfpdux	f19, SP, r10
kusano 2b45e8
	lfpdux	f18, SP, r10
kusano 2b45e8
	lfpdux	f17, SP, r10
kusano 2b45e8
	lfpdux	f16, SP, r10
kusano 2b45e8
	lfpdux	f15, SP, r10
kusano 2b45e8
	lfpdux	f14, SP, r10
kusano 2b45e8
	addi	SP, SP,  16
kusano 2b45e8
	blr
kusano 2b45e8
#endif	
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(99):
kusano 2b45e8
	li	r10, 16
kusano 2b45e8
kusano 2b45e8
	lfpdux	f23, SP, r10
kusano 2b45e8
	lfpdux	f22, SP, r10
kusano 2b45e8
	lfpdux	f21, SP, r10
kusano 2b45e8
	lfpdux	f20, SP, r10
kusano 2b45e8
	lfpdux	f19, SP, r10
kusano 2b45e8
	lfpdux	f18, SP, r10
kusano 2b45e8
	lfpdux	f17, SP, r10
kusano 2b45e8
	lfpdux	f16, SP, r10
kusano 2b45e8
	lfpdux	f15, SP, r10
kusano 2b45e8
	lfpdux	f14, SP, r10
kusano 2b45e8
	addi	SP, SP,  16
kusano 2b45e8
	blr
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(100):
kusano 2b45e8
	cmpwi	cr0, INCX, SIZE
kusano 2b45e8
	bne	LL(200)
kusano 2b45e8
kusano 2b45e8
	LFD	C1, 0(X)
kusano 2b45e8
	addi	X, X, 1 * SIZE
kusano 2b45e8
	addi	N, N, -1
kusano 2b45e8
	cmpwi	cr0, N, 0
kusano 2b45e8
	fmul	C1, C1, C1
kusano 2b45e8
	sub	X, X, INCX2
kusano 2b45e8
	ble	LL(198)
kusano 2b45e8
kusano 2b45e8
	srawi.	r0, N, 4
kusano 2b45e8
	mtspr	CTR,  r0
kusano 2b45e8
	beq-	LL(115)
kusano 2b45e8
kusano 2b45e8
	LFPDUX	A1,    X, INCX2
kusano 2b45e8
	LFPDUX	A2,    X, INCX2
kusano 2b45e8
	LFPDUX	A3,    X, INCX2
kusano 2b45e8
	LFPDUX	A4,    X, INCX2
kusano 2b45e8
	LFPDUX	A5,    X, INCX2
kusano 2b45e8
	LFPDUX	A6,    X, INCX2
kusano 2b45e8
	LFPDUX	A7,    X, INCX2
kusano 2b45e8
	LFPDUX	A8,    X, INCX2
kusano 2b45e8
kusano 2b45e8
	LFPDUX	A9,    X, INCX2
kusano 2b45e8
	LFPDUX	A10,   X, INCX2
kusano 2b45e8
	LFPDUX	A11,   X, INCX2
kusano 2b45e8
	LFPDUX	A12,   X, INCX2
kusano 2b45e8
	LFPDUX	A13,   X, INCX2
kusano 2b45e8
	LFPDUX	A14,   X, INCX2
kusano 2b45e8
	LFPDUX	A15,   X, INCX2
kusano 2b45e8
	LFPDUX	A16,   X, INCX2
kusano 2b45e8
	bdz	LL(113)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(112):
kusano 2b45e8
	fpmadd	C1, A1,  A1,  C1
kusano 2b45e8
	LFPDUX	A1,    X, INCX2
kusano 2b45e8
	fpmadd	C2, A2,  A2,  C2
kusano 2b45e8
	LFPDUX	A2,    X, INCX2
kusano 2b45e8
	fpmadd	C3, A3,  A3,  C3
kusano 2b45e8
	LFPDUX	A3,    X, INCX2
kusano 2b45e8
	fpmadd	C4, A4,  A4,  C4
kusano 2b45e8
	LFPDUX	A4,    X, INCX2
kusano 2b45e8
kusano 2b45e8
	fpmadd	C5, A5,  A5,  C5
kusano 2b45e8
	LFPDUX	A5,    X, INCX2
kusano 2b45e8
	fpmadd	C6, A6,  A6,  C6
kusano 2b45e8
	LFPDUX	A6,    X, INCX2
kusano 2b45e8
	fpmadd	C7, A7,  A7,  C7
kusano 2b45e8
	LFPDUX	A7,    X, INCX2
kusano 2b45e8
	fpmadd	C8, A8,  A8,  C8
kusano 2b45e8
	LFPDUX	A8,    X, INCX2
kusano 2b45e8
kusano 2b45e8
	fpmadd	C1, A9,  A9,  C1
kusano 2b45e8
	LFPDUX	A9,    X, INCX2
kusano 2b45e8
	fpmadd	C2, A10, A10, C2
kusano 2b45e8
	LFPDUX	A10,   X, INCX2
kusano 2b45e8
	fpmadd	C3, A11, A11, C3
kusano 2b45e8
	LFPDUX	A11,   X, INCX2
kusano 2b45e8
	fpmadd	C4, A12, A12, C4
kusano 2b45e8
	LFPDUX	A12,   X, INCX2
kusano 2b45e8
kusano 2b45e8
	fpmadd	C5, A13, A13, C5
kusano 2b45e8
	LFPDUX	A13,   X, INCX2
kusano 2b45e8
	fpmadd	C6, A14, A14, C6
kusano 2b45e8
	LFPDUX	A14,   X, INCX2
kusano 2b45e8
	fpmadd	C7, A15, A15, C7
kusano 2b45e8
	LFPDUX	A15,   X, INCX2
kusano 2b45e8
	fpmadd	C8, A16, A16, C8
kusano 2b45e8
	LFPDUX	A16,   X, INCX2
kusano 2b45e8
kusano 2b45e8
	bdnz	LL(112)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(113):
kusano 2b45e8
	fpmadd	C1, A1,  A1,  C1
kusano 2b45e8
	fpmadd	C2, A2,  A2,  C2
kusano 2b45e8
	fpmadd	C3, A3,  A3,  C3
kusano 2b45e8
	fpmadd	C4, A4,  A4,  C4
kusano 2b45e8
kusano 2b45e8
	fpmadd	C5, A5,  A5,  C5
kusano 2b45e8
	fpmadd	C6, A6,  A6,  C6
kusano 2b45e8
	fpmadd	C7, A7,  A7,  C7
kusano 2b45e8
	fpmadd	C8, A8,  A8,  C8
kusano 2b45e8
kusano 2b45e8
	fpmadd	C1, A9,  A9,  C1
kusano 2b45e8
	fpmadd	C2, A10, A10, C2
kusano 2b45e8
	fpmadd	C3, A11, A11, C3
kusano 2b45e8
	fpmadd	C4, A12, A12, C4
kusano 2b45e8
kusano 2b45e8
	fpmadd	C5, A13, A13, C5
kusano 2b45e8
	fpmadd	C6, A14, A14, C6
kusano 2b45e8
	fpmadd	C7, A15, A15, C7
kusano 2b45e8
	fpmadd	C8, A16, A16, C8
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(115):
kusano 2b45e8
	andi.	r0,  N, 15
kusano 2b45e8
	beq	LL(198)
kusano 2b45e8
kusano 2b45e8
	andi.	r0,  N, 8
kusano 2b45e8
	beq	LL(116)
kusano 2b45e8
kusano 2b45e8
	LFPDUX	A1,   X, INCX2
kusano 2b45e8
	LFPDUX	A2,   X, INCX2
kusano 2b45e8
	LFPDUX	A3,   X, INCX2
kusano 2b45e8
	LFPDUX	A4,   X, INCX2
kusano 2b45e8
	LFPDUX	A5,   X, INCX2
kusano 2b45e8
	LFPDUX	A6,   X, INCX2
kusano 2b45e8
	LFPDUX	A7,   X, INCX2
kusano 2b45e8
	LFPDUX	A8,   X, INCX2
kusano 2b45e8
kusano 2b45e8
	fpmadd	C1, A1, A1, C1
kusano 2b45e8
	fpmadd	C2, A2, A2, C2
kusano 2b45e8
	fpmadd	C3, A3, A3, C3
kusano 2b45e8
	fpmadd	C4, A4, A4, C4
kusano 2b45e8
kusano 2b45e8
	fpmadd	C5, A5, A5, C5
kusano 2b45e8
	fpmadd	C6, A6, A6, C6
kusano 2b45e8
	fpmadd	C7, A7, A7, C7
kusano 2b45e8
	fpmadd	C8, A8, A8, C8
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(116):
kusano 2b45e8
	andi.	r0,  N, 4
kusano 2b45e8
	beq	LL(117)
kusano 2b45e8
kusano 2b45e8
	LFPDUX	A1,    X, INCX2
kusano 2b45e8
	LFPDUX	A2,    X, INCX2
kusano 2b45e8
	LFPDUX	A3,    X, INCX2
kusano 2b45e8
	LFPDUX	A4,    X, INCX2
kusano 2b45e8
kusano 2b45e8
	fpmadd	C1, A1, A1, C1
kusano 2b45e8
	fpmadd	C2, A2, A2, C2
kusano 2b45e8
	fpmadd	C3, A3, A3, C3
kusano 2b45e8
	fpmadd	C4, A4, A4, C4
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(117):
kusano 2b45e8
	andi.	r0,  N, 2
kusano 2b45e8
	beq	LL(118)
kusano 2b45e8
kusano 2b45e8
	LFPDUX	A1,    X, INCX2
kusano 2b45e8
	LFPDUX	A2,    X, INCX2
kusano 2b45e8
	fpmadd	C1, A1, A1, C1
kusano 2b45e8
	fpmadd	C2, A2, A2, C2
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(118):
kusano 2b45e8
	andi.	r0,  N, 1
kusano 2b45e8
	beq	LL(198)
kusano 2b45e8
kusano 2b45e8
	LFPDUX	A1,    X, INCX2
kusano 2b45e8
	fpmadd	C3, A1, A1, C3
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(198):
kusano 2b45e8
	LFDX	A1,    X, INCX2
kusano 2b45e8
	fmadd	C4, A1, A1, C4
kusano 2b45e8
	
kusano 2b45e8
	fpadd	C1,  C1,  C5
kusano 2b45e8
	lis	r3, 0x3f00
kusano 2b45e8
	fpadd	C2,  C2,  C6
kusano 2b45e8
	lis	r4, 0x4040
kusano 2b45e8
	fpadd	C3,  C3,  C7
kusano 2b45e8
	stw	r3, 4(SP)
kusano 2b45e8
	fpadd	C4,  C4,  C8
kusano 2b45e8
	stw	r4, 8(SP)
kusano 2b45e8
kusano 2b45e8
	fpadd	C1,  C1,  C2
kusano 2b45e8
	lfs	f10, 0(SP)
kusano 2b45e8
	fpadd	C3,  C3,  C4
kusano 2b45e8
	lfs	f11, 4(SP)
kusano 2b45e8
kusano 2b45e8
	fpadd	C1,  C1,  C3
kusano 2b45e8
	lfs	f12, 8(SP)
kusano 2b45e8
kusano 2b45e8
	fsmtp	C2, C1
kusano 2b45e8
	fadd	C1, C2, C1
kusano 2b45e8
kusano 2b45e8
	fcmpu	cr0, f10, C1
kusano 2b45e8
	beq	cr0, LL(199)
kusano 2b45e8
kusano 2b45e8
#ifndef HUMMER_EMULATOR
kusano 2b45e8
	frsqrte	f9, f1
kusano 2b45e8
	li	r10, 16
kusano 2b45e8
kusano 2b45e8
	fmul	f2,  f1,  f9
kusano 2b45e8
	lfpdux	f23, SP, r10
kusano 2b45e8
	fmul	f3,  f9,  f11
kusano 2b45e8
	lfpdux	f22, SP, r10
kusano 2b45e8
	fnmsub	f4,  f2,  f9, f12
kusano 2b45e8
	lfpdux	f21, SP, r10
kusano 2b45e8
	fmul	f9,  f3,  f4
kusano 2b45e8
	lfpdux	f20, SP, r10
kusano 2b45e8
	fadd	f13, f11, f11
kusano 2b45e8
	lfpdux	f19, SP, r10
kusano 2b45e8
	fmul	f12, f1,  f9
kusano 2b45e8
	lfpdux	f18, SP, r10
kusano 2b45e8
	fmul	f11, f12, f11
kusano 2b45e8
	lfpdux	f17, SP, r10
kusano 2b45e8
	fnmsub	f1,  f12, f9, f13
kusano 2b45e8
	lfpdux	f16, SP, r10
kusano 2b45e8
	lfpdux	f15, SP, r10
kusano 2b45e8
	lfpdux	f14, SP, r10
kusano 2b45e8
	addi	SP, SP,  16
kusano 2b45e8
	fmadd	f1,  f11, f1, f12
kusano 2b45e8
	blr
kusano 2b45e8
#else
kusano 2b45e8
	fsqrt	f1, f1
kusano 2b45e8
kusano 2b45e8
	li	r10, 16
kusano 2b45e8
	lfpdux	f23, SP, r10
kusano 2b45e8
	lfpdux	f22, SP, r10
kusano 2b45e8
	lfpdux	f21, SP, r10
kusano 2b45e8
	lfpdux	f20, SP, r10
kusano 2b45e8
	lfpdux	f19, SP, r10
kusano 2b45e8
	lfpdux	f18, SP, r10
kusano 2b45e8
	lfpdux	f17, SP, r10
kusano 2b45e8
	lfpdux	f16, SP, r10
kusano 2b45e8
	lfpdux	f15, SP, r10
kusano 2b45e8
	lfpdux	f14, SP, r10
kusano 2b45e8
	addi	SP, SP,  16
kusano 2b45e8
	blr
kusano 2b45e8
#endif
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(199):
kusano 2b45e8
	li	r10, 16
kusano 2b45e8
kusano 2b45e8
	lfpdux	f23, SP, r10
kusano 2b45e8
	lfpdux	f22, SP, r10
kusano 2b45e8
	lfpdux	f21, SP, r10
kusano 2b45e8
	lfpdux	f20, SP, r10
kusano 2b45e8
	lfpdux	f19, SP, r10
kusano 2b45e8
	lfpdux	f18, SP, r10
kusano 2b45e8
	lfpdux	f17, SP, r10
kusano 2b45e8
	lfpdux	f16, SP, r10
kusano 2b45e8
	lfpdux	f15, SP, r10
kusano 2b45e8
	lfpdux	f14, SP, r10
kusano 2b45e8
	addi	SP, SP,  16
kusano 2b45e8
	blr
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(200):
kusano 2b45e8
	sub	X,  X, INCX2
kusano 2b45e8
	addi	X2, X, SIZE
kusano 2b45e8
kusano 2b45e8
	srawi.	r0, N, 3
kusano 2b45e8
	mtspr	CTR,  r0
kusano 2b45e8
	beq-	LL(215)
kusano 2b45e8
kusano 2b45e8
kusano 2b45e8
	LFDUX	A1,    X,  INCX2
kusano 2b45e8
	LFDUX	A2,    X2, INCX2
kusano 2b45e8
	LFDUX	A3,    X,  INCX2
kusano 2b45e8
	LFDUX	A4,    X2, INCX2
kusano 2b45e8
kusano 2b45e8
	LFDUX	A5,    X,  INCX2
kusano 2b45e8
	LFDUX	A6,    X2, INCX2
kusano 2b45e8
	LFDUX	A7,    X,  INCX2
kusano 2b45e8
	LFDUX	A8,    X2, INCX2
kusano 2b45e8
kusano 2b45e8
	LFDUX	A9,    X,  INCX2
kusano 2b45e8
	LFDUX	A10,   X2, INCX2
kusano 2b45e8
	LFDUX	A11,   X,  INCX2
kusano 2b45e8
	LFDUX	A12,   X2, INCX2
kusano 2b45e8
kusano 2b45e8
	LFDUX	A13,   X,  INCX2
kusano 2b45e8
	LFDUX	A14,   X2, INCX2
kusano 2b45e8
	LFDUX	A15,   X,  INCX2
kusano 2b45e8
	LFDUX	A16,   X2, INCX2
kusano 2b45e8
	bdz	LL(213)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(212):
kusano 2b45e8
	fmadd	C1, A1, A1, C1
kusano 2b45e8
	LFDUX	A1,    X,  INCX2
kusano 2b45e8
	fmadd	C2, A2, A2, C2
kusano 2b45e8
	LFDUX	A2,    X2, INCX2
kusano 2b45e8
	fmadd	C3, A3, A3, C3
kusano 2b45e8
	LFDUX	A3,    X,  INCX2
kusano 2b45e8
	fmadd	C4, A4, A4, C4
kusano 2b45e8
	LFDUX	A4,    X2, INCX2
kusano 2b45e8
kusano 2b45e8
	fmadd	C5, A5, A5, C5
kusano 2b45e8
	LFDUX	A5,    X,  INCX2
kusano 2b45e8
	fmadd	C6, A6, A6, C6
kusano 2b45e8
	LFDUX	A6,    X2, INCX2
kusano 2b45e8
	fmadd	C7, A7, A7, C7
kusano 2b45e8
	LFDUX	A7,    X,  INCX2
kusano 2b45e8
	fmadd	C8, A8, A8, C8
kusano 2b45e8
	LFDUX	A8,    X2, INCX2
kusano 2b45e8
kusano 2b45e8
	fmadd	C1, A9,  A9,  C1
kusano 2b45e8
	LFDUX	A9,    X,  INCX2
kusano 2b45e8
	fmadd	C2, A10, A10, C2
kusano 2b45e8
	LFDUX	A10,   X2, INCX2
kusano 2b45e8
	fmadd	C3, A11, A11, C3
kusano 2b45e8
	LFDUX	A11,   X,  INCX2
kusano 2b45e8
	fmadd	C4, A12, A12, C4
kusano 2b45e8
	LFDUX	A12,   X2, INCX2
kusano 2b45e8
kusano 2b45e8
	fmadd	C5, A13, A13, C5
kusano 2b45e8
	LFDUX	A13,   X,  INCX2
kusano 2b45e8
	fmadd	C6, A14, A14, C6
kusano 2b45e8
	LFDUX	A14,   X2, INCX2
kusano 2b45e8
	fmadd	C7, A15, A15, C7
kusano 2b45e8
	LFDUX	A15,   X,  INCX2
kusano 2b45e8
	fmadd	C8, A16, A16, C8
kusano 2b45e8
	LFDUX	A16,   X2, INCX2
kusano 2b45e8
kusano 2b45e8
	bdnz	LL(212)
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(213):
kusano 2b45e8
	fmadd	C1, A1, A1, C1
kusano 2b45e8
	fmadd	C2, A2, A2, C2
kusano 2b45e8
	fmadd	C3, A3, A3, C3
kusano 2b45e8
	fmadd	C4, A4, A4, C4
kusano 2b45e8
kusano 2b45e8
	fmadd	C5, A5, A5, C5
kusano 2b45e8
	fmadd	C6, A6, A6, C6
kusano 2b45e8
	fmadd	C7, A7, A7, C7
kusano 2b45e8
	fmadd	C8, A8, A8, C8
kusano 2b45e8
kusano 2b45e8
	fmadd	C1, A9,  A9,  C1
kusano 2b45e8
	fmadd	C2, A10, A10, C2
kusano 2b45e8
	fmadd	C3, A11, A11, C3
kusano 2b45e8
	fmadd	C4, A12, A12, C4
kusano 2b45e8
kusano 2b45e8
	fmadd	C5, A13, A13, C5
kusano 2b45e8
	fmadd	C6, A14, A14, C6
kusano 2b45e8
	fmadd	C7, A15, A15, C7
kusano 2b45e8
	fmadd	C8, A16, A16, C8
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(215):
kusano 2b45e8
	andi.	r0,  N, 7
kusano 2b45e8
	beq	LL(998)
kusano 2b45e8
	andi.	r0,  N, 4
kusano 2b45e8
	beq	LL(216)
kusano 2b45e8
kusano 2b45e8
	LFDUX	A1,    X,  INCX2
kusano 2b45e8
	LFDUX	A2,    X2, INCX2
kusano 2b45e8
	LFDUX	A3,    X,  INCX2
kusano 2b45e8
	LFDUX	A4,    X2, INCX2
kusano 2b45e8
kusano 2b45e8
	LFDUX	A5,    X,  INCX2
kusano 2b45e8
	LFDUX	A6,    X2, INCX2
kusano 2b45e8
	LFDUX	A7,    X,  INCX2
kusano 2b45e8
	LFDUX	A8,    X2, INCX2
kusano 2b45e8
kusano 2b45e8
	fmadd	C1, A1, A1, C1
kusano 2b45e8
	fmadd	C2, A2, A2, C2
kusano 2b45e8
	fmadd	C3, A3, A3, C3
kusano 2b45e8
	fmadd	C4, A4, A4, C4
kusano 2b45e8
kusano 2b45e8
	fmadd	C5, A5, A5, C5
kusano 2b45e8
	fmadd	C6, A6, A6, C6
kusano 2b45e8
	fmadd	C7, A7, A7, C7
kusano 2b45e8
	fmadd	C8, A8, A8, C8
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(216):
kusano 2b45e8
	andi.	r0,  N, 2
kusano 2b45e8
	beq	LL(217)
kusano 2b45e8
kusano 2b45e8
	LFDUX	A1,    X,  INCX2
kusano 2b45e8
	LFDUX	A2,    X2, INCX2
kusano 2b45e8
	LFDUX	A3,    X,  INCX2
kusano 2b45e8
	LFDUX	A4,    X2, INCX2
kusano 2b45e8
kusano 2b45e8
	fmadd	C1, A1, A1, C1
kusano 2b45e8
	fmadd	C2, A2, A2, C2
kusano 2b45e8
	fmadd	C3, A3, A3, C3
kusano 2b45e8
	fmadd	C4, A4, A4, C4
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(217):
kusano 2b45e8
	andi.	r0,  N, 1
kusano 2b45e8
	beq	LL(998)
kusano 2b45e8
kusano 2b45e8
	LFDUX	A1,    X,  INCX2
kusano 2b45e8
	LFDUX	A2,    X2, INCX2
kusano 2b45e8
kusano 2b45e8
	fmadd	C1, A1, A1, C1
kusano 2b45e8
	fmadd	C2, A2, A2, C2
kusano 2b45e8
	.align 4
kusano 2b45e8
kusano 2b45e8
LL(998):
kusano 2b45e8
	fadd	C1,  C1,  C5
kusano 2b45e8
	lis	r3, 0x3f00
kusano 2b45e8
	fadd	C2,  C2,  C6
kusano 2b45e8
	lis	r4, 0x4040
kusano 2b45e8
	fadd	C3,  C3,  C7
kusano 2b45e8
	stw	r3, 4(SP)
kusano 2b45e8
	fadd	C4,  C4,  C8
kusano 2b45e8
	stw	r4, 8(SP)
kusano 2b45e8
kusano 2b45e8
	fadd	C1,  C1,  C2
kusano 2b45e8
	lfs	f10, 0(SP)
kusano 2b45e8
	fadd	C3,  C3,  C4
kusano 2b45e8
	lfs	f11, 4(SP)
kusano 2b45e8
	fadd	C1,  C1,  C3
kusano 2b45e8
	lfs	f12, 8(SP)
kusano 2b45e8
kusano 2b45e8
	fcmpu	cr0, f10, C1
kusano 2b45e8
	beq	cr0, LL(99)
kusano 2b45e8
kusano 2b45e8
	frsqrte	f9, f1
kusano 2b45e8
	li	r10, 16
kusano 2b45e8
kusano 2b45e8
	fmul	f2,  f1,  f9
kusano 2b45e8
	lfpdux	f23, SP, r10
kusano 2b45e8
	fmul	f3,  f9,  f11
kusano 2b45e8
	lfpdux	f22, SP, r10
kusano 2b45e8
	fnmsub	f4,  f2,  f9, f12
kusano 2b45e8
	lfpdux	f21, SP, r10
kusano 2b45e8
	fmul	f9,  f3,  f4
kusano 2b45e8
	lfpdux	f20, SP, r10
kusano 2b45e8
	fadd	f13, f11, f11
kusano 2b45e8
	lfpdux	f19, SP, r10
kusano 2b45e8
	fmul	f12, f1,  f9
kusano 2b45e8
	lfpdux	f18, SP, r10
kusano 2b45e8
	fmul	f11, f12, f11
kusano 2b45e8
	lfpdux	f17, SP, r10
kusano 2b45e8
	fnmsub	f1,  f12, f9, f13
kusano 2b45e8
	lfpdux	f16, SP, r10
kusano 2b45e8
	lfpdux	f15, SP, r10
kusano 2b45e8
	lfpdux	f14, SP, r10
kusano 2b45e8
	addi	SP, SP,  16
kusano 2b45e8
	fmadd	f1,  f11, f1, f12
kusano 2b45e8
	blr
kusano 2b45e8
kusano 2b45e8
LL(999):
kusano 2b45e8
	li	r10, 16
kusano 2b45e8
kusano 2b45e8
	lfpdux	f23, SP, r10
kusano 2b45e8
	lfpdux	f22, SP, r10
kusano 2b45e8
	lfpdux	f21, SP, r10
kusano 2b45e8
	lfpdux	f20, SP, r10
kusano 2b45e8
	lfpdux	f19, SP, r10
kusano 2b45e8
	lfpdux	f18, SP, r10
kusano 2b45e8
	lfpdux	f17, SP, r10
kusano 2b45e8
	lfpdux	f16, SP, r10
kusano 2b45e8
	lfpdux	f15, SP, r10
kusano 2b45e8
	lfpdux	f14, SP, r10
kusano 2b45e8
	addi	SP, SP,  16
kusano 2b45e8
	blr
kusano 2b45e8
kusano 2b45e8
	EPILOGUE