Blame thirdparty/openblas/xianyi-OpenBLAS-e6e87a2/kernel/x86_64/dgemm_tcopy_4.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
#if defined(PENTIUM4) || defined(GENERIC)
kusano 2b45e8
#define PREFETCHSIZE	16
kusano 2b45e8
#define PREFETCH      prefetcht0
kusano 2b45e8
#define PREFETCHW     prefetcht0
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef NEHALEM
kusano 2b45e8
#define PREFETCHSIZE	12
kusano 2b45e8
#define PREFETCH      prefetcht0
kusano 2b45e8
#define MOVUPS_A	movups
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#if defined(CORE2) || defined(PENRYN) || defined(DUNNINGTON)
kusano 2b45e8
#define PREFETCHSIZE	16
kusano 2b45e8
#define PREFETCH      prefetcht0
kusano 2b45e8
#define PREFETCHW     prefetcht0
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef OPTERON
kusano 2b45e8
#define PREFETCHSIZE	16
kusano 2b45e8
#define PREFETCH      prefetch
kusano 2b45e8
#define PREFETCHW     prefetchw
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifdef MOVUPS_A
kusano 2b45e8
#define MOVUPS_A1(OFF, ADDR, REGS)		MOVUPS_A	OFF(ADDR), REGS
kusano 2b45e8
#define MOVUPS_A2(OFF, ADDR, BASE, SCALE, REGS)	MOVUPS_A	OFF(ADDR, BASE, SCALE), REGS
kusano 2b45e8
#else
kusano 2b45e8
#define MOVUPS_A1(OFF, ADDR, REGS)		movsd	OFF(ADDR), REGS; movhps	OFF + 8(ADDR), REGS
kusano 2b45e8
#define MOVUPS_A2(OFF, ADDR, BASE, SCALE, REGS)	movsd	OFF(ADDR, BASE, SCALE), REGS; movhps	OFF + 8(ADDR, BASE, SCALE), REGS
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifndef WINDOWS_ABI
kusano 2b45e8
kusano 2b45e8
#define N	ARG1	/* rsi */
kusano 2b45e8
#define M	ARG2	/* rdi */
kusano 2b45e8
#define A	ARG3	/* rdx */
kusano 2b45e8
#define LDA	ARG4	/* rcx */
kusano 2b45e8
#define B	ARG5	/* r8  */
kusano 2b45e8
kusano 2b45e8
#define AO1	%r9
kusano 2b45e8
#define AO2	%r10
kusano 2b45e8
#define LDA3	%r11
kusano 2b45e8
#define M8	%r12
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
kusano 2b45e8
#define STACKSIZE 256
kusano 2b45e8
kusano 2b45e8
#define N	ARG1	/* rdx */
kusano 2b45e8
#define M	ARG2	/* rcx */
kusano 2b45e8
#define A	ARG3	/* r8  */
kusano 2b45e8
#define LDA	ARG4	/* r9  */
kusano 2b45e8
#define OLD_B		64 + 32 + STACKSIZE(%rsp)
kusano 2b45e8
kusano 2b45e8
#define B	%r12
kusano 2b45e8
kusano 2b45e8
#define AO1	%rsi
kusano 2b45e8
#define AO2	%rdi
kusano 2b45e8
#define LDA3	%r10
kusano 2b45e8
#define M8	%r11
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#define I	%rax
kusano 2b45e8
kusano 2b45e8
#define B0	%rbp
kusano 2b45e8
#define	B2	%r14
kusano 2b45e8
#define	B3	%r15
kusano 2b45e8
kusano 2b45e8
	PROLOGUE
kusano 2b45e8
	PROFCODE
kusano 2b45e8
	
kusano 2b45e8
#ifdef WINDOWS_ABI
kusano 2b45e8
	pushq	%rdi
kusano 2b45e8
	pushq	%rsi
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	pushq	%r15
kusano 2b45e8
	pushq	%r14
kusano 2b45e8
	pushq	%r13
kusano 2b45e8
	pushq	%r12
kusano 2b45e8
	pushq	%rbp
kusano 2b45e8
kusano 2b45e8
#ifdef WINDOWS_ABI
kusano 2b45e8
	movq	OLD_B,     B
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	subq	$-16 * SIZE, B
kusano 2b45e8
kusano 2b45e8
	movq	M,    B2
kusano 2b45e8
	movq	M,    B3
kusano 2b45e8
kusano 2b45e8
	andq	$-4,  B2
kusano 2b45e8
	andq	$-2,  B3
kusano 2b45e8
kusano 2b45e8
	imulq	N,    B2
kusano 2b45e8
	imulq	N,    B3
kusano 2b45e8
kusano 2b45e8
	leaq	(B, B2, SIZE), B2
kusano 2b45e8
	leaq	(B, B3, SIZE), B3
kusano 2b45e8
kusano 2b45e8
	leaq	(,LDA, SIZE), LDA
kusano 2b45e8
	leaq	(LDA, LDA, 2), LDA3
kusano 2b45e8
kusano 2b45e8
	leaq	(, N, SIZE), M8
kusano 2b45e8
kusano 2b45e8
	cmpq	$4, N
kusano 2b45e8
	jl	.L30
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L21:
kusano 2b45e8
	subq	$4, N
kusano 2b45e8
kusano 2b45e8
	movq	A, AO1
kusano 2b45e8
	leaq	(A, LDA, 2), AO2
kusano 2b45e8
	leaq	(A, LDA, 4), A
kusano 2b45e8
kusano 2b45e8
	movq	B, B0
kusano 2b45e8
	addq	$16 * SIZE, B
kusano 2b45e8
kusano 2b45e8
	movq	M, I
kusano 2b45e8
	sarq	$3, I
kusano 2b45e8
	jle	.L24
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L23:
kusano 2b45e8
#ifdef PREFETCH
kusano 2b45e8
	PREFETCH	PREFETCHSIZE * SIZE(AO1)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	MOVUPS_A1(0 * SIZE, AO1, %xmm0)
kusano 2b45e8
	MOVUPS_A1(2 * SIZE, AO1, %xmm1)
kusano 2b45e8
	MOVUPS_A1(4 * SIZE, AO1, %xmm2)
kusano 2b45e8
	MOVUPS_A1(6 * SIZE, AO1, %xmm3)
kusano 2b45e8
kusano 2b45e8
#ifdef PREFETCHW
kusano 2b45e8
	PREFETCHW	(PREFETCHSIZE * 4 +  0) * SIZE(B)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm0,  -16 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm1,  -14 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm2,  -16 * SIZE(B0, M8, 4)
kusano 2b45e8
	movaps	%xmm3,  -14 * SIZE(B0, M8, 4)
kusano 2b45e8
kusano 2b45e8
#ifdef PREFETCH
kusano 2b45e8
	PREFETCH	PREFETCHSIZE * SIZE(AO1, LDA)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	MOVUPS_A2(0 * SIZE, AO1, LDA, 1, %xmm0)
kusano 2b45e8
	MOVUPS_A2(2 * SIZE, AO1, LDA, 1, %xmm1)
kusano 2b45e8
	MOVUPS_A2(4 * SIZE, AO1, LDA, 1, %xmm2)
kusano 2b45e8
	MOVUPS_A2(6 * SIZE, AO1, LDA, 1, %xmm3)
kusano 2b45e8
kusano 2b45e8
#ifdef PREFETCHW
kusano 2b45e8
	PREFETCHW	(PREFETCHSIZE * 4 +  8) * SIZE(B)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm0,  -12 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm1,  -10 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm2,  -12 * SIZE(B0, M8, 4)
kusano 2b45e8
	movaps	%xmm3,  -10 * SIZE(B0, M8, 4)
kusano 2b45e8
kusano 2b45e8
#ifdef PREFETCH
kusano 2b45e8
	PREFETCH	PREFETCHSIZE * SIZE(AO2)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	MOVUPS_A1(0 * SIZE, AO2, %xmm0)
kusano 2b45e8
	MOVUPS_A1(2 * SIZE, AO2, %xmm1)
kusano 2b45e8
	MOVUPS_A1(4 * SIZE, AO2, %xmm2)
kusano 2b45e8
	MOVUPS_A1(6 * SIZE, AO2, %xmm3)
kusano 2b45e8
kusano 2b45e8
#ifdef PREFETCHW
kusano 2b45e8
	PREFETCHW	(PREFETCHSIZE * 4 + 16) * SIZE(B)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm0,   -8 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm1,   -6 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm2,   -8 * SIZE(B0, M8, 4)
kusano 2b45e8
	movaps	%xmm3,   -6 * SIZE(B0, M8, 4)
kusano 2b45e8
kusano 2b45e8
#ifdef PREFETCH
kusano 2b45e8
	PREFETCH	PREFETCHSIZE * SIZE(AO2, LDA)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	MOVUPS_A2(0 * SIZE, AO2, LDA, 1, %xmm0)
kusano 2b45e8
	MOVUPS_A2(2 * SIZE, AO2, LDA, 1, %xmm1)
kusano 2b45e8
	MOVUPS_A2(4 * SIZE, AO2, LDA, 1, %xmm2)
kusano 2b45e8
	MOVUPS_A2(6 * SIZE, AO2, LDA, 1, %xmm3)
kusano 2b45e8
kusano 2b45e8
#ifdef PREFETCHW
kusano 2b45e8
	PREFETCHW	(PREFETCHSIZE * 4 + 24) * SIZE(B)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm0,   -4 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm1,   -2 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm2,   -4 * SIZE(B0, M8, 4)
kusano 2b45e8
	movaps	%xmm3,   -2 * SIZE(B0, M8, 4)
kusano 2b45e8
kusano 2b45e8
	addq	$8 * SIZE, AO1
kusano 2b45e8
	addq	$8 * SIZE, AO2
kusano 2b45e8
	leaq	(B0, M8, 8), B0
kusano 2b45e8
kusano 2b45e8
	decq	I
kusano 2b45e8
	jg	.L23
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L24:
kusano 2b45e8
	testq	$4, M
kusano 2b45e8
	jle	.L26
kusano 2b45e8
kusano 2b45e8
	MOVUPS_A1(0 * SIZE, AO1, %xmm0)
kusano 2b45e8
	MOVUPS_A1(2 * SIZE, AO1, %xmm1)
kusano 2b45e8
	MOVUPS_A2(0 * SIZE, AO1, LDA, 1, %xmm2)
kusano 2b45e8
	MOVUPS_A2(2 * SIZE, AO1, LDA, 1, %xmm3)
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm0,  -16 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm1,  -14 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm2,  -12 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm3,  -10 * SIZE(B0)
kusano 2b45e8
kusano 2b45e8
	MOVUPS_A1(0 * SIZE, AO2, %xmm0)
kusano 2b45e8
	MOVUPS_A1(2 * SIZE, AO2, %xmm1)
kusano 2b45e8
	MOVUPS_A2(0 * SIZE, AO2, LDA, 1, %xmm2)
kusano 2b45e8
	MOVUPS_A2(2 * SIZE, AO2, LDA, 1, %xmm3)
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm0,   -8 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm1,   -6 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm2,   -4 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm3,   -2 * SIZE(B0)
kusano 2b45e8
kusano 2b45e8
	addq	$4 * SIZE, AO1
kusano 2b45e8
	addq	$4 * SIZE, AO2
kusano 2b45e8
	leaq	(B0, M8, 4), B0
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L26:
kusano 2b45e8
	testq	$2, M
kusano 2b45e8
	jle	.L28
kusano 2b45e8
kusano 2b45e8
	MOVUPS_A1(0 * SIZE, AO1, %xmm0)
kusano 2b45e8
	MOVUPS_A2(0 * SIZE, AO1, LDA,  1, %xmm1)
kusano 2b45e8
	MOVUPS_A1(0 * SIZE, AO2, %xmm2)
kusano 2b45e8
	MOVUPS_A2(0 * SIZE, AO2, LDA,  1, %xmm3)
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm0,  -16 * SIZE(B2)
kusano 2b45e8
	movaps	%xmm1,  -14 * SIZE(B2)
kusano 2b45e8
	movaps	%xmm2,  -12 * SIZE(B2)
kusano 2b45e8
	movaps	%xmm3,  -10 * SIZE(B2)
kusano 2b45e8
kusano 2b45e8
	addq	$2 * SIZE, AO1
kusano 2b45e8
	addq	$2 * SIZE, AO2
kusano 2b45e8
	subq	$-8 * SIZE, B2
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L28:
kusano 2b45e8
	testq	$1, M
kusano 2b45e8
	jle	.L29
kusano 2b45e8
kusano 2b45e8
	movsd	0 * SIZE(AO1),      %xmm0
kusano 2b45e8
	movsd	0 * SIZE(AO1, LDA), %xmm1
kusano 2b45e8
	movsd	0 * SIZE(AO2),      %xmm2
kusano 2b45e8
	movsd	0 * SIZE(AO2, LDA), %xmm3
kusano 2b45e8
kusano 2b45e8
	unpcklpd %xmm1, %xmm0
kusano 2b45e8
	unpcklpd %xmm3, %xmm2
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm0,  -16 * SIZE(B3)
kusano 2b45e8
	movaps	%xmm2,  -14 * SIZE(B3)
kusano 2b45e8
	subq	$-4 * SIZE, B3
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L29:
kusano 2b45e8
	cmpq	$4, N
kusano 2b45e8
	jge	.L21
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L30:
kusano 2b45e8
	cmpq	$2, N
kusano 2b45e8
	jl	.L40
kusano 2b45e8
kusano 2b45e8
	subq	$2, N
kusano 2b45e8
kusano 2b45e8
	movq	A, AO1
kusano 2b45e8
	leaq	(A, LDA), AO2
kusano 2b45e8
	leaq	(A, LDA, 2), A
kusano 2b45e8
kusano 2b45e8
	movq	B, B0
kusano 2b45e8
	addq	$8 * SIZE, B
kusano 2b45e8
kusano 2b45e8
	movq	M, I
kusano 2b45e8
	sarq	$3, I
kusano 2b45e8
	jle	.L34
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L33:
kusano 2b45e8
#ifdef PREFETCH
kusano 2b45e8
	PREFETCH	PREFETCHSIZE * 2 * SIZE(AO1)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	MOVUPS_A1(0 * SIZE, AO1, %xmm0)
kusano 2b45e8
	MOVUPS_A1(2 * SIZE, AO1, %xmm1)
kusano 2b45e8
	MOVUPS_A1(4 * SIZE, AO1, %xmm2)
kusano 2b45e8
	MOVUPS_A1(6 * SIZE, AO1, %xmm3)
kusano 2b45e8
kusano 2b45e8
#ifdef PREFETCHW
kusano 2b45e8
	PREFETCHW	(PREFETCHSIZE * 4 +  0) * SIZE(B)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm0,  -16 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm1,  -14 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm2,  -16 * SIZE(B0, M8, 4)
kusano 2b45e8
	movaps	%xmm3,  -14 * SIZE(B0, M8, 4)
kusano 2b45e8
kusano 2b45e8
#ifdef PREFETCH
kusano 2b45e8
	PREFETCH	PREFETCHSIZE * 2 * SIZE(AO2)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	MOVUPS_A1(0 * SIZE, AO2, %xmm0)
kusano 2b45e8
	MOVUPS_A1(2 * SIZE, AO2, %xmm1)
kusano 2b45e8
	MOVUPS_A1(4 * SIZE, AO2, %xmm2)
kusano 2b45e8
	MOVUPS_A1(6 * SIZE, AO2, %xmm3)
kusano 2b45e8
kusano 2b45e8
#ifdef PREFETCHW
kusano 2b45e8
	PREFETCHW	(PREFETCHSIZE * 4 +  8) * SIZE(B)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm0,  -12 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm1,  -10 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm2,  -12 * SIZE(B0, M8, 4)
kusano 2b45e8
	movaps	%xmm3,  -10 * SIZE(B0, M8, 4)
kusano 2b45e8
kusano 2b45e8
	addq	$8 * SIZE, AO1
kusano 2b45e8
	addq	$8 * SIZE, AO2
kusano 2b45e8
	leaq	(B0, M8, 8), B0
kusano 2b45e8
kusano 2b45e8
	decq	I
kusano 2b45e8
	jg	.L33
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L34:
kusano 2b45e8
	testq	$4, M
kusano 2b45e8
	jle	.L36
kusano 2b45e8
kusano 2b45e8
	MOVUPS_A1(0 * SIZE, AO1, %xmm0)
kusano 2b45e8
	MOVUPS_A1(2 * SIZE, AO1, %xmm1)
kusano 2b45e8
	MOVUPS_A1(0 * SIZE, AO2, %xmm2)
kusano 2b45e8
	MOVUPS_A1(2 * SIZE, AO2, %xmm3)
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm0,  -16 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm1,  -14 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm2,  -12 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm3,  -10 * SIZE(B0)
kusano 2b45e8
kusano 2b45e8
	addq	$4 * SIZE, AO1
kusano 2b45e8
	addq	$4 * SIZE, AO2
kusano 2b45e8
	leaq	(B0, M8, 4), B0
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L36:
kusano 2b45e8
	testq	$2, M
kusano 2b45e8
	jle	.L38
kusano 2b45e8
kusano 2b45e8
	MOVUPS_A1(0 * SIZE, AO1, %xmm0)
kusano 2b45e8
	MOVUPS_A1(0 * SIZE, AO2, %xmm1)
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm0,  -16 * SIZE(B2)
kusano 2b45e8
	movaps	%xmm1,  -14 * SIZE(B2)
kusano 2b45e8
kusano 2b45e8
	addq	$2 * SIZE, AO1
kusano 2b45e8
	addq	$2 * SIZE, AO2
kusano 2b45e8
	subq	$-4 * SIZE, B2
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L38:
kusano 2b45e8
	testq	$1, M
kusano 2b45e8
	jle	.L40
kusano 2b45e8
kusano 2b45e8
	movsd	0 * SIZE(AO1),      %xmm0
kusano 2b45e8
	movsd	0 * SIZE(AO2),      %xmm1
kusano 2b45e8
kusano 2b45e8
	unpcklpd %xmm1, %xmm0
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm0,  -16 * SIZE(B3)
kusano 2b45e8
	subq	$-2 * SIZE, B3
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L40:
kusano 2b45e8
	cmpq	$1, N
kusano 2b45e8
	jl	.L999
kusano 2b45e8
kusano 2b45e8
	movq	A, AO1
kusano 2b45e8
kusano 2b45e8
	movq	B, B0
kusano 2b45e8
kusano 2b45e8
	movq	M, I
kusano 2b45e8
	sarq	$3, I
kusano 2b45e8
	jle	.L44
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L43:
kusano 2b45e8
#ifdef PREFETCH
kusano 2b45e8
	PREFETCH	PREFETCHSIZE * 4 * SIZE(AO1)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	MOVUPS_A1(0 * SIZE, AO1, %xmm0)
kusano 2b45e8
	MOVUPS_A1(2 * SIZE, AO1, %xmm1)
kusano 2b45e8
	MOVUPS_A1(4 * SIZE, AO1, %xmm2)
kusano 2b45e8
	MOVUPS_A1(6 * SIZE, AO1, %xmm3)
kusano 2b45e8
kusano 2b45e8
#ifdef PREFETCHW
kusano 2b45e8
	PREFETCHW	(PREFETCHSIZE * 4 +  0) * SIZE(B)
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm0,  -16 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm1,  -14 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm2,  -16 * SIZE(B0, M8, 4)
kusano 2b45e8
	movaps	%xmm3,  -14 * SIZE(B0, M8, 4)
kusano 2b45e8
kusano 2b45e8
	addq	$8 * SIZE, AO1
kusano 2b45e8
	leaq	(B0, M8, 8), B0
kusano 2b45e8
kusano 2b45e8
	decq	I
kusano 2b45e8
	jg	.L43
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L44:
kusano 2b45e8
	testq	$4, M
kusano 2b45e8
	jle	.L45
kusano 2b45e8
kusano 2b45e8
	MOVUPS_A1(0 * SIZE, AO1, %xmm0)
kusano 2b45e8
	MOVUPS_A1(2 * SIZE, AO1, %xmm1)
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm0, -16 * SIZE(B0)
kusano 2b45e8
	movaps	%xmm1, -14 * SIZE(B0)
kusano 2b45e8
kusano 2b45e8
	addq	$4 * SIZE, AO1
kusano 2b45e8
	leaq	(B0, M8, 4), B0
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L45:
kusano 2b45e8
	testq	$2, M
kusano 2b45e8
	jle	.L46
kusano 2b45e8
kusano 2b45e8
	MOVUPS_A1(0 * SIZE, AO1, %xmm0)
kusano 2b45e8
kusano 2b45e8
	movaps	%xmm0,  -16 * SIZE(B2)
kusano 2b45e8
kusano 2b45e8
	addq	$2 * SIZE, AO1
kusano 2b45e8
	subq	$-2 * SIZE, B2
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
kusano 2b45e8
.L46:
kusano 2b45e8
	testq	$1, M
kusano 2b45e8
	jle	.L999
kusano 2b45e8
kusano 2b45e8
	movsd	0 * SIZE(AO1),      %xmm0
kusano 2b45e8
kusano 2b45e8
	movlpd	%xmm0,  -16 * SIZE(B3)
kusano 2b45e8
	jmp	.L999
kusano 2b45e8
	ALIGN_4
kusano 2b45e8
	
kusano 2b45e8
.L999:
kusano 2b45e8
	popq	%rbp
kusano 2b45e8
	popq	%r12
kusano 2b45e8
	popq	%r13
kusano 2b45e8
	popq	%r14
kusano 2b45e8
	popq	%r15
kusano 2b45e8
kusano 2b45e8
#ifdef WINDOWS_ABI
kusano 2b45e8
	popq	%rsi
kusano 2b45e8
	popq	%rdi
kusano 2b45e8
#endif
kusano 2b45e8
	ret
kusano 2b45e8
kusano 2b45e8
	EPILOGUE