|
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(HAVE_SSE2) || !defined(HAVE_MMX)
|
|
kusano |
2b45e8 |
#error You have to check your configuration.
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define STACK 16
|
|
kusano |
2b45e8 |
#define ARGS 0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define STACK_M 4 + STACK + ARGS(%esi)
|
|
kusano |
2b45e8 |
#define STACK_N 8 + STACK + ARGS(%esi)
|
|
kusano |
2b45e8 |
#define STACK_K 12 + STACK + ARGS(%esi)
|
|
kusano |
2b45e8 |
#define STACK_ALPHA 16 + STACK + ARGS(%esi)
|
|
kusano |
2b45e8 |
#define STACK_A 24 + STACK + ARGS(%esi)
|
|
kusano |
2b45e8 |
#define STACK_B 28 + STACK + ARGS(%esi)
|
|
kusano |
2b45e8 |
#define STACK_C 32 + STACK + ARGS(%esi)
|
|
kusano |
2b45e8 |
#define STACK_LDC 36 + STACK + ARGS(%esi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define ALPHA 0(%esp)
|
|
kusano |
2b45e8 |
#define K 16(%esp)
|
|
kusano |
2b45e8 |
#define N 20(%esp)
|
|
kusano |
2b45e8 |
#define M 24(%esp)
|
|
kusano |
2b45e8 |
#define A 28(%esp)
|
|
kusano |
2b45e8 |
#define C 36(%esp)
|
|
kusano |
2b45e8 |
#define J 44(%esp)
|
|
kusano |
2b45e8 |
#define OLD_STACK 48(%esp)
|
|
kusano |
2b45e8 |
#define BUFFER 128(%esp)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define B %edi
|
|
kusano |
2b45e8 |
#define LDC %ebp
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define STACK_ALIGN 4096
|
|
kusano |
2b45e8 |
#define STACK_OFFSET 1024
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define AA %edx
|
|
kusano |
2b45e8 |
#define BB %ecx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define KERNELMACRO(address) \
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm2; \
|
|
kusano |
2b45e8 |
mulpd 2 * SIZE + (address) * SIZE(BB), %xmm0; \
|
|
kusano |
2b45e8 |
addpd %xmm2, %xmm4; \
|
|
kusano |
2b45e8 |
movapd 0 * SIZE + (address) * SIZE(BB), %xmm2; \
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm5; \
|
|
kusano |
2b45e8 |
movapd 2 * SIZE + (address) * SIZE(AA), %xmm0; \
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm2; \
|
|
kusano |
2b45e8 |
mulpd 2 * SIZE + (address) * SIZE(BB), %xmm0; \
|
|
kusano |
2b45e8 |
addpd %xmm2, %xmm6; \
|
|
kusano |
2b45e8 |
movapd 4 * SIZE + (address) * SIZE(BB), %xmm2; \
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm7; \
|
|
kusano |
2b45e8 |
movapd 4 * SIZE + (address) * SIZE(AA), %xmm0; \
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm2; \
|
|
kusano |
2b45e8 |
mulpd 6 * SIZE + (address) * SIZE(BB), %xmm0; \
|
|
kusano |
2b45e8 |
addpd %xmm2, %xmm4; \
|
|
kusano |
2b45e8 |
movapd 4 * SIZE + (address) * SIZE(BB), %xmm2; \
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm5; \
|
|
kusano |
2b45e8 |
movapd 6 * SIZE + (address) * SIZE(AA), %xmm0; \
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm2; \
|
|
kusano |
2b45e8 |
mulpd 6 * SIZE + (address) * SIZE(BB), %xmm0; \
|
|
kusano |
2b45e8 |
addpd %xmm2, %xmm6; \
|
|
kusano |
2b45e8 |
movapd 16 * SIZE + (address) * SIZE(BB), %xmm2; \
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm7; \
|
|
kusano |
2b45e8 |
movapd 16 * SIZE + (address) * SIZE(AA), %xmm0; \
|
|
kusano |
2b45e8 |
mulpd %xmm1, %xmm3; \
|
|
kusano |
2b45e8 |
mulpd 10 * SIZE + (address) * SIZE(BB), %xmm1; \
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm4; \
|
|
kusano |
2b45e8 |
movapd 8 * SIZE + (address) * SIZE(BB), %xmm3; \
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm5; \
|
|
kusano |
2b45e8 |
movapd 10 * SIZE + (address) * SIZE(AA), %xmm1; \
|
|
kusano |
2b45e8 |
mulpd %xmm1, %xmm3; \
|
|
kusano |
2b45e8 |
mulpd 10 * SIZE + (address) * SIZE(BB), %xmm1; \
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm6; \
|
|
kusano |
2b45e8 |
movapd 12 * SIZE + (address) * SIZE(BB), %xmm3; \
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm7; \
|
|
kusano |
2b45e8 |
movapd 12 * SIZE + (address) * SIZE(AA), %xmm1; \
|
|
kusano |
2b45e8 |
mulpd %xmm1, %xmm3; \
|
|
kusano |
2b45e8 |
mulpd 14 * SIZE + (address) * SIZE(BB), %xmm1; \
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm4; \
|
|
kusano |
2b45e8 |
movapd 12 * SIZE + (address) * SIZE(BB), %xmm3; \
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm5; \
|
|
kusano |
2b45e8 |
movapd 14 * SIZE + (address) * SIZE(AA), %xmm1; \
|
|
kusano |
2b45e8 |
mulpd %xmm1, %xmm3; \
|
|
kusano |
2b45e8 |
mulpd 14 * SIZE + (address) * SIZE(BB), %xmm1; \
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm6; \
|
|
kusano |
2b45e8 |
movapd 24 * SIZE + (address) * SIZE(BB), %xmm3; \
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm7; \
|
|
kusano |
2b45e8 |
movapd 24 * SIZE + (address) * SIZE(AA), %xmm1; \
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm2; \
|
|
kusano |
2b45e8 |
mulpd 18 * SIZE + (address) * SIZE(BB), %xmm0; \
|
|
kusano |
2b45e8 |
addpd %xmm2, %xmm4; \
|
|
kusano |
2b45e8 |
movapd 16 * SIZE + (address) * SIZE(BB), %xmm2; \
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm5; \
|
|
kusano |
2b45e8 |
movapd 18 * SIZE + (address) * SIZE(AA), %xmm0; \
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm2; \
|
|
kusano |
2b45e8 |
mulpd 18 * SIZE + (address) * SIZE(BB), %xmm0; \
|
|
kusano |
2b45e8 |
addpd %xmm2, %xmm6; \
|
|
kusano |
2b45e8 |
movapd 20 * SIZE + (address) * SIZE(BB), %xmm2; \
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm7; \
|
|
kusano |
2b45e8 |
movapd 20 * SIZE + (address) * SIZE(AA), %xmm0; \
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm2; \
|
|
kusano |
2b45e8 |
mulpd 22 * SIZE + (address) * SIZE(BB), %xmm0; \
|
|
kusano |
2b45e8 |
addpd %xmm2, %xmm4; \
|
|
kusano |
2b45e8 |
movapd 20 * SIZE + (address) * SIZE(BB), %xmm2; \
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm5; \
|
|
kusano |
2b45e8 |
movapd 22 * SIZE + (address) * SIZE(AA), %xmm0; \
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm2; \
|
|
kusano |
2b45e8 |
mulpd 22 * SIZE + (address) * SIZE(BB), %xmm0; \
|
|
kusano |
2b45e8 |
addpd %xmm2, %xmm6; \
|
|
kusano |
2b45e8 |
movapd 32 * SIZE + (address) * SIZE(BB), %xmm2; \
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm7; \
|
|
kusano |
2b45e8 |
movapd 32 * SIZE + (address) * SIZE(AA), %xmm0; \
|
|
kusano |
2b45e8 |
mulpd %xmm1, %xmm3; \
|
|
kusano |
2b45e8 |
mulpd 26 * SIZE + (address) * SIZE(BB), %xmm1; \
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm4; \
|
|
kusano |
2b45e8 |
movapd 24 * SIZE + (address) * SIZE(BB), %xmm3; \
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm5; \
|
|
kusano |
2b45e8 |
movapd 26 * SIZE + (address) * SIZE(AA), %xmm1; \
|
|
kusano |
2b45e8 |
mulpd %xmm1, %xmm3; \
|
|
kusano |
2b45e8 |
mulpd 26 * SIZE + (address) * SIZE(BB), %xmm1; \
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm6; \
|
|
kusano |
2b45e8 |
movapd 28 * SIZE + (address) * SIZE(BB), %xmm3; \
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm7; \
|
|
kusano |
2b45e8 |
movapd 28 * SIZE + (address) * SIZE(AA), %xmm1; \
|
|
kusano |
2b45e8 |
mulpd %xmm1, %xmm3; \
|
|
kusano |
2b45e8 |
mulpd 30 * SIZE + (address) * SIZE(BB), %xmm1; \
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm4; \
|
|
kusano |
2b45e8 |
movapd 28 * SIZE + (address) * SIZE(BB), %xmm3; \
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm5; \
|
|
kusano |
2b45e8 |
movapd 30 * SIZE + (address) * SIZE(AA), %xmm1; \
|
|
kusano |
2b45e8 |
mulpd %xmm1, %xmm3; \
|
|
kusano |
2b45e8 |
mulpd 30 * SIZE + (address) * SIZE(BB), %xmm1; \
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm6; \
|
|
kusano |
2b45e8 |
movapd 40 * SIZE + (address) * SIZE(BB), %xmm3; \
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm7; \
|
|
kusano |
2b45e8 |
movapd 40 * SIZE + (address) * SIZE(AA), %xmm1
|
|
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 |
EMMS
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl %esp, %esi # save old stack
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
subl $128 + LOCAL_BUFFER_SIZE + STACK_OFFSET, %esp
|
|
kusano |
2b45e8 |
andl $-STACK_ALIGN, %esp
|
|
kusano |
2b45e8 |
addl $STACK_OFFSET, %esp
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
STACK_TOUCHING
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movd STACK_M, %mm0
|
|
kusano |
2b45e8 |
movl STACK_N, %eax
|
|
kusano |
2b45e8 |
movd STACK_K, %mm1
|
|
kusano |
2b45e8 |
movd STACK_A, %mm2
|
|
kusano |
2b45e8 |
movq STACK_ALPHA, %mm7
|
|
kusano |
2b45e8 |
movl STACK_B, B
|
|
kusano |
2b45e8 |
movd STACK_C, %mm3
|
|
kusano |
2b45e8 |
movl STACK_LDC, LDC
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq %mm7, 0 * SIZE + ALPHA
|
|
kusano |
2b45e8 |
movq %mm7, 1 * SIZE + ALPHA
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movd %mm1, K
|
|
kusano |
2b45e8 |
movl %eax, N
|
|
kusano |
2b45e8 |
movd %mm0, M
|
|
kusano |
2b45e8 |
movd %mm2, A
|
|
kusano |
2b45e8 |
movd %mm3, C
|
|
kusano |
2b45e8 |
movl %esi, OLD_STACK
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
leal (, LDC, SIZE), LDC
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
test %eax, %eax
|
|
kusano |
2b45e8 |
movl %eax, J
|
|
kusano |
2b45e8 |
jle .L999
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L01:
|
|
kusano |
2b45e8 |
/* Copying to Sub Buffer */
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
leal BUFFER, %ecx
|
|
kusano |
2b45e8 |
sarl $3, %eax
|
|
kusano |
2b45e8 |
jle .L03
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L02:
|
|
kusano |
2b45e8 |
prefetchnta 96 * SIZE(B)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(B), %xmm0
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(B), %xmm1
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(B), %xmm2
|
|
kusano |
2b45e8 |
movsd 3 * SIZE(B), %xmm3
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(B), %xmm4
|
|
kusano |
2b45e8 |
movsd 5 * SIZE(B), %xmm5
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(B), %xmm6
|
|
kusano |
2b45e8 |
movsd 7 * SIZE(B), %xmm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
unpcklpd %xmm0, %xmm0
|
|
kusano |
2b45e8 |
unpcklpd %xmm1, %xmm1
|
|
kusano |
2b45e8 |
unpcklpd %xmm2, %xmm2
|
|
kusano |
2b45e8 |
unpcklpd %xmm3, %xmm3
|
|
kusano |
2b45e8 |
unpcklpd %xmm4, %xmm4
|
|
kusano |
2b45e8 |
unpcklpd %xmm5, %xmm5
|
|
kusano |
2b45e8 |
unpcklpd %xmm6, %xmm6
|
|
kusano |
2b45e8 |
unpcklpd %xmm7, %xmm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd %xmm0, 0 * SIZE(%ecx)
|
|
kusano |
2b45e8 |
movapd %xmm1, 2 * SIZE(%ecx)
|
|
kusano |
2b45e8 |
movapd %xmm2, 4 * SIZE(%ecx)
|
|
kusano |
2b45e8 |
movapd %xmm3, 6 * SIZE(%ecx)
|
|
kusano |
2b45e8 |
movapd %xmm4, 8 * SIZE(%ecx)
|
|
kusano |
2b45e8 |
movapd %xmm5, 10 * SIZE(%ecx)
|
|
kusano |
2b45e8 |
movapd %xmm6, 12 * SIZE(%ecx)
|
|
kusano |
2b45e8 |
movapd %xmm7, 14 * SIZE(%ecx)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $ 8 * SIZE, B
|
|
kusano |
2b45e8 |
addl $16 * SIZE, %ecx
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
BRANCH
|
|
kusano |
2b45e8 |
jne .L02
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L03:
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
andl $7, %eax
|
|
kusano |
2b45e8 |
BRANCH
|
|
kusano |
2b45e8 |
jle .L05
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L04:
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(B), %xmm0
|
|
kusano |
2b45e8 |
unpcklpd %xmm0, %xmm0
|
|
kusano |
2b45e8 |
movapd %xmm0, 0 * SIZE(%ecx)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $1 * SIZE, B
|
|
kusano |
2b45e8 |
addl $2 * SIZE, %ecx
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jne .L04
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L05:
|
|
kusano |
2b45e8 |
movl C, %esi # coffset = c
|
|
kusano |
2b45e8 |
movl A, %edx # aoffset = a
|
|
kusano |
2b45e8 |
movl M, %ebx
|
|
kusano |
2b45e8 |
sarl $3, %ebx # i = (m >> 2)
|
|
kusano |
2b45e8 |
jle .L20
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L10:
|
|
kusano |
2b45e8 |
leal BUFFER, %ecx # boffset1 = boffset // different point
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 0 * SIZE + BUFFER, %xmm2
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(%edx), %xmm0
|
|
kusano |
2b45e8 |
movapd 8 * SIZE + BUFFER, %xmm3
|
|
kusano |
2b45e8 |
movapd 8 * SIZE(%edx), %xmm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pxor %xmm4, %xmm4
|
|
kusano |
2b45e8 |
pxor %xmm5, %xmm5
|
|
kusano |
2b45e8 |
pxor %xmm6, %xmm6
|
|
kusano |
2b45e8 |
pxor %xmm7, %xmm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if 0
|
|
kusano |
2b45e8 |
andl $-8, %eax
|
|
kusano |
2b45e8 |
leal (, %eax, 8), %eax
|
|
kusano |
2b45e8 |
je .L12
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
KERNELMACRO(32 * 0) # 0
|
|
kusano |
2b45e8 |
cmpl $64 * 1, %eax
|
|
kusano |
2b45e8 |
jle .L11
|
|
kusano |
2b45e8 |
KERNELMACRO(32 * 1) # 1
|
|
kusano |
2b45e8 |
cmpl $64 * 2, %eax
|
|
kusano |
2b45e8 |
jle .L11
|
|
kusano |
2b45e8 |
KERNELMACRO(32 * 2) # 2
|
|
kusano |
2b45e8 |
cmpl $64 * 3, %eax
|
|
kusano |
2b45e8 |
jle .L11
|
|
kusano |
2b45e8 |
KERNELMACRO(32 * 3) # 3
|
|
kusano |
2b45e8 |
cmpl $64 * 4, %eax
|
|
kusano |
2b45e8 |
jle .L11
|
|
kusano |
2b45e8 |
KERNELMACRO(32 * 4) # 4
|
|
kusano |
2b45e8 |
cmpl $64 * 5, %eax
|
|
kusano |
2b45e8 |
jle .L11
|
|
kusano |
2b45e8 |
KERNELMACRO(32 * 5) # 5
|
|
kusano |
2b45e8 |
cmpl $64 * 6, %eax
|
|
kusano |
2b45e8 |
jle .L11
|
|
kusano |
2b45e8 |
KERNELMACRO(32 * 6) # 6
|
|
kusano |
2b45e8 |
cmpl $64 * 7, %eax
|
|
kusano |
2b45e8 |
jle .L11
|
|
kusano |
2b45e8 |
KERNELMACRO(32 * 7) # 7
|
|
kusano |
2b45e8 |
cmpl $64 * 8, %eax
|
|
kusano |
2b45e8 |
jle .L11
|
|
kusano |
2b45e8 |
KERNELMACRO(32 * 8) # 8
|
|
kusano |
2b45e8 |
cmpl $64 * 9, %eax
|
|
kusano |
2b45e8 |
jle .L11
|
|
kusano |
2b45e8 |
KERNELMACRO(32 * 9) # 9
|
|
kusano |
2b45e8 |
cmpl $64 * 10, %eax
|
|
kusano |
2b45e8 |
jle .L11
|
|
kusano |
2b45e8 |
KERNELMACRO(32 * 10) # 10
|
|
kusano |
2b45e8 |
cmpl $64 * 11, %eax
|
|
kusano |
2b45e8 |
jle .L11
|
|
kusano |
2b45e8 |
KERNELMACRO(32 * 11) # 11
|
|
kusano |
2b45e8 |
cmpl $64 * 12, %eax
|
|
kusano |
2b45e8 |
jle .L11
|
|
kusano |
2b45e8 |
KERNELMACRO(32 * 12) # 12
|
|
kusano |
2b45e8 |
cmpl $64 * 13, %eax
|
|
kusano |
2b45e8 |
jle .L11
|
|
kusano |
2b45e8 |
KERNELMACRO(32 * 13) # 13
|
|
kusano |
2b45e8 |
cmpl $64 * 14, %eax
|
|
kusano |
2b45e8 |
jle .L11
|
|
kusano |
2b45e8 |
KERNELMACRO(32 * 14) # 14
|
|
kusano |
2b45e8 |
cmpl $64 * 15, %eax
|
|
kusano |
2b45e8 |
jle .L11
|
|
kusano |
2b45e8 |
movq 1 * SIZE(%esi), %mm0
|
|
kusano |
2b45e8 |
movq 1 * SIZE(%esi, LDC), %mm1
|
|
kusano |
2b45e8 |
KERNELMACRO(32 * 15) # 15
|
|
kusano |
2b45e8 |
.L11:
|
|
kusano |
2b45e8 |
leal (%edx, %eax, 4), %edx
|
|
kusano |
2b45e8 |
leal (%ecx, %eax, 4), %ecx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 8 * SIZE(BB), %xmm2
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
movapd 8 * SIZE(AA), %xmm3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
prefetchnta 8 * SIZE(%esi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
sarl $3, %eax
|
|
kusano |
2b45e8 |
je .L12
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define PRE 40
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L11:
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
movd (PRE + 0) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
movapd 2 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm5
|
|
kusano |
2b45e8 |
movapd 4 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
mulpd 6 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm6
|
|
kusano |
2b45e8 |
movapd 16 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
movd (PRE + 8) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm7
|
|
kusano |
2b45e8 |
movapd 2 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm3
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm4
|
|
kusano |
2b45e8 |
movapd 10 * SIZE(AA), %xmm3
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm3
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm5
|
|
kusano |
2b45e8 |
movapd 12 * SIZE(AA), %xmm3
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm3
|
|
kusano |
2b45e8 |
mulpd 14 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm6
|
|
kusano |
2b45e8 |
movapd 24 * SIZE(AA), %xmm3
|
|
kusano |
2b45e8 |
movd (PRE + 16) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm7
|
|
kusano |
2b45e8 |
movapd 4 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
movapd 18 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm5
|
|
kusano |
2b45e8 |
movapd 20 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
mulpd 22 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm6
|
|
kusano |
2b45e8 |
movapd 32 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
movd (PRE + 24) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm7
|
|
kusano |
2b45e8 |
movapd 6 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm3
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm4
|
|
kusano |
2b45e8 |
movapd 26 * SIZE(AA), %xmm3
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm3
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm5
|
|
kusano |
2b45e8 |
movapd 28 * SIZE(AA), %xmm3
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm3
|
|
kusano |
2b45e8 |
mulpd 30 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm6
|
|
kusano |
2b45e8 |
movapd 40 * SIZE(AA), %xmm3
|
|
kusano |
2b45e8 |
movd (PRE + 32) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm7
|
|
kusano |
2b45e8 |
movapd 16 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
mulpd %xmm2, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
movapd 34 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm2, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm5
|
|
kusano |
2b45e8 |
movapd 36 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm2, %xmm1
|
|
kusano |
2b45e8 |
mulpd 38 * SIZE(AA), %xmm2
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm6
|
|
kusano |
2b45e8 |
movapd 48 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
movd (PRE + 40) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
addpd %xmm2, %xmm7
|
|
kusano |
2b45e8 |
movapd 10 * SIZE(BB), %xmm2
|
|
kusano |
2b45e8 |
mulpd %xmm2, %xmm3
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm4
|
|
kusano |
2b45e8 |
movapd 42 * SIZE(AA), %xmm3
|
|
kusano |
2b45e8 |
mulpd %xmm2, %xmm3
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm5
|
|
kusano |
2b45e8 |
movapd 44 * SIZE(AA), %xmm3
|
|
kusano |
2b45e8 |
mulpd %xmm2, %xmm3
|
|
kusano |
2b45e8 |
mulpd 46 * SIZE(AA), %xmm2
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm6
|
|
kusano |
2b45e8 |
movapd 56 * SIZE(AA), %xmm3
|
|
kusano |
2b45e8 |
movd (PRE + 48) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
addpd %xmm2, %xmm7
|
|
kusano |
2b45e8 |
movapd 12 * SIZE(BB), %xmm2
|
|
kusano |
2b45e8 |
mulpd %xmm2, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
movapd 50 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm2, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm5
|
|
kusano |
2b45e8 |
movapd 52 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm2, %xmm1
|
|
kusano |
2b45e8 |
mulpd 54 * SIZE(AA), %xmm2
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm6
|
|
kusano |
2b45e8 |
movapd 64 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
movd (PRE + 56) * SIZE(AA), %mm0
|
|
kusano |
2b45e8 |
addpd %xmm2, %xmm7
|
|
kusano |
2b45e8 |
movapd 14 * SIZE(BB), %xmm2
|
|
kusano |
2b45e8 |
mulpd %xmm2, %xmm3
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm4
|
|
kusano |
2b45e8 |
movapd 58 * SIZE(AA), %xmm3
|
|
kusano |
2b45e8 |
mulpd %xmm2, %xmm3
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm5
|
|
kusano |
2b45e8 |
movapd 60 * SIZE(AA), %xmm3
|
|
kusano |
2b45e8 |
mulpd %xmm2, %xmm3
|
|
kusano |
2b45e8 |
mulpd 62 * SIZE(AA), %xmm2
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm6
|
|
kusano |
2b45e8 |
movapd 72 * SIZE(AA), %xmm3
|
|
kusano |
2b45e8 |
addpd %xmm2, %xmm7
|
|
kusano |
2b45e8 |
movapd 24 * SIZE(BB), %xmm2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $64 * SIZE, AA
|
|
kusano |
2b45e8 |
addl $16 * SIZE, BB
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jne .L11
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L12:
|
|
kusano |
2b45e8 |
movapd ALPHA, %xmm3
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
andl $7, %eax # if (k & 1)
|
|
kusano |
2b45e8 |
BRANCH
|
|
kusano |
2b45e8 |
je .L14
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L13:
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
movapd 2 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm5
|
|
kusano |
2b45e8 |
movapd 4 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm6
|
|
kusano |
2b45e8 |
mulpd 6 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $8 * SIZE, AA # aoffset += 8
|
|
kusano |
2b45e8 |
addl $2 * SIZE, BB # boffset1 += 8
|
|
kusano |
2b45e8 |
subl $1, %eax
|
|
kusano |
2b45e8 |
jg .L13
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L14:
|
|
kusano |
2b45e8 |
mulpd %xmm3, %xmm4
|
|
kusano |
2b45e8 |
mulpd %xmm3, %xmm5
|
|
kusano |
2b45e8 |
mulpd %xmm3, %xmm6
|
|
kusano |
2b45e8 |
mulpd %xmm3, %xmm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(%esi), %xmm0
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(%esi), %xmm0
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(%esi), %xmm1
|
|
kusano |
2b45e8 |
movhpd 3 * SIZE(%esi), %xmm1
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(%esi), %xmm2
|
|
kusano |
2b45e8 |
movhpd 5 * SIZE(%esi), %xmm2
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(%esi), %xmm3
|
|
kusano |
2b45e8 |
movhpd 7 * SIZE(%esi), %xmm3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm4
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm5
|
|
kusano |
2b45e8 |
addpd %xmm2, %xmm6
|
|
kusano |
2b45e8 |
addpd %xmm3, %xmm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd %xmm4, 0 * SIZE(%esi)
|
|
kusano |
2b45e8 |
movhpd %xmm4, 1 * SIZE(%esi)
|
|
kusano |
2b45e8 |
movsd %xmm5, 2 * SIZE(%esi)
|
|
kusano |
2b45e8 |
movhpd %xmm5, 3 * SIZE(%esi)
|
|
kusano |
2b45e8 |
movsd %xmm6, 4 * SIZE(%esi)
|
|
kusano |
2b45e8 |
movhpd %xmm6, 5 * SIZE(%esi)
|
|
kusano |
2b45e8 |
movsd %xmm7, 6 * SIZE(%esi)
|
|
kusano |
2b45e8 |
movhpd %xmm7, 7 * SIZE(%esi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $8 * SIZE, %esi # coffset += 4
|
|
kusano |
2b45e8 |
BRANCH
|
|
kusano |
2b45e8 |
decl %ebx # i --
|
|
kusano |
2b45e8 |
jg .L10
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L20:
|
|
kusano |
2b45e8 |
movl M, %ebx
|
|
kusano |
2b45e8 |
testl $4, %ebx
|
|
kusano |
2b45e8 |
jle .L30
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
leal BUFFER, %ecx
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 0 * SIZE + BUFFER, %xmm2
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(%edx), %xmm0
|
|
kusano |
2b45e8 |
movapd 8 * SIZE + BUFFER, %xmm3
|
|
kusano |
2b45e8 |
movapd 8 * SIZE(%edx), %xmm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pxor %xmm4, %xmm4
|
|
kusano |
2b45e8 |
pxor %xmm5, %xmm5
|
|
kusano |
2b45e8 |
pxor %xmm6, %xmm6
|
|
kusano |
2b45e8 |
pxor %xmm7, %xmm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
sarl $3, %eax
|
|
kusano |
2b45e8 |
je .L22
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L21:
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
mulpd 2 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 2 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 4 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
mulpd 6 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 4 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 8 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
mulpd 10 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 6 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 12 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
mulpd 14 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 8 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 16 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
mulpd 18 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 10 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 20 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
mulpd 22 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 12 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 24 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
mulpd 26 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 14 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 28 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
mulpd 30 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $32 * SIZE, AA
|
|
kusano |
2b45e8 |
addl $16 * SIZE, BB
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jne .L21
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L22:
|
|
kusano |
2b45e8 |
movapd ALPHA, %xmm3
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
andl $7, %eax
|
|
kusano |
2b45e8 |
BRANCH
|
|
kusano |
2b45e8 |
je .L24
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L23:
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
mulpd 2 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $4 * SIZE, AA # aoffset += 8
|
|
kusano |
2b45e8 |
addl $2 * SIZE, BB # boffset1 += 8
|
|
kusano |
2b45e8 |
subl $1, %eax
|
|
kusano |
2b45e8 |
jg .L23
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L24:
|
|
kusano |
2b45e8 |
mulpd %xmm3, %xmm4
|
|
kusano |
2b45e8 |
mulpd %xmm3, %xmm5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(%esi), %xmm0
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(%esi), %xmm0
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(%esi), %xmm1
|
|
kusano |
2b45e8 |
movhpd 3 * SIZE(%esi), %xmm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm4
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd %xmm4, 0 * SIZE(%esi)
|
|
kusano |
2b45e8 |
movhpd %xmm4, 1 * SIZE(%esi)
|
|
kusano |
2b45e8 |
movsd %xmm5, 2 * SIZE(%esi)
|
|
kusano |
2b45e8 |
movhpd %xmm5, 3 * SIZE(%esi)
|
|
kusano |
2b45e8 |
addl $4 * SIZE, %esi # coffset += 4
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L30:
|
|
kusano |
2b45e8 |
movl M, %ebx
|
|
kusano |
2b45e8 |
testl $2, %ebx
|
|
kusano |
2b45e8 |
jle .L50
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
leal BUFFER, %ecx
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 0 * SIZE + BUFFER, %xmm2
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
movapd 8 * SIZE + BUFFER, %xmm3
|
|
kusano |
2b45e8 |
movapd 8 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pxor %xmm4, %xmm4
|
|
kusano |
2b45e8 |
pxor %xmm5, %xmm5
|
|
kusano |
2b45e8 |
pxor %xmm6, %xmm6
|
|
kusano |
2b45e8 |
pxor %xmm7, %xmm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
sarl $3, %eax
|
|
kusano |
2b45e8 |
je .L32
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L31:
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 2 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 2 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 4 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 4 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 6 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 6 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 8 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 8 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 10 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 10 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 12 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 12 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 14 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 14 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $16 * SIZE, AA
|
|
kusano |
2b45e8 |
addl $16 * SIZE, BB
|
|
kusano |
2b45e8 |
BRANCH
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jne .L31
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L32:
|
|
kusano |
2b45e8 |
movapd ALPHA, %xmm3
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
andl $7, %eax # if (k & 1)
|
|
kusano |
2b45e8 |
BRANCH
|
|
kusano |
2b45e8 |
je .L34
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L33:
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
mulpd %xmm0, %xmm1
|
|
kusano |
2b45e8 |
addpd %xmm1, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $2 * SIZE, AA # aoffset += 8
|
|
kusano |
2b45e8 |
addl $2 * SIZE, BB # boffset1 += 8
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
BRANCH
|
|
kusano |
2b45e8 |
jg .L33
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L34:
|
|
kusano |
2b45e8 |
mulpd %xmm3, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(%esi), %xmm0
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(%esi), %xmm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addpd %xmm0, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd %xmm4, 0 * SIZE(%esi)
|
|
kusano |
2b45e8 |
movhpd %xmm4, 1 * SIZE(%esi)
|
|
kusano |
2b45e8 |
addl $2 * SIZE, %esi
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L50:
|
|
kusano |
2b45e8 |
movl M, %ebx
|
|
kusano |
2b45e8 |
testl $1, %ebx
|
|
kusano |
2b45e8 |
jle .L99
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
leal BUFFER, %ecx
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE + BUFFER, %xmm2
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
movsd 8 * SIZE + BUFFER, %xmm3
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(AA), %xmm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pxor %xmm4, %xmm4
|
|
kusano |
2b45e8 |
pxor %xmm5, %xmm5
|
|
kusano |
2b45e8 |
pxor %xmm6, %xmm6
|
|
kusano |
2b45e8 |
pxor %xmm7, %xmm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
sarl $3, %eax
|
|
kusano |
2b45e8 |
je .L52
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L51:
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
mulsd 0 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
addsd %xmm0, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
mulsd 2 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
addsd %xmm0, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
mulsd 4 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
addsd %xmm0, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 3 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
mulsd 6 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
addsd %xmm0, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
mulsd 8 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
addsd %xmm0, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 5 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
mulsd 10 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
addsd %xmm0, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
mulsd 12 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
addsd %xmm0, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 7 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
mulsd 14 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
addsd %xmm0, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $ 8 * SIZE, AA
|
|
kusano |
2b45e8 |
addl $16 * SIZE, BB
|
|
kusano |
2b45e8 |
BRANCH
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jne .L51
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L52:
|
|
kusano |
2b45e8 |
movsd ALPHA, %xmm3
|
|
kusano |
2b45e8 |
movl K, %eax
|
|
kusano |
2b45e8 |
andl $7, %eax # if (k & 1)
|
|
kusano |
2b45e8 |
BRANCH
|
|
kusano |
2b45e8 |
je .L54
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L53:
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(AA), %xmm0
|
|
kusano |
2b45e8 |
mulsd 0 * SIZE(BB), %xmm0
|
|
kusano |
2b45e8 |
addsd %xmm0, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $1 * SIZE, AA # aoffset += 8
|
|
kusano |
2b45e8 |
addl $2 * SIZE, BB # boffset1 += 8
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
BRANCH
|
|
kusano |
2b45e8 |
jg .L53
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L54:
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(%esi), %xmm0
|
|
kusano |
2b45e8 |
mulsd %xmm3, %xmm4
|
|
kusano |
2b45e8 |
addsd %xmm0, %xmm4
|
|
kusano |
2b45e8 |
movsd %xmm4, 0 * SIZE(%esi)
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L99:
|
|
kusano |
2b45e8 |
addl LDC, C
|
|
kusano |
2b45e8 |
decl J # j --
|
|
kusano |
2b45e8 |
jg .L01
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L999:
|
|
kusano |
2b45e8 |
movl OLD_STACK, %esp
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
EMMS
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
popl %ebx
|
|
kusano |
2b45e8 |
popl %esi
|
|
kusano |
2b45e8 |
popl %edi
|
|
kusano |
2b45e8 |
popl %ebp
|
|
kusano |
2b45e8 |
ret
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
EPILOGUE
|