|
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 STACK 16
|
|
kusano |
2b45e8 |
#define ARGS 0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define OLD_M 4 + STACK + ARGS(%esi)
|
|
kusano |
2b45e8 |
#define OLD_N 8 + STACK + ARGS(%esi)
|
|
kusano |
2b45e8 |
#define OLD_K 12 + STACK + ARGS(%esi)
|
|
kusano |
2b45e8 |
#define OLD_ALPHA_R 16 + STACK + ARGS(%esi)
|
|
kusano |
2b45e8 |
#define OLD_ALPHA_I 20 + STACK + ARGS(%esi)
|
|
kusano |
2b45e8 |
#define OLD_A 24 + STACK + ARGS(%esi)
|
|
kusano |
2b45e8 |
#define OLD_B 28 + STACK + ARGS(%esi)
|
|
kusano |
2b45e8 |
#define OLD_C 32 + STACK + ARGS(%esi)
|
|
kusano |
2b45e8 |
#define OLD_LDC 36 + STACK + ARGS(%esi)
|
|
kusano |
2b45e8 |
#define OLD_OFFSET 40 + STACK + ARGS(%esi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define GAMMA_R 0(%esp)
|
|
kusano |
2b45e8 |
#define GAMMA_I 8(%esp)
|
|
kusano |
2b45e8 |
#define ALPHA 16(%esp)
|
|
kusano |
2b45e8 |
#define K 24(%esp)
|
|
kusano |
2b45e8 |
#define N 28(%esp)
|
|
kusano |
2b45e8 |
#define M 32(%esp)
|
|
kusano |
2b45e8 |
#define A 36(%esp)
|
|
kusano |
2b45e8 |
#define C 40(%esp)
|
|
kusano |
2b45e8 |
#define J 44(%esp)
|
|
kusano |
2b45e8 |
#define OLD_STACK 48(%esp)
|
|
kusano |
2b45e8 |
#define OFFSET 52(%esp)
|
|
kusano |
2b45e8 |
#define KK 56(%esp)
|
|
kusano |
2b45e8 |
#define KKK 60(%esp)
|
|
kusano |
2b45e8 |
#define BUFFER 128(%esp)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define AA %edx
|
|
kusano |
2b45e8 |
#define BB %ecx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define PREFETCHSIZE (16 * 2 + 6)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define AOFFSET -32
|
|
kusano |
2b45e8 |
#define BOFFSET 128
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
/*
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
A hint of scheduling is received from following URL
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
https://sourceforge.net/mailarchive/forum.php?forum_id=426&max_rows=25&style=flat&viewmonth=200309&viewday=11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
*/
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PROLOGUE
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pushl %ebp
|
|
kusano |
2b45e8 |
pushl %edi
|
|
kusano |
2b45e8 |
pushl %esi
|
|
kusano |
2b45e8 |
pushl %ebx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PROFCODE
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl %esp, %esi # save old stack
|
|
kusano |
2b45e8 |
subl $128 + LOCAL_BUFFER_SIZE, %esp
|
|
kusano |
2b45e8 |
movl OLD_M, %ebx
|
|
kusano |
2b45e8 |
andl $-1024, %esp # align stack
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STACK_TOUCHING
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl OLD_N, %eax
|
|
kusano |
2b45e8 |
movl OLD_K, %ecx
|
|
kusano |
2b45e8 |
movl OLD_A, %edx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl %ebx, M
|
|
kusano |
2b45e8 |
movl %eax, N
|
|
kusano |
2b45e8 |
movl %ecx, K
|
|
kusano |
2b45e8 |
subl $AOFFSET * SIZE, %edx
|
|
kusano |
2b45e8 |
movl %edx, A
|
|
kusano |
2b45e8 |
movl %esi, OLD_STACK
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
testl %ebx, %ebx
|
|
kusano |
2b45e8 |
jle .L999
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl OLD_B, %edi
|
|
kusano |
2b45e8 |
movl OLD_C, %ebx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
EMMS
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movd OLD_ALPHA_R, %mm0
|
|
kusano |
2b45e8 |
movd OLD_ALPHA_I, %mm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movd %mm0, 0 + ALPHA
|
|
kusano |
2b45e8 |
movd %mm1, 4 + ALPHA
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(NN) || defined(NT) || defined(TN) || defined(TT)
|
|
kusano |
2b45e8 |
movl $0x3f800000, 0 + GAMMA_R
|
|
kusano |
2b45e8 |
movl $0x3f800000, 4 + GAMMA_R
|
|
kusano |
2b45e8 |
movl $0xbf800000, 0 + GAMMA_I
|
|
kusano |
2b45e8 |
movl $0x3f800000, 4 + GAMMA_I
|
|
kusano |
2b45e8 |
#elif defined(NR) || defined(NC) || defined(TR) || defined(TC)
|
|
kusano |
2b45e8 |
movl $0x3f800000, 0 + GAMMA_R
|
|
kusano |
2b45e8 |
movl $0x3f800000, 4 + GAMMA_R
|
|
kusano |
2b45e8 |
movl $0x3f800000, 0 + GAMMA_I
|
|
kusano |
2b45e8 |
movl $0xbf800000, 4 + GAMMA_I
|
|
kusano |
2b45e8 |
#elif defined(RN) || defined(RT) || defined(CN) || defined(CT)
|
|
kusano |
2b45e8 |
movl $0x3f800000, 0 + GAMMA_R
|
|
kusano |
2b45e8 |
movl $0xbF800000, 4 + GAMMA_R
|
|
kusano |
2b45e8 |
movl $0x3f800000, 0 + GAMMA_I
|
|
kusano |
2b45e8 |
movl $0x3F800000, 4 + GAMMA_I
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
movl $0x3f800000, 0 + GAMMA_R
|
|
kusano |
2b45e8 |
movl $0xbf800000, 4 + GAMMA_R
|
|
kusano |
2b45e8 |
movl $0xbf800000, 0 + GAMMA_I
|
|
kusano |
2b45e8 |
movl $0xbf800000, 4 + GAMMA_I
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
movl %ebx, C
|
|
kusano |
2b45e8 |
movl OLD_LDC, %ebp
|
|
kusano |
2b45e8 |
leal (, %ebp, SIZE * 2), %ebp
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef TRMMKERNEL
|
|
kusano |
2b45e8 |
movl OLD_OFFSET, %eax
|
|
kusano |
2b45e8 |
movl %eax, OFFSET
|
|
kusano |
2b45e8 |
#ifndef LEFT
|
|
kusano |
2b45e8 |
negl %eax
|
|
kusano |
2b45e8 |
movl %eax, KK
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl N, %eax
|
|
kusano |
2b45e8 |
sarl $1, %eax
|
|
kusano |
2b45e8 |
movl %eax, J # j = n
|
|
kusano |
2b45e8 |
jle .L20
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L01:
|
|
kusano |
2b45e8 |
/* Copying to Sub Buffer */
|
|
kusano |
2b45e8 |
leal BUFFER, BB
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(TRMMKERNEL) && defined(LEFT)
|
|
kusano |
2b45e8 |
movl OFFSET, %eax
|
|
kusano |
2b45e8 |
movl %eax, KK
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
sarl $2, %eax
|
|
kusano |
2b45e8 |
jle .L03
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L02:
|
|
kusano |
2b45e8 |
movd 0 * SIZE(%edi), %mm0
|
|
kusano |
2b45e8 |
movd 1 * SIZE(%edi), %mm1
|
|
kusano |
2b45e8 |
movd 2 * SIZE(%edi), %mm2
|
|
kusano |
2b45e8 |
movd 3 * SIZE(%edi), %mm3
|
|
kusano |
2b45e8 |
movd 4 * SIZE(%edi), %mm4
|
|
kusano |
2b45e8 |
movd 5 * SIZE(%edi), %mm5
|
|
kusano |
2b45e8 |
movd 6 * SIZE(%edi), %mm6
|
|
kusano |
2b45e8 |
movd 7 * SIZE(%edi), %mm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
prefetchnta 72 * SIZE(%edi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
punpckldq %mm0, %mm0
|
|
kusano |
2b45e8 |
punpckldq %mm1, %mm1
|
|
kusano |
2b45e8 |
punpckldq %mm2, %mm2
|
|
kusano |
2b45e8 |
punpckldq %mm3, %mm3
|
|
kusano |
2b45e8 |
punpckldq %mm4, %mm4
|
|
kusano |
2b45e8 |
punpckldq %mm5, %mm5
|
|
kusano |
2b45e8 |
punpckldq %mm6, %mm6
|
|
kusano |
2b45e8 |
punpckldq %mm7, %mm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq %mm0, 0 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm1, 2 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm2, 4 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm3, 6 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm4, 8 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm5, 10 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm6, 12 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm7, 14 * SIZE(BB)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movd 8 * SIZE(%edi), %mm0
|
|
kusano |
2b45e8 |
movd 9 * SIZE(%edi), %mm1
|
|
kusano |
2b45e8 |
movd 10 * SIZE(%edi), %mm2
|
|
kusano |
2b45e8 |
movd 11 * SIZE(%edi), %mm3
|
|
kusano |
2b45e8 |
movd 12 * SIZE(%edi), %mm4
|
|
kusano |
2b45e8 |
movd 13 * SIZE(%edi), %mm5
|
|
kusano |
2b45e8 |
movd 14 * SIZE(%edi), %mm6
|
|
kusano |
2b45e8 |
movd 15 * SIZE(%edi), %mm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
punpckldq %mm0, %mm0
|
|
kusano |
2b45e8 |
punpckldq %mm1, %mm1
|
|
kusano |
2b45e8 |
punpckldq %mm2, %mm2
|
|
kusano |
2b45e8 |
punpckldq %mm3, %mm3
|
|
kusano |
2b45e8 |
punpckldq %mm4, %mm4
|
|
kusano |
2b45e8 |
punpckldq %mm5, %mm5
|
|
kusano |
2b45e8 |
punpckldq %mm6, %mm6
|
|
kusano |
2b45e8 |
punpckldq %mm7, %mm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq %mm0, 16 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm1, 18 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm2, 20 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm3, 22 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm4, 24 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm5, 26 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm6, 28 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm7, 30 * SIZE(BB)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $16 * SIZE, %edi
|
|
kusano |
2b45e8 |
addl $32 * SIZE, BB
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jne .L02
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L03:
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
andl $3, %eax
|
|
kusano |
2b45e8 |
BRANCH
|
|
kusano |
2b45e8 |
jle .L10
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L04:
|
|
kusano |
2b45e8 |
movd 0 * SIZE(%edi), %mm0
|
|
kusano |
2b45e8 |
movd 1 * SIZE(%edi), %mm1
|
|
kusano |
2b45e8 |
movd 2 * SIZE(%edi), %mm2
|
|
kusano |
2b45e8 |
movd 3 * SIZE(%edi), %mm3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
punpckldq %mm0, %mm0
|
|
kusano |
2b45e8 |
punpckldq %mm1, %mm1
|
|
kusano |
2b45e8 |
punpckldq %mm2, %mm2
|
|
kusano |
2b45e8 |
punpckldq %mm3, %mm3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq %mm0, 0 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm1, 2 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm2, 4 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm3, 6 * SIZE(BB)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $4 * SIZE, %edi
|
|
kusano |
2b45e8 |
addl $8 * SIZE, BB
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jne .L04
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L10:
|
|
kusano |
2b45e8 |
movl C, %esi # coffset = c
|
|
kusano |
2b45e8 |
movl A, AA # aoffset = a
|
|
kusano |
2b45e8 |
movl M, %ebx
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L11:
|
|
kusano |
2b45e8 |
leal - BOFFSET * SIZE + BUFFER, BB
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if !defined(TRMMKERNEL) || \
|
|
kusano |
2b45e8 |
(defined(TRMMKERNEL) && defined(LEFT) && defined(TRANSA)) || \
|
|
kusano |
2b45e8 |
(defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
movl KK, %eax
|
|
kusano |
2b45e8 |
leal (, %eax, SIZE), %eax
|
|
kusano |
2b45e8 |
leal (AA, %eax, 2), AA
|
|
kusano |
2b45e8 |
leal (BB, %eax, 8), BB
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq ( 0 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
pxor %mm4, %mm4
|
|
kusano |
2b45e8 |
movq ( 16 + AOFFSET) * SIZE(AA), %mm1
|
|
kusano |
2b45e8 |
pxor %mm5, %mm5
|
|
kusano |
2b45e8 |
PADDING movq ( 0 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pxor %mm6, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 16 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pxor %mm7, %mm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
prefetchw 2 * SIZE(%esi)
|
|
kusano |
2b45e8 |
prefetchw 2 * SIZE(%esi, %ebp)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef TRMMKERNEL
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
#elif (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
subl KK, %eax
|
|
kusano |
2b45e8 |
movl %eax, KKK
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
movl KK, %eax
|
|
kusano |
2b45e8 |
#ifdef LEFT
|
|
kusano |
2b45e8 |
addl $1, %eax
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
addl $2, %eax
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
movl %eax, KKK
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
sarl $4, %eax
|
|
kusano |
2b45e8 |
je .L15
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L12:
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 2 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm5
|
|
kusano |
2b45e8 |
PADDING movq ( 4 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm6
|
|
kusano |
2b45e8 |
PADDING prefetch (PREFETCHSIZE + 0) * SIZE(AA)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PADDING movq ( 8 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul ( 6 + BOFFSET) * SIZE(BB), %mm0
|
|
kusano |
2b45e8 |
pfadd %mm0, %mm7
|
|
kusano |
2b45e8 |
movq ( 2 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 10 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm5
|
|
kusano |
2b45e8 |
PADDING movq ( 12 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 32 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul ( 14 + BOFFSET) * SIZE(BB), %mm0
|
|
kusano |
2b45e8 |
pfadd %mm0, %mm7
|
|
kusano |
2b45e8 |
movq ( 4 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 18 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm5
|
|
kusano |
2b45e8 |
PADDING movq ( 20 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 24 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul ( 22 + BOFFSET) * SIZE(BB), %mm0
|
|
kusano |
2b45e8 |
pfadd %mm0, %mm7
|
|
kusano |
2b45e8 |
movq ( 6 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 26 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm5
|
|
kusano |
2b45e8 |
PADDING movq ( 28 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 48 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul ( 30 + BOFFSET) * SIZE(BB), %mm0
|
|
kusano |
2b45e8 |
pfadd %mm0, %mm7
|
|
kusano |
2b45e8 |
movq ( 8 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 34 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm5
|
|
kusano |
2b45e8 |
PADDING movq ( 36 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 40 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul ( 38 + BOFFSET) * SIZE(BB), %mm0
|
|
kusano |
2b45e8 |
pfadd %mm0, %mm7
|
|
kusano |
2b45e8 |
movq ( 10 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 42 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm5
|
|
kusano |
2b45e8 |
PADDING movq ( 44 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 64 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul ( 46 + BOFFSET) * SIZE(BB), %mm0
|
|
kusano |
2b45e8 |
pfadd %mm0, %mm7
|
|
kusano |
2b45e8 |
movq ( 12 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 50 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm5
|
|
kusano |
2b45e8 |
PADDING movq ( 52 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 56 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul ( 54 + BOFFSET) * SIZE(BB), %mm0
|
|
kusano |
2b45e8 |
pfadd %mm0, %mm7
|
|
kusano |
2b45e8 |
movq ( 14 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 58 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm5
|
|
kusano |
2b45e8 |
PADDING movq ( 60 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 80 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul ( 62 + BOFFSET) * SIZE(BB), %mm0
|
|
kusano |
2b45e8 |
pfadd %mm0, %mm7
|
|
kusano |
2b45e8 |
movq ( 32 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 66 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm5
|
|
kusano |
2b45e8 |
PADDING movq ( 68 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 72 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul ( 70 + BOFFSET) * SIZE(BB), %mm1
|
|
kusano |
2b45e8 |
pfadd %mm1, %mm7
|
|
kusano |
2b45e8 |
movq ( 18 + AOFFSET) * SIZE(AA), %mm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 74 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm5
|
|
kusano |
2b45e8 |
PADDING movq ( 76 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 96 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul ( 78 + BOFFSET) * SIZE(BB), %mm1
|
|
kusano |
2b45e8 |
pfadd %mm1, %mm7
|
|
kusano |
2b45e8 |
movq ( 20 + AOFFSET) * SIZE(AA), %mm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 82 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm5
|
|
kusano |
2b45e8 |
PADDING movq ( 84 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 88 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul ( 86 + BOFFSET) * SIZE(BB), %mm1
|
|
kusano |
2b45e8 |
pfadd %mm1, %mm7
|
|
kusano |
2b45e8 |
movq ( 22 + AOFFSET) * SIZE(AA), %mm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 90 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm5
|
|
kusano |
2b45e8 |
PADDING movq ( 92 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm6
|
|
kusano |
2b45e8 |
PADDING movq (112 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul ( 94 + BOFFSET) * SIZE(BB), %mm1
|
|
kusano |
2b45e8 |
pfadd %mm1, %mm7
|
|
kusano |
2b45e8 |
movq ( 24 + AOFFSET) * SIZE(AA), %mm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 98 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm5
|
|
kusano |
2b45e8 |
PADDING movq (100 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm6
|
|
kusano |
2b45e8 |
PADDING movq (104 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul (102 + BOFFSET) * SIZE(BB), %mm1
|
|
kusano |
2b45e8 |
pfadd %mm1, %mm7
|
|
kusano |
2b45e8 |
movq ( 26 + AOFFSET) * SIZE(AA), %mm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm4
|
|
kusano |
2b45e8 |
PADDING movq (106 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm5
|
|
kusano |
2b45e8 |
PADDING movq (108 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm6
|
|
kusano |
2b45e8 |
PADDING movq (128 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul (110 + BOFFSET) * SIZE(BB), %mm1
|
|
kusano |
2b45e8 |
pfadd %mm1, %mm7
|
|
kusano |
2b45e8 |
movq ( 28 + AOFFSET) * SIZE(AA), %mm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm4
|
|
kusano |
2b45e8 |
PADDING movq (114 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm5
|
|
kusano |
2b45e8 |
PADDING movq (116 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm6
|
|
kusano |
2b45e8 |
PADDING movq (120 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul (118 + BOFFSET) * SIZE(BB), %mm1
|
|
kusano |
2b45e8 |
pfadd %mm1, %mm7
|
|
kusano |
2b45e8 |
movq ( 30 + AOFFSET) * SIZE(AA), %mm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm4
|
|
kusano |
2b45e8 |
PADDING movq (122 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm5
|
|
kusano |
2b45e8 |
PADDING movq (124 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm6
|
|
kusano |
2b45e8 |
PADDING movq (144 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul (126 + BOFFSET) * SIZE(BB), %mm1
|
|
kusano |
2b45e8 |
pfadd %mm1, %mm7
|
|
kusano |
2b45e8 |
movq ( 48 + AOFFSET) * SIZE(AA), %mm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
subl $-32 * SIZE, AA
|
|
kusano |
2b45e8 |
addl $128 * SIZE, BB
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jne .L12
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L15:
|
|
kusano |
2b45e8 |
#ifndef TRMMKERNEL
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
movl KKK, %eax
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
andl $15, %eax # if (k & 1)
|
|
kusano |
2b45e8 |
BRANCH
|
|
kusano |
2b45e8 |
je .L18
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L16:
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 2 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm5
|
|
kusano |
2b45e8 |
PADDING movq ( 4 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 8 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul ( 6 + BOFFSET) * SIZE(BB), %mm0
|
|
kusano |
2b45e8 |
pfadd %mm0, %mm7
|
|
kusano |
2b45e8 |
movq ( 2 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $2 * SIZE, AA
|
|
kusano |
2b45e8 |
addl $8 * SIZE, BB
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jg .L16
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L18:
|
|
kusano |
2b45e8 |
movq GAMMA_R, %mm0
|
|
kusano |
2b45e8 |
movq GAMMA_I, %mm1
|
|
kusano |
2b45e8 |
movq ALPHA, %mm2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pswapd %mm5, %mm5
|
|
kusano |
2b45e8 |
pswapd %mm7, %mm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm4
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm5
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm6
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfadd %mm5, %mm4
|
|
kusano |
2b45e8 |
pfadd %mm7, %mm6
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pswapd %mm4, %mm5
|
|
kusano |
2b45e8 |
pswapd %mm6, %mm7
|
|
kusano |
2b45e8 |
pfmul %mm2, %mm4
|
|
kusano |
2b45e8 |
pfmul %mm2, %mm6
|
|
kusano |
2b45e8 |
pfmul %mm2, %mm5
|
|
kusano |
2b45e8 |
pfmul %mm2, %mm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfpnacc %mm5, %mm4
|
|
kusano |
2b45e8 |
pfpnacc %mm7, %mm6
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef TRMMKERNEL
|
|
kusano |
2b45e8 |
pfadd (%esi), %mm4
|
|
kusano |
2b45e8 |
pfadd (%esi, %ebp), %mm6
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
movq %mm4, (%esi)
|
|
kusano |
2b45e8 |
movq %mm6, (%esi, %ebp)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if (defined(TRMMKERNEL) && defined(LEFT) && defined(TRANSA)) || \
|
|
kusano |
2b45e8 |
(defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
subl KKK, %eax
|
|
kusano |
2b45e8 |
leal (,%eax, SIZE), %eax
|
|
kusano |
2b45e8 |
leal (AA, %eax, 2), AA
|
|
kusano |
2b45e8 |
leal (BB, %eax, 8), BB
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(TRMMKERNEL) && defined(LEFT)
|
|
kusano |
2b45e8 |
addl $1, KK
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $2 * SIZE, %esi
|
|
kusano |
2b45e8 |
decl %ebx
|
|
kusano |
2b45e8 |
jg .L11
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L19:
|
|
kusano |
2b45e8 |
#if defined(TRMMKERNEL) && !defined(LEFT)
|
|
kusano |
2b45e8 |
addl $2, KK
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
leal (, %ebp, 2), %eax
|
|
kusano |
2b45e8 |
addl %eax, C # c += ldc
|
|
kusano |
2b45e8 |
decl J # j --
|
|
kusano |
2b45e8 |
jg .L01
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L20:
|
|
kusano |
2b45e8 |
movl N, %eax
|
|
kusano |
2b45e8 |
andl $1, %eax
|
|
kusano |
2b45e8 |
jle .L999
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L21:
|
|
kusano |
2b45e8 |
/* Copying to Sub Buffer */
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
leal BUFFER, BB
|
|
kusano |
2b45e8 |
sarl $2, %eax
|
|
kusano |
2b45e8 |
jle .L25
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L22:
|
|
kusano |
2b45e8 |
movd 0 * SIZE(%edi), %mm0
|
|
kusano |
2b45e8 |
movd 1 * SIZE(%edi), %mm1
|
|
kusano |
2b45e8 |
movd 2 * SIZE(%edi), %mm2
|
|
kusano |
2b45e8 |
movd 3 * SIZE(%edi), %mm3
|
|
kusano |
2b45e8 |
movd 4 * SIZE(%edi), %mm4
|
|
kusano |
2b45e8 |
movd 5 * SIZE(%edi), %mm5
|
|
kusano |
2b45e8 |
movd 6 * SIZE(%edi), %mm6
|
|
kusano |
2b45e8 |
movd 7 * SIZE(%edi), %mm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
prefetchnta 72 * SIZE(%edi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
punpckldq %mm0, %mm0
|
|
kusano |
2b45e8 |
punpckldq %mm1, %mm1
|
|
kusano |
2b45e8 |
punpckldq %mm2, %mm2
|
|
kusano |
2b45e8 |
punpckldq %mm3, %mm3
|
|
kusano |
2b45e8 |
punpckldq %mm4, %mm4
|
|
kusano |
2b45e8 |
punpckldq %mm5, %mm5
|
|
kusano |
2b45e8 |
punpckldq %mm6, %mm6
|
|
kusano |
2b45e8 |
punpckldq %mm7, %mm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq %mm0, 0 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm1, 2 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm2, 4 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm3, 6 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm4, 8 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm5, 10 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm6, 12 * SIZE(BB)
|
|
kusano |
2b45e8 |
movq %mm7, 14 * SIZE(BB)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $ 8 * SIZE, %edi
|
|
kusano |
2b45e8 |
addl $16 * SIZE, BB
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jne .L22
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L25:
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
andl $3, %eax
|
|
kusano |
2b45e8 |
BRANCH
|
|
kusano |
2b45e8 |
jle .L30
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L26:
|
|
kusano |
2b45e8 |
movd 0 * SIZE(%edi), %mm0
|
|
kusano |
2b45e8 |
movd 1 * SIZE(%edi), %mm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movd %mm0, 0 * SIZE(BB)
|
|
kusano |
2b45e8 |
movd %mm0, 1 * SIZE(BB)
|
|
kusano |
2b45e8 |
movd %mm1, 2 * SIZE(BB)
|
|
kusano |
2b45e8 |
movd %mm1, 3 * SIZE(BB)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $2 * SIZE, %edi
|
|
kusano |
2b45e8 |
addl $4 * SIZE, BB
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jne .L26
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L30:
|
|
kusano |
2b45e8 |
#if defined(TRMMKERNEL) && defined(LEFT)
|
|
kusano |
2b45e8 |
movl OFFSET, %eax
|
|
kusano |
2b45e8 |
movl %eax, KK
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl C, %esi # coffset = c
|
|
kusano |
2b45e8 |
movl A, AA # aoffset = a
|
|
kusano |
2b45e8 |
movl M, %ebx
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L31:
|
|
kusano |
2b45e8 |
leal - BOFFSET * SIZE + BUFFER, BB
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if !defined(TRMMKERNEL) || \
|
|
kusano |
2b45e8 |
(defined(TRMMKERNEL) && defined(LEFT) && defined(TRANSA)) || \
|
|
kusano |
2b45e8 |
(defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
movl KK, %eax
|
|
kusano |
2b45e8 |
leal (, %eax, SIZE), %eax
|
|
kusano |
2b45e8 |
leal (AA, %eax, 2), AA
|
|
kusano |
2b45e8 |
leal (BB, %eax, 4), BB
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq ( 0 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
pxor %mm4, %mm4
|
|
kusano |
2b45e8 |
movq ( 16 + AOFFSET) * SIZE(AA), %mm1
|
|
kusano |
2b45e8 |
pxor %mm5, %mm5
|
|
kusano |
2b45e8 |
PADDING movq ( 0 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pxor %mm6, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 16 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pxor %mm7, %mm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
prefetchw 2 * SIZE(%esi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef TRMMKERNEL
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
#elif (defined(LEFT) && !defined(TRANSA)) || (!defined(LEFT) && defined(TRANSA))
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
subl KK, %eax
|
|
kusano |
2b45e8 |
movl %eax, KKK
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
movl KK, %eax
|
|
kusano |
2b45e8 |
#ifdef LEFT
|
|
kusano |
2b45e8 |
addl $1, %eax
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
addl $1, %eax
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
movl %eax, KKK
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
sarl $4, %eax
|
|
kusano |
2b45e8 |
je .L35
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L32:
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 4 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul ( 2 + BOFFSET) * SIZE(BB), %mm0
|
|
kusano |
2b45e8 |
pfadd %mm0, %mm5
|
|
kusano |
2b45e8 |
movq ( 2 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PADDING prefetch (PREFETCHSIZE + 0) * SIZE(AA)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 8 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul ( 6 + BOFFSET) * SIZE(BB), %mm0
|
|
kusano |
2b45e8 |
pfadd %mm0, %mm7
|
|
kusano |
2b45e8 |
movq ( 4 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 12 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul ( 10 + BOFFSET) * SIZE(BB), %mm0
|
|
kusano |
2b45e8 |
pfadd %mm0, %mm5
|
|
kusano |
2b45e8 |
movq ( 6 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 32 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul ( 14 + BOFFSET) * SIZE(BB), %mm0
|
|
kusano |
2b45e8 |
pfadd %mm0, %mm7
|
|
kusano |
2b45e8 |
movq ( 8 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 20 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul ( 18 + BOFFSET) * SIZE(BB), %mm0
|
|
kusano |
2b45e8 |
pfadd %mm0, %mm5
|
|
kusano |
2b45e8 |
movq ( 10 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 24 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul ( 22 + BOFFSET) * SIZE(BB), %mm0
|
|
kusano |
2b45e8 |
pfadd %mm0, %mm7
|
|
kusano |
2b45e8 |
movq ( 12 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 28 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul ( 26 + BOFFSET) * SIZE(BB), %mm0
|
|
kusano |
2b45e8 |
pfadd %mm0, %mm5
|
|
kusano |
2b45e8 |
movq ( 14 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 48 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul ( 30 + BOFFSET) * SIZE(BB), %mm0
|
|
kusano |
2b45e8 |
pfadd %mm0, %mm7
|
|
kusano |
2b45e8 |
movq ( 32 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 36 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul ( 34 + BOFFSET) * SIZE(BB), %mm1
|
|
kusano |
2b45e8 |
pfadd %mm1, %mm5
|
|
kusano |
2b45e8 |
movq ( 18 + AOFFSET) * SIZE(AA), %mm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 40 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul ( 38 + BOFFSET) * SIZE(BB), %mm1
|
|
kusano |
2b45e8 |
pfadd %mm1, %mm7
|
|
kusano |
2b45e8 |
movq ( 20 + AOFFSET) * SIZE(AA), %mm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 44 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul ( 42 + BOFFSET) * SIZE(BB), %mm1
|
|
kusano |
2b45e8 |
pfadd %mm1, %mm5
|
|
kusano |
2b45e8 |
movq ( 22 + AOFFSET) * SIZE(AA), %mm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 64 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
pfmul ( 46 + BOFFSET) * SIZE(BB), %mm1
|
|
kusano |
2b45e8 |
pfadd %mm1, %mm7
|
|
kusano |
2b45e8 |
movq ( 24 + AOFFSET) * SIZE(AA), %mm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 52 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul ( 50 + BOFFSET) * SIZE(BB), %mm1
|
|
kusano |
2b45e8 |
pfadd %mm1, %mm5
|
|
kusano |
2b45e8 |
movq ( 26 + AOFFSET) * SIZE(AA), %mm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 56 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul ( 54 + BOFFSET) * SIZE(BB), %mm1
|
|
kusano |
2b45e8 |
pfadd %mm1, %mm7
|
|
kusano |
2b45e8 |
movq ( 28 + AOFFSET) * SIZE(AA), %mm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 60 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul ( 58 + BOFFSET) * SIZE(BB), %mm1
|
|
kusano |
2b45e8 |
pfadd %mm1, %mm5
|
|
kusano |
2b45e8 |
movq ( 30 + AOFFSET) * SIZE(AA), %mm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul %mm1, %mm3
|
|
kusano |
2b45e8 |
pfadd %mm3, %mm6
|
|
kusano |
2b45e8 |
PADDING movq ( 80 + BOFFSET) * SIZE(BB), %mm3
|
|
kusano |
2b45e8 |
pfmul ( 62 + BOFFSET) * SIZE(BB), %mm1
|
|
kusano |
2b45e8 |
pfadd %mm1, %mm7
|
|
kusano |
2b45e8 |
movq ( 48 + AOFFSET) * SIZE(AA), %mm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
subl $-32 * SIZE, AA
|
|
kusano |
2b45e8 |
addl $ 64 * SIZE, BB
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jne .L32
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L35:
|
|
kusano |
2b45e8 |
#ifndef TRMMKERNEL
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
movl KKK, %eax
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
andl $15, %eax # if (k & 1)
|
|
kusano |
2b45e8 |
BRANCH
|
|
kusano |
2b45e8 |
je .L38
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L36:
|
|
kusano |
2b45e8 |
pfmul %mm0, %mm2
|
|
kusano |
2b45e8 |
pfadd %mm2, %mm4
|
|
kusano |
2b45e8 |
PADDING movq ( 4 + BOFFSET) * SIZE(BB), %mm2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul ( 2 + BOFFSET) * SIZE(BB), %mm0
|
|
kusano |
2b45e8 |
pfadd %mm0, %mm5
|
|
kusano |
2b45e8 |
movq ( 2 + AOFFSET) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $2 * SIZE, AA
|
|
kusano |
2b45e8 |
addl $4 * SIZE, BB
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jg .L36
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L38:
|
|
kusano |
2b45e8 |
pfadd %mm6, %mm4
|
|
kusano |
2b45e8 |
pfadd %mm7, %mm5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq ALPHA, %mm2
|
|
kusano |
2b45e8 |
pswapd %mm5, %mm5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfmul GAMMA_R, %mm4
|
|
kusano |
2b45e8 |
pfmul GAMMA_I, %mm5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pfadd %mm5, %mm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pswapd %mm4, %mm5
|
|
kusano |
2b45e8 |
pfmul %mm2, %mm4
|
|
kusano |
2b45e8 |
pfmul %mm2, %mm5
|
|
kusano |
2b45e8 |
pfpnacc %mm5, %mm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef TRMMKERNEL
|
|
kusano |
2b45e8 |
pfadd 0 * SIZE(%esi), %mm4
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
movq %mm4, 0 * SIZE(%esi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if (defined(TRMMKERNEL) && defined(LEFT) && defined(TRANSA)) || \
|
|
kusano |
2b45e8 |
(defined(TRMMKERNEL) && !defined(LEFT) && !defined(TRANSA))
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
subl KKK, %eax
|
|
kusano |
2b45e8 |
leal (,%eax, SIZE), %eax
|
|
kusano |
2b45e8 |
leal (AA, %eax, 2), AA
|
|
kusano |
2b45e8 |
leal (BB, %eax, 4), BB
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(TRMMKERNEL) && defined(LEFT)
|
|
kusano |
2b45e8 |
addl $1, KK
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $2 * SIZE, %esi # coffset += 4
|
|
kusano |
2b45e8 |
decl %ebx # i --
|
|
kusano |
2b45e8 |
jg .L31
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L999:
|
|
kusano |
2b45e8 |
EMMS
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl OLD_STACK, %esp
|
|
kusano |
2b45e8 |
popl %ebx
|
|
kusano |
2b45e8 |
popl %esi
|
|
kusano |
2b45e8 |
popl %edi
|
|
kusano |
2b45e8 |
popl %ebp
|
|
kusano |
2b45e8 |
ret
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
EPILOGUE
|