|
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 * 12)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef CORE2
|
|
kusano |
2b45e8 |
#define PREFETCH prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHW prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHSIZE (16 * 12)
|
|
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 * 12)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef NEHALEM
|
|
kusano |
2b45e8 |
#define PREFETCH prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHW prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHSIZE (16 * 12)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef PENTIUM4
|
|
kusano |
2b45e8 |
#define PREFETCH prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHW prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCHSIZE (16 * 20)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef OPTERON
|
|
kusano |
2b45e8 |
#define PREFETCH prefetch
|
|
kusano |
2b45e8 |
#define PREFETCHW prefetchw
|
|
kusano |
2b45e8 |
#define PREFETCHSIZE (16 * 8)
|
|
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 * 20)
|
|
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_LDA 40 + STACKSIZE(%rsp)
|
|
kusano |
2b45e8 |
#define OLD_X 48 + STACKSIZE(%rsp)
|
|
kusano |
2b45e8 |
#define OLD_INCX 56 + STACKSIZE(%rsp)
|
|
kusano |
2b45e8 |
#define OLD_Y 64 + STACKSIZE(%rsp)
|
|
kusano |
2b45e8 |
#define OLD_INCY 72 + STACKSIZE(%rsp)
|
|
kusano |
2b45e8 |
#define OLD_BUFFER 80 + 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 %xmm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define xtemp1 %xmm0
|
|
kusano |
2b45e8 |
#define xtemp2 %xmm1
|
|
kusano |
2b45e8 |
#define yy1 %xmm2
|
|
kusano |
2b45e8 |
#define yy2 %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 xsum3 %xmm10
|
|
kusano |
2b45e8 |
#define xsum4 %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 |
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_LDA, LDA
|
|
kusano |
2b45e8 |
movq OLD_X, X
|
|
kusano |
2b45e8 |
movq OLD_INCX, INCX
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps %xmm2, %xmm0
|
|
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 |
leaq (,INCX, SIZE), INCX
|
|
kusano |
2b45e8 |
leaq (,INCY, SIZE), INCY
|
|
kusano |
2b45e8 |
leaq (,LDA, SIZE), LDA
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
testq M, M
|
|
kusano |
2b45e8 |
jle .L999
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
unpcklpd ALPHA, ALPHA
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq BUFFER, XX
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq M, %rax
|
|
kusano |
2b45e8 |
sarq $3, %rax
|
|
kusano |
2b45e8 |
jle .L02
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L01:
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(X), %xmm1
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
movhpd 0 * SIZE(X), %xmm1
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(X), %xmm2
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
movhpd 0 * SIZE(X), %xmm2
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(X), %xmm3
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
movhpd 0 * SIZE(X), %xmm3
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(X), %xmm4
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
movhpd 0 * SIZE(X), %xmm4
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulpd ALPHA, %xmm1
|
|
kusano |
2b45e8 |
mulpd ALPHA, %xmm2
|
|
kusano |
2b45e8 |
mulpd ALPHA, %xmm3
|
|
kusano |
2b45e8 |
mulpd ALPHA, %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd %xmm1, 0 * SIZE(XX)
|
|
kusano |
2b45e8 |
movapd %xmm2, 2 * SIZE(XX)
|
|
kusano |
2b45e8 |
movapd %xmm3, 4 * SIZE(XX)
|
|
kusano |
2b45e8 |
movapd %xmm4, 6 * SIZE(XX)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $8 * 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 $7, %rax
|
|
kusano |
2b45e8 |
jle .L05
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L03:
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(X), %xmm1
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulsd ALPHA, %xmm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlpd %xmm1, 0 * SIZE(XX)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $1 * 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 $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 $3, %rax
|
|
kusano |
2b45e8 |
jle .L07
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L06:
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(YY), %xmm0
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
movhpd 0 * SIZE(YY), %xmm0
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(YY), %xmm1
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
movhpd 0 * SIZE(YY), %xmm1
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(YY), %xmm2
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
movhpd 0 * SIZE(YY), %xmm2
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(YY), %xmm3
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
movhpd 0 * 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 $7, %rax
|
|
kusano |
2b45e8 |
jle .L10
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L08:
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(YY), %xmm0
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd %xmm0, 0 * SIZE(XX)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $1 * 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 $4, N
|
|
kusano |
2b45e8 |
jl .L20
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L11:
|
|
kusano |
2b45e8 |
movq A, A1
|
|
kusano |
2b45e8 |
leaq (A, LDA, 2), A2
|
|
kusano |
2b45e8 |
leaq 4 * SIZE(A, LDA, 4), A
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
leaq (NEW_X, IS, SIZE), XX
|
|
kusano |
2b45e8 |
leaq 4 * SIZE(NEW_Y, IS, SIZE), YY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(XX), atemp2
|
|
kusano |
2b45e8 |
movapd 2 * SIZE(XX), atemp4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A1), xsum1
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(A1), xsum1
|
|
kusano |
2b45e8 |
mulpd atemp2, xsum1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(A1), xsum2
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(A1, LDA, 1), xsum2
|
|
kusano |
2b45e8 |
mulpd atemp2, xsum2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(A1), xsum3
|
|
kusano |
2b45e8 |
movhpd 2 * SIZE(A1, LDA, 1), xsum3
|
|
kusano |
2b45e8 |
mulpd atemp2, xsum3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 3 * SIZE(A1), xsum4
|
|
kusano |
2b45e8 |
movhpd 3 * SIZE(A1, LDA, 1), xsum4
|
|
kusano |
2b45e8 |
mulpd atemp2, xsum4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movhpd 3 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
mulpd atemp4, a1
|
|
kusano |
2b45e8 |
addpd a1, xsum1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(A1, LDA, 1), a1
|
|
kusano |
2b45e8 |
movhpd 3 * SIZE(A1, LDA, 1), a1
|
|
kusano |
2b45e8 |
mulpd atemp4, a1
|
|
kusano |
2b45e8 |
addpd a1, xsum2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(A2), a1
|
|
kusano |
2b45e8 |
movhpd 3 * SIZE(A2), a1
|
|
kusano |
2b45e8 |
mulpd atemp4, a1
|
|
kusano |
2b45e8 |
addpd a1, xsum3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 3 * SIZE(A2), a1
|
|
kusano |
2b45e8 |
movhpd 3 * SIZE(A2, LDA, 1), a1
|
|
kusano |
2b45e8 |
mulpd atemp4, a1
|
|
kusano |
2b45e8 |
addpd a1, xsum4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 4 * SIZE(XX), xtemp1
|
|
kusano |
2b45e8 |
movapd 6 * SIZE(XX), xtemp2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movhpd 5 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(A1), a2
|
|
kusano |
2b45e8 |
movhpd 7 * SIZE(A1), a2
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A1, LDA, 1), a3
|
|
kusano |
2b45e8 |
movhpd 5 * SIZE(A1, LDA, 1), a3
|
|
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 |
#ifndef HAVE_SSE3
|
|
kusano |
2b45e8 |
movapd atemp2, atemp1
|
|
kusano |
2b45e8 |
unpcklpd atemp1, atemp1
|
|
kusano |
2b45e8 |
unpckhpd atemp2, atemp2
|
|
kusano |
2b45e8 |
movapd atemp4, atemp3
|
|
kusano |
2b45e8 |
unpcklpd atemp3, atemp3
|
|
kusano |
2b45e8 |
unpckhpd atemp4, atemp4
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
movddup atemp2, atemp1
|
|
kusano |
2b45e8 |
unpckhpd atemp2, atemp2
|
|
kusano |
2b45e8 |
movddup atemp4, atemp3
|
|
kusano |
2b45e8 |
unpckhpd atemp4, atemp4
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $4 * 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 $4, I
|
|
kusano |
2b45e8 |
sarq $3, 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 |
movsd 2 * SIZE(A1, LDA, 1), a1
|
|
kusano |
2b45e8 |
movhpd 3 * SIZE(A1, LDA, 1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PREFETCH PREFETCHSIZE(A1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp1, a2
|
|
kusano |
2b45e8 |
addpd xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a2, yy2
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A2), a2
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(A2), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
mulpd a3, xt1
|
|
kusano |
2b45e8 |
mulpd atemp2, a3
|
|
kusano |
2b45e8 |
addpd xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a3, yy1
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(A2), a3
|
|
kusano |
2b45e8 |
movhpd 3 * SIZE(A2), a3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if !defined(CORE2) && !defined(PENRYN) && !defined(DUNNINGTON)
|
|
kusano |
2b45e8 |
PREFETCH PREFETCHSIZE(XX)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp2, a1
|
|
kusano |
2b45e8 |
addpd xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a1, yy2
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A2, LDA, 1), a1
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(A2, LDA, 1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp3, a2
|
|
kusano |
2b45e8 |
addpd xt1, xsum3
|
|
kusano |
2b45e8 |
addpd a2, yy1
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(A2, LDA, 1), a2
|
|
kusano |
2b45e8 |
movhpd 3 * SIZE(A2, LDA, 1), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PREFETCH PREFETCHSIZE(A1, LDA, 1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
mulpd a3, xt1
|
|
kusano |
2b45e8 |
mulpd atemp3, a3
|
|
kusano |
2b45e8 |
addpd xt1, xsum3
|
|
kusano |
2b45e8 |
addpd a3, yy2
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A1), a3
|
|
kusano |
2b45e8 |
movhpd 5 * SIZE(A1), a3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
movapd 4 * SIZE(XX), xtemp1
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp4, a1
|
|
kusano |
2b45e8 |
addpd xt1, xsum4
|
|
kusano |
2b45e8 |
addpd a1, yy1
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movhpd 7 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
movapd 6 * SIZE(XX), xtemp2
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp4, a2
|
|
kusano |
2b45e8 |
addpd xt1, xsum4
|
|
kusano |
2b45e8 |
addpd a2, yy2
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
movhpd 5 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 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 |
movsd 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 xtemp1, xt1
|
|
kusano |
2b45e8 |
mulpd a3, xt1
|
|
kusano |
2b45e8 |
mulpd atemp1, a3
|
|
kusano |
2b45e8 |
addpd xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a3, yy1
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(A1, LDA, 1), a3
|
|
kusano |
2b45e8 |
movhpd 7 * SIZE(A1, LDA, 1), a3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PREFETCH PREFETCHSIZE(A2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp1, a1
|
|
kusano |
2b45e8 |
addpd xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a1, yy2
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A2), a1
|
|
kusano |
2b45e8 |
movhpd 5 * SIZE(A2), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp2, a2
|
|
kusano |
2b45e8 |
addpd xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a2, yy1
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(A2), a2
|
|
kusano |
2b45e8 |
movhpd 7 * SIZE(A2), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if !defined(CORE2) && !defined(PENRYN) && !defined(DUNNINGTON)
|
|
kusano |
2b45e8 |
PREFETCHW PREFETCHSIZE(YY)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
mulpd a3, xt1
|
|
kusano |
2b45e8 |
mulpd atemp2, a3
|
|
kusano |
2b45e8 |
addpd xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a3, yy2
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A2, LDA, 1), a3
|
|
kusano |
2b45e8 |
movhpd 5 * SIZE(A2, LDA, 1), a3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp3, a1
|
|
kusano |
2b45e8 |
addpd xt1, xsum3
|
|
kusano |
2b45e8 |
addpd a1, yy1
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(A2, LDA, 1), a1
|
|
kusano |
2b45e8 |
movhpd 7 * SIZE(A2, LDA, 1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PREFETCH PREFETCHSIZE(A2, LDA, 1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp3, a2
|
|
kusano |
2b45e8 |
addpd xt1, xsum3
|
|
kusano |
2b45e8 |
addpd a2, yy2
|
|
kusano |
2b45e8 |
movsd 10 * SIZE(A1), a2
|
|
kusano |
2b45e8 |
movhpd 11 * SIZE(A1), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
movapd 8 * SIZE(XX), xtemp1
|
|
kusano |
2b45e8 |
mulpd a3, xt1
|
|
kusano |
2b45e8 |
mulpd atemp4, a3
|
|
kusano |
2b45e8 |
addpd xt1, xsum4
|
|
kusano |
2b45e8 |
addpd a3, yy1
|
|
kusano |
2b45e8 |
movsd 8 * SIZE(A1, LDA, 1), a3
|
|
kusano |
2b45e8 |
movhpd 9 * SIZE(A1, LDA, 1), a3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
movapd 10 * SIZE(XX), xtemp2
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp4, a1
|
|
kusano |
2b45e8 |
addpd xt1, xsum4
|
|
kusano |
2b45e8 |
addpd a1, yy2
|
|
kusano |
2b45e8 |
movsd 8 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movhpd 9 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 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 |
movsd 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 |
addq $8 * 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 $4, I
|
|
kusano |
2b45e8 |
test $4, I
|
|
kusano |
2b45e8 |
jle .L17
|
|
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 |
movsd 2 * SIZE(A1, LDA, 1), a1
|
|
kusano |
2b45e8 |
movhpd 3 * SIZE(A1, LDA, 1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp1, a2
|
|
kusano |
2b45e8 |
addpd xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a2, yy2
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A2), a2
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(A2), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
mulpd a3, xt1
|
|
kusano |
2b45e8 |
mulpd atemp2, a3
|
|
kusano |
2b45e8 |
addpd xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a3, yy1
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(A2), a3
|
|
kusano |
2b45e8 |
movhpd 3 * SIZE(A2), a3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp2, a1
|
|
kusano |
2b45e8 |
addpd xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a1, yy2
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A2, LDA, 1), a1
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(A2, LDA, 1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp3, a2
|
|
kusano |
2b45e8 |
addpd xt1, xsum3
|
|
kusano |
2b45e8 |
addpd a2, yy1
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(A2, LDA, 1), a2
|
|
kusano |
2b45e8 |
movhpd 3 * SIZE(A2, LDA, 1), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
mulpd a3, xt1
|
|
kusano |
2b45e8 |
mulpd atemp3, a3
|
|
kusano |
2b45e8 |
addpd xt1, xsum3
|
|
kusano |
2b45e8 |
addpd a3, yy2
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A1, LDA, 1), a3
|
|
kusano |
2b45e8 |
movhpd 5 * SIZE(A1, LDA, 1), a3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
movapd 4 * SIZE(XX), xtemp1
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp4, a1
|
|
kusano |
2b45e8 |
addpd xt1, xsum4
|
|
kusano |
2b45e8 |
addpd a1, yy1
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movhpd 5 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp2, xt1
|
|
kusano |
2b45e8 |
movapd 6 * SIZE(XX), xtemp2
|
|
kusano |
2b45e8 |
mulpd a2, xt1
|
|
kusano |
2b45e8 |
mulpd atemp4, a2
|
|
kusano |
2b45e8 |
addpd xt1, xsum4
|
|
kusano |
2b45e8 |
addpd a2, yy2
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(A1), a2
|
|
kusano |
2b45e8 |
movhpd 7 * SIZE(A1), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 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 |
movsd 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 |
addq $4 * SIZE, XX
|
|
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 |
.L17:
|
|
kusano |
2b45e8 |
testq $2, M
|
|
kusano |
2b45e8 |
jle .L18
|
|
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 |
movsd 0 * SIZE(A1, LDA, 1), a1
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(A1, LDA, 1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp2, a1
|
|
kusano |
2b45e8 |
addpd xt1, xsum2
|
|
kusano |
2b45e8 |
addpd a1, yy1
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A2), a1
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(A2), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp3, a1
|
|
kusano |
2b45e8 |
addpd xt1, xsum3
|
|
kusano |
2b45e8 |
addpd a1, yy1
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A2, LDA, 1), a1
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(A2, LDA, 1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
movapd 2 * SIZE(XX), xtemp1
|
|
kusano |
2b45e8 |
mulpd a1, xt1
|
|
kusano |
2b45e8 |
mulpd atemp4, a1
|
|
kusano |
2b45e8 |
addpd xt1, xsum4
|
|
kusano |
2b45e8 |
addpd a1, yy1
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd yy1, 0 * SIZE(YY)
|
|
kusano |
2b45e8 |
movhpd yy1, 1 * SIZE(YY)
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $2 * SIZE, XX
|
|
kusano |
2b45e8 |
addq $2 * SIZE, YY
|
|
kusano |
2b45e8 |
addq $2 * SIZE, A1
|
|
kusano |
2b45e8 |
addq $2 * SIZE, A2
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L18:
|
|
kusano |
2b45e8 |
testq $1, M
|
|
kusano |
2b45e8 |
jle .L19
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
mulsd a1, xt1
|
|
kusano |
2b45e8 |
mulsd atemp1, a1
|
|
kusano |
2b45e8 |
addsd xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a1, yy1
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A1, LDA, 1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
mulsd a1, xt1
|
|
kusano |
2b45e8 |
mulsd atemp2, a1
|
|
kusano |
2b45e8 |
addsd xt1, xsum2
|
|
kusano |
2b45e8 |
addsd a1, yy1
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A2), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
mulsd a1, xt1
|
|
kusano |
2b45e8 |
mulsd atemp3, a1
|
|
kusano |
2b45e8 |
addsd xt1, xsum3
|
|
kusano |
2b45e8 |
addsd a1, yy1
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A2, LDA, 1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
mulsd a1, xt1
|
|
kusano |
2b45e8 |
mulsd atemp4, a1
|
|
kusano |
2b45e8 |
addsd xt1, xsum4
|
|
kusano |
2b45e8 |
addsd a1, yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd yy1, 0 * SIZE(YY)
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L19:
|
|
kusano |
2b45e8 |
#ifndef HAVE_SSE3
|
|
kusano |
2b45e8 |
movapd xsum1, atemp1
|
|
kusano |
2b45e8 |
movapd xsum3, atemp3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
unpcklpd xsum2, xsum1
|
|
kusano |
2b45e8 |
unpcklpd xsum4, xsum3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
unpckhpd xsum2, atemp1
|
|
kusano |
2b45e8 |
unpckhpd xsum4, atemp3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addpd atemp1, xsum1
|
|
kusano |
2b45e8 |
addpd atemp3, xsum3
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
haddpd xsum2, xsum1
|
|
kusano |
2b45e8 |
haddpd xsum4, xsum3
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(NEW_Y, IS, SIZE), yy1
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(NEW_Y, IS, SIZE), yy1
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(NEW_Y, IS, SIZE), yy2
|
|
kusano |
2b45e8 |
movhpd 3 * SIZE(NEW_Y, IS, SIZE), yy2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addpd xsum1, yy1
|
|
kusano |
2b45e8 |
addpd xsum3, yy2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd yy1, 0 * SIZE(NEW_Y, IS, SIZE)
|
|
kusano |
2b45e8 |
movhpd yy1, 1 * SIZE(NEW_Y, IS, SIZE)
|
|
kusano |
2b45e8 |
movsd yy2, 2 * SIZE(NEW_Y, IS, SIZE)
|
|
kusano |
2b45e8 |
movhpd yy2, 3 * SIZE(NEW_Y, IS, SIZE)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $4, IS
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq IS, I
|
|
kusano |
2b45e8 |
addq $4, I
|
|
kusano |
2b45e8 |
cmpq N, I
|
|
kusano |
2b45e8 |
jle .L11
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L20:
|
|
kusano |
2b45e8 |
testq $2, N
|
|
kusano |
2b45e8 |
jle .L30
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq A, A1
|
|
kusano |
2b45e8 |
leaq 2 * SIZE(A, LDA, 2), A
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd 0 * SIZE(NEW_X, IS, SIZE), atemp2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A1), xsum1
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(A1), xsum1
|
|
kusano |
2b45e8 |
mulpd atemp2, xsum1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(A1), xsum2
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(A1, LDA, 1), xsum2
|
|
kusano |
2b45e8 |
mulpd atemp2, xsum2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef HAVE_SSE3
|
|
kusano |
2b45e8 |
movapd atemp2, atemp1
|
|
kusano |
2b45e8 |
unpcklpd atemp1, atemp1
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
movddup atemp2, atemp1
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
unpckhpd atemp2, atemp2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
testq $1, M
|
|
kusano |
2b45e8 |
jle .L29
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(NEW_X, IS, SIZE), xtemp1
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(NEW_Y, IS, SIZE), yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
mulsd a1, xt1
|
|
kusano |
2b45e8 |
mulsd atemp1, a1
|
|
kusano |
2b45e8 |
addsd xt1, xsum1
|
|
kusano |
2b45e8 |
addpd a1, yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movapd xtemp1, xt1
|
|
kusano |
2b45e8 |
mulsd a2, xt1
|
|
kusano |
2b45e8 |
mulsd atemp2, a2
|
|
kusano |
2b45e8 |
addsd xt1, xsum2
|
|
kusano |
2b45e8 |
addsd a2, yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd yy1, 2 * SIZE(NEW_Y, IS, SIZE)
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L29:
|
|
kusano |
2b45e8 |
#ifndef HAVE_SSE3
|
|
kusano |
2b45e8 |
movapd xsum1, atemp1
|
|
kusano |
2b45e8 |
unpcklpd xsum2, xsum1
|
|
kusano |
2b45e8 |
unpckhpd xsum2, atemp1
|
|
kusano |
2b45e8 |
addpd atemp1, xsum1
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
haddpd xsum2, xsum1
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(NEW_Y, IS, SIZE), yy1
|
|
kusano |
2b45e8 |
movhpd 1 * SIZE(NEW_Y, IS, SIZE), yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addpd xsum1, yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd yy1, 0 * SIZE(NEW_Y, IS, SIZE)
|
|
kusano |
2b45e8 |
movhpd yy1, 1 * SIZE(NEW_Y, IS, SIZE)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $2, IS
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L30:
|
|
kusano |
2b45e8 |
testq $1, N
|
|
kusano |
2b45e8 |
jle .L990
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A), xsum1
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(NEW_X, IS, SIZE), atemp1
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(NEW_Y, IS, SIZE), yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulsd atemp1, xsum1
|
|
kusano |
2b45e8 |
addsd xsum1, yy1
|
|
kusano |
2b45e8 |
movsd yy1, 0 * SIZE(NEW_Y, IS, SIZE)
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L990:
|
|
kusano |
2b45e8 |
cmpq $SIZE, INCY
|
|
kusano |
2b45e8 |
je .L999
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq M, %rax
|
|
kusano |
2b45e8 |
sarq $3, %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 |
addq INCY, Y
|
|
kusano |
2b45e8 |
movhpd %xmm0, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
movsd %xmm1, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
movhpd %xmm1, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
movsd %xmm2, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
movhpd %xmm2, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
movsd %xmm3, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
movhpd %xmm3, 0 * 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 $7, %rax
|
|
kusano |
2b45e8 |
jle .L999
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L998:
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(NEW_Y), %xmm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd %xmm0, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $1 * SIZE, NEW_Y
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
decq %rax
|
|
kusano |
2b45e8 |
jg .L998
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
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
|