|
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 |
#ifdef ATOM
|
|
kusano |
2b45e8 |
#define PREFETCH prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHW prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHSIZE (16 * 24)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef CORE2
|
|
kusano |
2b45e8 |
#define PREFETCH prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHW prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHSIZE (16 * 24)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(PENRYN) || defined(DUNNINGTON)
|
|
kusano |
2b45e8 |
#define PREFETCH prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHW prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHSIZE (16 * 24)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef NEHALEM
|
|
kusano |
2b45e8 |
#define PREFETCH prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHW prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHSIZE (16 * 24)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef PENTIUM4
|
|
kusano |
2b45e8 |
#define PREFETCH prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHW prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHSIZE (16 * 28)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef OPTERON
|
|
kusano |
2b45e8 |
#define PREFETCH prefetch
|
|
kusano |
2b45e8 |
#define PREFETCHW prefetchw
|
|
kusano |
2b45e8 |
#define PREFETCHSIZE (16 * 12)
|
|
kusano |
2b45e8 |
#define movsd movlpd
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(BARCELONA) || defined(SHANGHAI)
|
|
kusano |
2b45e8 |
#define PREFETCH prefetch
|
|
kusano |
2b45e8 |
#define PREFETCHW prefetchw
|
|
kusano |
2b45e8 |
#define PREFETCHSIZE (16 * 16)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef NANO
|
|
kusano |
2b45e8 |
#define PREFETCH prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHW prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHSIZE (8 * 24)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef GENERIC
|
|
kusano |
2b45e8 |
#define PREFETCH prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHW prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHSIZE (16 * 12)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef WINDOWS_ABI
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define STACKSIZE 80
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define OLD_Y 8 + STACKSIZE(%rsp)
|
|
kusano |
2b45e8 |
#define OLD_INCY 16 + STACKSIZE(%rsp)
|
|
kusano |
2b45e8 |
#define OLD_BUFFER 24 + STACKSIZE(%rsp)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define M ARG1
|
|
kusano |
2b45e8 |
#define N ARG2
|
|
kusano |
2b45e8 |
#define A ARG3
|
|
kusano |
2b45e8 |
#define LDA ARG4
|
|
kusano |
2b45e8 |
#define X ARG5
|
|
kusano |
2b45e8 |
#define INCX ARG6
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define STACKSIZE 256
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define OLD_A 40 + STACKSIZE(%rsp)
|
|
kusano |
2b45e8 |
#define OLD_LDA 48 + STACKSIZE(%rsp)
|
|
kusano |
2b45e8 |
#define OLD_X 56 + STACKSIZE(%rsp)
|
|
kusano |
2b45e8 |
#define OLD_INCX 64 + STACKSIZE(%rsp)
|
|
kusano |
2b45e8 |
#define OLD_Y 72 + STACKSIZE(%rsp)
|
|
kusano |
2b45e8 |
#define OLD_INCY 80 + STACKSIZE(%rsp)
|
|
kusano |
2b45e8 |
#define OLD_BUFFER 88 + STACKSIZE(%rsp)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define M ARG1
|
|
kusano |
2b45e8 |
#define N ARG2
|
|
kusano |
2b45e8 |
#define A ARG4
|
|
kusano |
2b45e8 |
#define LDA ARG3
|
|
kusano |
2b45e8 |
#define X %rdi
|
|
kusano |
2b45e8 |
#define INCX %rsi
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define Y %r10
|
|
kusano |
2b45e8 |
#define INCY %r11
|
|
kusano |
2b45e8 |
#define BUFFER %r12
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define TEMP %rax
|
|
kusano |
2b45e8 |
#define I %rax
|
|
kusano |
2b45e8 |
#define A1 %rbx
|
|
kusano |
2b45e8 |
#define A2 %rbp
|
|
kusano |
2b45e8 |
#define XX %r13
|
|
kusano |
2b45e8 |
#define YY %r14
|
|
kusano |
2b45e8 |
#define IS %r15
|
|
kusano |
2b45e8 |
#define NEW_X BUFFER
|
|
kusano |
2b45e8 |
#define NEW_Y X
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define ALPHA_R %xmm0
|
|
kusano |
2b45e8 |
#define ALPHA_I %xmm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define xtemp1 %xmm0
|
|
kusano |
2b45e8 |
#define xtemp2 %xmm1
|
|
kusano |
2b45e8 |
#define xtemp3 %xmm2
|
|
kusano |
2b45e8 |
#define xtemp4 %xmm3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define atemp1 %xmm4
|
|
kusano |
2b45e8 |
#define atemp2 %xmm5
|
|
kusano |
2b45e8 |
#define atemp3 %xmm6
|
|
kusano |
2b45e8 |
#define atemp4 %xmm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define xsum1 %xmm8
|
|
kusano |
2b45e8 |
#define xsum2 %xmm9
|
|
kusano |
2b45e8 |
#define yy1 %xmm10
|
|
kusano |
2b45e8 |
#define yy2 %xmm11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define a1 %xmm12
|
|
kusano |
2b45e8 |
#define a2 %xmm13
|
|
kusano |
2b45e8 |
#define a3 %xmm14
|
|
kusano |
2b45e8 |
#define xt1 %xmm15
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if (defined(HAVE_SSE3) && !defined(CORE_OPTERON)) || defined(BARCELONA) || defined(SHANGHAI)
|
|
kusano |
2b45e8 |
#define MOVDDUP(a, b, c) movddup a(b), c
|
|
kusano |
2b45e8 |
#define MOVDDUP2(a, b, c) movddup a##b, c
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
#define MOVDDUP(a, b, c) movlpd a(b), c;movhpd a(b), c
|
|
kusano |
2b45e8 |
#define MOVDDUP2(a, b, c) movlpd a##b, c;movhpd a##b, c
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef HEMV
|
|
kusano |
2b45e8 |
#define ADD addpd
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
#define ADD subpd
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PROLOGUE
|
|
kusano |
2b45e8 |
PROFCODE
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
subq $STACKSIZE, %rsp
|
|
kusano |
2b45e8 |
movq %rbx, 0(%rsp)
|
|
kusano |
2b45e8 |
movq %rbp, 8(%rsp)
|
|
kusano |
2b45e8 |
movq %r12, 16(%rsp)
|
|
kusano |
2b45e8 |
movq %r13, 24(%rsp)
|
|
kusano |
2b45e8 |
movq %r14, 32(%rsp)
|
|
kusano |
2b45e8 |
movq %r15, 40(%rsp)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef WINDOWS_ABI
|
|
kusano |
2b45e8 |
movq %rdi, 48(%rsp)
|
|
kusano |
2b45e8 |
movq %rsi, 56(%rsp)
|
|
kusano |
2b45e8 |
movups %xmm6, 64(%rsp)
|
|
kusano |
2b45e8 |
movups %xmm7, 80(%rsp)
|
|
kusano |
2b45e8 |
movups %xmm8, 96(%rsp)
|
|
kusano |
2b45e8 |
movups %xmm9, 112(%rsp)
|
|
kusano |
2b45e8 |
movups %xmm10, 128(%rsp)
|
|
kusano |
2b45e8 |
movups %xmm11, 144(%rsp)
|
|
kusano |
2b45e8 |
movups %xmm12, 160(%rsp)
|
|
kusano |
2b45e8 |
movups %xmm13, 176(%rsp)
|
|
kusano |
2b45e8 |
movups %xmm14, 192(%rsp)
|
|
kusano |
2b45e8 |
movups %xmm15, 208(%rsp)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq OLD_A, A
|
|
kusano |
2b45e8 |
movq OLD_LDA, LDA
|
|
kusano |
2b45e8 |
movq OLD_X, X
|
|
kusano |
2b45e8 |
movq OLD_INCX, INCX
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps %xmm2, %xmm0
|
|
kusano |
2b45e8 |
movaps %xmm3, %xmm1
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq OLD_Y, Y
|
|
kusano |
2b45e8 |
movq OLD_INCY, INCY
|
|
kusano |
2b45e8 |
movq OLD_BUFFER, BUFFER
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
salq $ZBASE_SHIFT, INCX
|
|
kusano |
2b45e8 |
salq $ZBASE_SHIFT, INCY
|
|
kusano |
2b45e8 |
salq $ZBASE_SHIFT, LDA
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
testq M, M
|
|
kusano |
2b45e8 |
jle .L999
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pcmpeqb %xmm2, %xmm2
|
|
kusano |
2b45e8 |
xorpd %xmm3, %xmm3
|
|
kusano |
2b45e8 |
psllq $63, %xmm2
|
|
kusano |
2b45e8 |
unpcklpd %xmm3, %xmm2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
unpcklpd ALPHA_I, ALPHA_R
|
|
kusano |
2b45e8 |
unpcklpd ALPHA_R, ALPHA_I
|
|
kusano |
2b45e8 |
xorpd %xmm2, ALPHA_I
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq BUFFER, XX
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq M, %rax
|
|
kusano |
2b45e8 |
sarq $2, %rax
|
|
kusano |
2b45e8 |
jle .L02
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L01:
|
|
kusano |
2b45e8 |
MOVDDUP(0 * SIZE, X, %xmm3)
|
|
kusano |
2b45e8 |
MOVDDUP(1 * SIZE, X, %xmm4)
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
MOVDDUP(0 * SIZE, X, %xmm5)
|
|
kusano |
2b45e8 |
MOVDDUP(1 * SIZE, X, %xmm6)
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulpd ALPHA_R, %xmm3
|
|
kusano |
2b45e8 |
mulpd ALPHA_I, %xmm4
|
|
kusano |
2b45e8 |
mulpd ALPHA_R, %xmm5
|
|
kusano |
2b45e8 |
mulpd ALPHA_I, %xmm6
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addpd %xmm4, %xmm3
|
|
kusano |
2b45e8 |
addpd %xmm6, %xmm5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd %xmm3, 0 * SIZE(XX)
|
|
kusano |
2b45e8 |
SHUFPD_1 %xmm3, %xmm3
|
|
kusano |
2b45e8 |
pxor %xmm2, %xmm3
|
|
kusano |
2b45e8 |
movapd %xmm3, 2 * SIZE(XX)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd %xmm5, 4 * SIZE(XX)
|
|
kusano |
2b45e8 |
SHUFPD_1 %xmm5, %xmm5
|
|
kusano |
2b45e8 |
pxor %xmm2, %xmm5
|
|
kusano |
2b45e8 |
movapd %xmm5, 6 * SIZE(XX)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MOVDDUP(0 * SIZE, X, %xmm3)
|
|
kusano |
2b45e8 |
MOVDDUP(1 * SIZE, X, %xmm4)
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
MOVDDUP(0 * SIZE, X, %xmm5)
|
|
kusano |
2b45e8 |
MOVDDUP(1 * SIZE, X, %xmm6)
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulpd ALPHA_R, %xmm3
|
|
kusano |
2b45e8 |
mulpd ALPHA_I, %xmm4
|
|
kusano |
2b45e8 |
mulpd ALPHA_R, %xmm5
|
|
kusano |
2b45e8 |
mulpd ALPHA_I, %xmm6
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addpd %xmm4, %xmm3
|
|
kusano |
2b45e8 |
addpd %xmm6, %xmm5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd %xmm3, 8 * SIZE(XX)
|
|
kusano |
2b45e8 |
SHUFPD_1 %xmm3, %xmm3
|
|
kusano |
2b45e8 |
pxor %xmm2, %xmm3
|
|
kusano |
2b45e8 |
movapd %xmm3, 10 * SIZE(XX)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd %xmm5, 12 * SIZE(XX)
|
|
kusano |
2b45e8 |
SHUFPD_1 %xmm5, %xmm5
|
|
kusano |
2b45e8 |
pxor %xmm2, %xmm5
|
|
kusano |
2b45e8 |
movapd %xmm5, 14 * SIZE(XX)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
subq $-16 * SIZE, XX
|
|
kusano |
2b45e8 |
decq %rax
|
|
kusano |
2b45e8 |
jg .L01
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L02:
|
|
kusano |
2b45e8 |
movq M, %rax
|
|
kusano |
2b45e8 |
andq $3, %rax
|
|
kusano |
2b45e8 |
jle .L05
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L03:
|
|
kusano |
2b45e8 |
MOVDDUP(0 * SIZE, X, %xmm3)
|
|
kusano |
2b45e8 |
MOVDDUP(1 * SIZE, X, %xmm4)
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulpd ALPHA_R, %xmm3
|
|
kusano |
2b45e8 |
mulpd ALPHA_I, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addpd %xmm4, %xmm3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd %xmm3, 0 * SIZE(XX)
|
|
kusano |
2b45e8 |
SHUFPD_1 %xmm3, %xmm3
|
|
kusano |
2b45e8 |
pxor %xmm2, %xmm3
|
|
kusano |
2b45e8 |
movapd %xmm3, 2 * SIZE(XX)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $4 * SIZE, XX
|
|
kusano |
2b45e8 |
decq %rax
|
|
kusano |
2b45e8 |
jg .L03
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L05:
|
|
kusano |
2b45e8 |
/* now we don't need original X */
|
|
kusano |
2b45e8 |
movq Y, NEW_Y
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $512, XX
|
|
kusano |
2b45e8 |
andq $-512, XX
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
cmpq $2 * SIZE, INCY
|
|
kusano |
2b45e8 |
je .L10
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq Y, YY
|
|
kusano |
2b45e8 |
movq XX, NEW_Y
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq M, %rax
|
|
kusano |
2b45e8 |
sarq $2, %rax
|
|
kusano |
2b45e8 |
jle .L07
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L06:
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(YY), %xmm0
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(YY), %xmm0
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(YY), %xmm1
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(YY), %xmm1
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(YY), %xmm2
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(YY), %xmm2
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(YY), %xmm3
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(YY), %xmm3
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd %xmm0, 0 * SIZE(XX)
|
|
kusano |
2b45e8 |
movapd %xmm1, 2 * SIZE(XX)
|
|
kusano |
2b45e8 |
movapd %xmm2, 4 * SIZE(XX)
|
|
kusano |
2b45e8 |
movapd %xmm3, 6 * SIZE(XX)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $8 * SIZE, XX
|
|
kusano |
2b45e8 |
decq %rax
|
|
kusano |
2b45e8 |
jg .L06
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L07:
|
|
kusano |
2b45e8 |
movq M, %rax
|
|
kusano |
2b45e8 |
andq $3, %rax
|
|
kusano |
2b45e8 |
jle .L10
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L08:
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(YY), %xmm0
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(YY), %xmm0
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd %xmm0, 0 * SIZE(XX)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $2 * SIZE, XX
|
|
kusano |
2b45e8 |
decq %rax
|
|
kusano |
2b45e8 |
jg .L08
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L10:
|
|
kusano |
2b45e8 |
xorq IS, IS # is = 0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
cmpq $2, N
|
|
kusano |
2b45e8 |
jl .L20
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L11:
|
|
kusano |
2b45e8 |
movq A, A1
|
|
kusano |
2b45e8 |
leaq (A, LDA, 1), A2
|
|
kusano |
2b45e8 |
leaq 4 * SIZE(A, LDA, 2), A
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
leaq (, IS, SIZE), I
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
leaq 0 * SIZE(NEW_X, I, 4), XX
|
|
kusano |
2b45e8 |
leaq 4 * SIZE(NEW_Y, I, 2), YY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(XX), atemp1
|
|
kusano |
2b45e8 |
movapd 2 * SIZE(XX), atemp2
|
|
kusano |
2b45e8 |
movapd 4 * SIZE(XX), atemp3
|
|
kusano |
2b45e8 |
movapd 6 * SIZE(XX), atemp4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MOVDDUP(0 * SIZE, A1, xsum1)
|
|
kusano |
2b45e8 |
MOVDDUP(2 * SIZE, A1, xsum2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulpd atemp1, xsum1
|
|
kusano |
2b45e8 |
mulpd atemp1, xsum2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef HEMV
|
|
kusano |
2b45e8 |
MOVDDUP(1 * SIZE, A1, a1)
|
|
kusano |
2b45e8 |
MOVDDUP(3 * SIZE, A1, a2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulpd atemp2, a1
|
|
kusano |
2b45e8 |
mulpd atemp2, a2
|
|
kusano |
2b45e8 |
addpd a1, xsum1
|
|
kusano |
2b45e8 |
addpd a2, xsum2
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
MOVDDUP(3 * SIZE, A1, a2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulpd atemp2, a2
|
|
kusano |
2b45e8 |
addpd a2, xsum2
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MOVDDUP(2 * SIZE, A1, a1)
|
|
kusano |
2b45e8 |
MOVDDUP(2 * SIZE, A2, a2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulpd atemp3, a1
|
|
kusano |
2b45e8 |
mulpd atemp3, a2
|
|
kusano |
2b45e8 |
addpd a1, xsum1
|
|
kusano |
2b45e8 |
addpd a2, xsum2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef HEMV
|
|
kusano |
2b45e8 |
MOVDDUP(3 * SIZE, A1, a1)
|
|
kusano |
2b45e8 |
MOVDDUP(3 * SIZE, A2, a2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulpd atemp4, a1
|
|
kusano |
2b45e8 |
mulpd atemp4, a2
|
|
kusano |
2b45e8 |
addpd a1, xsum1
|
|
kusano |
2b45e8 |
addpd a2, xsum2
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
MOVDDUP(3 * SIZE, A1, a1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulpd atemp4, a1
|
|
kusano |
2b45e8 |
subpd a1, xsum1
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MOVDDUP(4 * SIZE, A1, a1)
|
|
kusano |
2b45e8 |
MOVDDUP(6 * SIZE, A2, a2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(YY), yy2
|
|
kusano |
2b45e8 |
movhpd 3 * SIZE(YY), yy2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 8 * SIZE(XX), xtemp1
|
|
kusano |
2b45e8 |
movapd 10 * SIZE(XX), xtemp2
|
|
kusano |
2b45e8 |
movapd 12 * SIZE(XX), xtemp3
|
|
kusano |
2b45e8 |
movapd 14 * SIZE(XX), xtemp4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $8 * SIZE, XX
|
|
kusano |
2b45e8 |
addq $4 * SIZE, A1
|
|
kusano |
2b45e8 |
addq $4 * SIZE, A2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq M, I
|
|
kusano |
2b45e8 |
subq IS, I
|
|
kusano |
2b45e8 |
subq $2, I
|
|
kusano |
2b45e8 |
sarq $2, I
|
|
kusano |
2b45e8 |
jle .L15
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L12:
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp1, a1
|
|
kusano |
2b45e8 |
addpd xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a1, yy1
|
|
kusano |
2b45e8 |
MOVDDUP(1 * SIZE, A1, a1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PREFETCH PREFETCHSIZE(A1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp3, xt1
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp3, a2
|
|
kusano |
2b45e8 |
addpd xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a2, yy2
|
|
kusano |
2b45e8 |
MOVDDUP(3 * SIZE, A2, a2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp2, a1
|
|
kusano |
2b45e8 |
ADD xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a1, yy1
|
|
kusano |
2b45e8 |
MOVDDUP(2 * SIZE, A1, a1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp4, xt1
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp4, a2
|
|
kusano |
2b45e8 |
ADD xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a2, yy2
|
|
kusano |
2b45e8 |
MOVDDUP(0 * SIZE, A2, a2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PREFETCH PREFETCHSIZE(XX)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp3, xt1
|
|
kusano |
2b45e8 |
movapd 12 * SIZE(XX), xtemp3
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp1, a1
|
|
kusano |
2b45e8 |
addpd xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a1, yy2
|
|
kusano |
2b45e8 |
MOVDDUP(3 * SIZE, A1, a1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
movapd 8 * SIZE(XX), xtemp1
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp3, a2
|
|
kusano |
2b45e8 |
addpd xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a2, yy1
|
|
kusano |
2b45e8 |
MOVDDUP(1 * SIZE, A2, a2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp4, xt1
|
|
kusano |
2b45e8 |
movapd 14 * SIZE(XX), xtemp4
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp2, a1
|
|
kusano |
2b45e8 |
ADD xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a1, yy2
|
|
kusano |
2b45e8 |
MOVDDUP(4 * SIZE, A1, a1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlpd yy2, 2 * SIZE(YY)
|
|
kusano |
2b45e8 |
movhpd yy2, 3 * SIZE(YY)
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(YY), yy2
|
|
kusano |
2b45e8 |
movhpd 7 * SIZE(YY), yy2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
movapd 10 * SIZE(XX), xtemp2
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp4, a2
|
|
kusano |
2b45e8 |
ADD xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a2, yy1
|
|
kusano |
2b45e8 |
MOVDDUP(6 * SIZE, A2, a2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PREFETCH PREFETCHSIZE(A2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlpd yy1, 0 * SIZE(YY)
|
|
kusano |
2b45e8 |
movhpd yy1, 1 * SIZE(YY)
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
movhpd 5 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp1, a1
|
|
kusano |
2b45e8 |
addpd xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a1, yy1
|
|
kusano |
2b45e8 |
MOVDDUP(5 * SIZE, A1, a1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp3, xt1
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp3, a2
|
|
kusano |
2b45e8 |
addpd xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a2, yy2
|
|
kusano |
2b45e8 |
MOVDDUP(7 * SIZE, A2, a2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp2, a1
|
|
kusano |
2b45e8 |
ADD xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a1, yy1
|
|
kusano |
2b45e8 |
MOVDDUP(6 * SIZE, A1, a1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PREFETCHW PREFETCHSIZE(YY)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp4, xt1
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp4, a2
|
|
kusano |
2b45e8 |
ADD xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a2, yy2
|
|
kusano |
2b45e8 |
MOVDDUP(4 * SIZE, A2, a2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp3, xt1
|
|
kusano |
2b45e8 |
movapd 20 * SIZE(XX), xtemp3
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp1, a1
|
|
kusano |
2b45e8 |
addpd xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a1, yy2
|
|
kusano |
2b45e8 |
MOVDDUP(7 * SIZE, A1, a1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
movapd 16 * SIZE(XX), xtemp1
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp3, a2
|
|
kusano |
2b45e8 |
addpd xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a2, yy1
|
|
kusano |
2b45e8 |
MOVDDUP(5 * SIZE, A2, a2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp4, xt1
|
|
kusano |
2b45e8 |
movapd 22 * SIZE(XX), xtemp4
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp2, a1
|
|
kusano |
2b45e8 |
ADD xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a1, yy2
|
|
kusano |
2b45e8 |
MOVDDUP( 8 * SIZE, A1, a1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlpd yy2, 6 * SIZE(YY)
|
|
kusano |
2b45e8 |
movhpd yy2, 7 * SIZE(YY)
|
|
kusano |
2b45e8 |
movsd 10 * SIZE(YY), yy2
|
|
kusano |
2b45e8 |
movhpd 11 * SIZE(YY), yy2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
movapd 18 * SIZE(XX), xtemp2
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp4, a2
|
|
kusano |
2b45e8 |
ADD xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a2, yy1
|
|
kusano |
2b45e8 |
MOVDDUP(10 * SIZE, A2, a2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlpd yy1, 4 * SIZE(YY)
|
|
kusano |
2b45e8 |
movhpd yy1, 5 * SIZE(YY)
|
|
kusano |
2b45e8 |
movsd 8 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
movhpd 9 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
subq $-16 * SIZE, XX
|
|
kusano |
2b45e8 |
addq $ 8 * SIZE, YY
|
|
kusano |
2b45e8 |
addq $ 8 * SIZE, A1
|
|
kusano |
2b45e8 |
addq $ 8 * SIZE, A2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
decq I
|
|
kusano |
2b45e8 |
jg .L12
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L15:
|
|
kusano |
2b45e8 |
movq M, I
|
|
kusano |
2b45e8 |
subq IS, I
|
|
kusano |
2b45e8 |
subq $2, I
|
|
kusano |
2b45e8 |
testq $2, I
|
|
kusano |
2b45e8 |
jle .L16
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp1, a1
|
|
kusano |
2b45e8 |
addpd xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a1, yy1
|
|
kusano |
2b45e8 |
MOVDDUP(1 * SIZE, A1, a1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp3, xt1
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp3, a2
|
|
kusano |
2b45e8 |
addpd xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a2, yy2
|
|
kusano |
2b45e8 |
MOVDDUP(3 * SIZE, A2, a2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp2, a1
|
|
kusano |
2b45e8 |
ADD xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a1, yy1
|
|
kusano |
2b45e8 |
MOVDDUP(2 * SIZE, A1, a1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp4, xt1
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp4, a2
|
|
kusano |
2b45e8 |
ADD xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a2, yy2
|
|
kusano |
2b45e8 |
MOVDDUP(0 * SIZE, A2, a2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp3, xt1
|
|
kusano |
2b45e8 |
movapd 12 * SIZE(XX), xtemp3
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp1, a1
|
|
kusano |
2b45e8 |
addpd xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a1, yy2
|
|
kusano |
2b45e8 |
MOVDDUP(3 * SIZE, A1, a1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
movapd 8 * SIZE(XX), xtemp1
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp3, a2
|
|
kusano |
2b45e8 |
addpd xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a2, yy1
|
|
kusano |
2b45e8 |
MOVDDUP(1 * SIZE, A2, a2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp4, xt1
|
|
kusano |
2b45e8 |
movapd 14 * SIZE(XX), xtemp4
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp2, a1
|
|
kusano |
2b45e8 |
ADD xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a1, yy2
|
|
kusano |
2b45e8 |
MOVDDUP(4 * SIZE, A1, a1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlpd yy2, 2 * SIZE(YY)
|
|
kusano |
2b45e8 |
movhpd yy2, 3 * SIZE(YY)
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(YY), yy2
|
|
kusano |
2b45e8 |
movhpd 7 * SIZE(YY), yy2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
movapd 10 * SIZE(XX), xtemp2
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp4, a2
|
|
kusano |
2b45e8 |
ADD xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a2, yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlpd yy1, 0 * SIZE(YY)
|
|
kusano |
2b45e8 |
movhpd yy1, 1 * SIZE(YY)
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
movhpd 5 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $4 * SIZE, YY
|
|
kusano |
2b45e8 |
addq $4 * SIZE, A1
|
|
kusano |
2b45e8 |
addq $4 * SIZE, A2
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L16:
|
|
kusano |
2b45e8 |
testq $1, M
|
|
kusano |
2b45e8 |
jle .L18
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MOVDDUP(1 * SIZE, A1, a2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp1, a1
|
|
kusano |
2b45e8 |
addpd xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a1, yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MOVDDUP(0 * SIZE, A2, a1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp2, a2
|
|
kusano |
2b45e8 |
ADD xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a2, yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
MOVDDUP(1 * SIZE, A2, a2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp3, a1
|
|
kusano |
2b45e8 |
addpd xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a1, yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp4, a2
|
|
kusano |
2b45e8 |
ADD xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a2, yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlpd yy1, 0 * SIZE(YY)
|
|
kusano |
2b45e8 |
movhpd yy1, 1 * SIZE(YY)
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L18:
|
|
kusano |
2b45e8 |
leaq (, IS, SIZE), I
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(NEW_Y, I, 2), yy1
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(NEW_Y, I, 2), yy1
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(NEW_Y, I, 2), yy2
|
|
kusano |
2b45e8 |
movhpd 3 * SIZE(NEW_Y, I, 2), yy2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addpd xsum1, yy1
|
|
kusano |
2b45e8 |
addpd xsum2, yy2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlpd yy1, 0 * SIZE(NEW_Y, I, 2)
|
|
kusano |
2b45e8 |
movhpd yy1, 1 * SIZE(NEW_Y, I, 2)
|
|
kusano |
2b45e8 |
movlpd yy2, 2 * SIZE(NEW_Y, I, 2)
|
|
kusano |
2b45e8 |
movhpd yy2, 3 * SIZE(NEW_Y, I, 2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $2, IS
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq IS, I
|
|
kusano |
2b45e8 |
addq $2, I
|
|
kusano |
2b45e8 |
cmpq N, I
|
|
kusano |
2b45e8 |
jle .L11
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L20:
|
|
kusano |
2b45e8 |
testq $1, N
|
|
kusano |
2b45e8 |
jle .L990
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
leaq (, IS, SIZE), I
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(NEW_X, I, 4), atemp1
|
|
kusano |
2b45e8 |
movapd 2 * SIZE(NEW_X, I, 4), atemp2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(NEW_Y, I, 2), yy1
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(NEW_Y, I, 2), yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef HEMV
|
|
kusano |
2b45e8 |
MOVDDUP(0 * SIZE, A, a1)
|
|
kusano |
2b45e8 |
MOVDDUP(1 * SIZE, A, a2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulpd atemp1, a1
|
|
kusano |
2b45e8 |
mulpd atemp2, a2
|
|
kusano |
2b45e8 |
addpd a1, yy1
|
|
kusano |
2b45e8 |
addpd a2, yy1
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
MOVDDUP(0 * SIZE, A, a1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulpd atemp1, a1
|
|
kusano |
2b45e8 |
addpd a1, yy1
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlpd yy1, 0 * SIZE(NEW_Y, I, 2)
|
|
kusano |
2b45e8 |
movhpd yy1, 1 * SIZE(NEW_Y, I, 2)
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L990:
|
|
kusano |
2b45e8 |
cmpq $2 * SIZE, INCY
|
|
kusano |
2b45e8 |
je .L999
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq M, %rax
|
|
kusano |
2b45e8 |
sarq $2, %rax
|
|
kusano |
2b45e8 |
jle .L997
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L996:
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(NEW_Y), %xmm0
|
|
kusano |
2b45e8 |
movapd 2 * SIZE(NEW_Y), %xmm1
|
|
kusano |
2b45e8 |
movapd 4 * SIZE(NEW_Y), %xmm2
|
|
kusano |
2b45e8 |
movapd 6 * SIZE(NEW_Y), %xmm3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd %xmm0, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
movhpd %xmm0, 1 * SIZE(Y)
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
movsd %xmm1, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
movhpd %xmm1, 1 * SIZE(Y)
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
movsd %xmm2, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
movhpd %xmm2, 1 * SIZE(Y)
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
movsd %xmm3, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
movhpd %xmm3, 1 * SIZE(Y)
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $8 * SIZE, NEW_Y
|
|
kusano |
2b45e8 |
decq %rax
|
|
kusano |
2b45e8 |
jg .L996
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L997:
|
|
kusano |
2b45e8 |
movq M, %rax
|
|
kusano |
2b45e8 |
andq $3, %rax
|
|
kusano |
2b45e8 |
jle .L999
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L998:
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(NEW_Y), %xmm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd %xmm0, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
movhpd %xmm0, 1 * SIZE(Y)
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $2 * SIZE, NEW_Y
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
decq %rax
|
|
kusano |
2b45e8 |
jg .L998
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L999:
|
|
kusano |
2b45e8 |
movq 0(%rsp), %rbx
|
|
kusano |
2b45e8 |
movq 8(%rsp), %rbp
|
|
kusano |
2b45e8 |
movq 16(%rsp), %r12
|
|
kusano |
2b45e8 |
movq 24(%rsp), %r13
|
|
kusano |
2b45e8 |
movq 32(%rsp), %r14
|
|
kusano |
2b45e8 |
movq 40(%rsp), %r15
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef WINDOWS_ABI
|
|
kusano |
2b45e8 |
movq 48(%rsp), %rdi
|
|
kusano |
2b45e8 |
movq 56(%rsp), %rsi
|
|
kusano |
2b45e8 |
movups 64(%rsp), %xmm6
|
|
kusano |
2b45e8 |
movups 80(%rsp), %xmm7
|
|
kusano |
2b45e8 |
movups 96(%rsp), %xmm8
|
|
kusano |
2b45e8 |
movups 112(%rsp), %xmm9
|
|
kusano |
2b45e8 |
movups 128(%rsp), %xmm10
|
|
kusano |
2b45e8 |
movups 144(%rsp), %xmm11
|
|
kusano |
2b45e8 |
movups 160(%rsp), %xmm12
|
|
kusano |
2b45e8 |
movups 176(%rsp), %xmm13
|
|
kusano |
2b45e8 |
movups 192(%rsp), %xmm14
|
|
kusano |
2b45e8 |
movups 208(%rsp), %xmm15
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $STACKSIZE, %rsp
|
|
kusano |
2b45e8 |
ret
|
|
kusano |
2b45e8 |
EPILOGUE
|