|
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 movlps
|
|
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 (16 * 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 IS 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 IS 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 NEW_X BUFFER
|
|
kusano |
2b45e8 |
#define NEW_Y X
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define ALPHA %xmm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define atemp1 %xmm0
|
|
kusano |
2b45e8 |
#define atemp2 %xmm1
|
|
kusano |
2b45e8 |
#define atemp3 %xmm2
|
|
kusano |
2b45e8 |
#define atemp4 %xmm3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define xsum1 %xmm4
|
|
kusano |
2b45e8 |
#define xsum2 %xmm5
|
|
kusano |
2b45e8 |
#define xsum3 %xmm6
|
|
kusano |
2b45e8 |
#define xsum4 %xmm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define xtemp1 %xmm8
|
|
kusano |
2b45e8 |
#define xtemp2 %xmm9
|
|
kusano |
2b45e8 |
#define yy1 %xmm10
|
|
kusano |
2b45e8 |
#define xt1 %xmm11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define a1 %xmm12
|
|
kusano |
2b45e8 |
#define a2 %xmm13
|
|
kusano |
2b45e8 |
#define a3 %xmm14
|
|
kusano |
2b45e8 |
#define a4 %xmm15
|
|
kusano |
2b45e8 |
|
|
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 |
negq IS
|
|
kusano |
2b45e8 |
addq M, IS
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq IS, TEMP
|
|
kusano |
2b45e8 |
imulq LDA, TEMP
|
|
kusano |
2b45e8 |
addq TEMP, A
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
shufps $0, 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 |
movss 0 * SIZE(X), %xmm1
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
movss 0 * SIZE(X), %xmm2
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
movss 0 * SIZE(X), %xmm3
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
movss 0 * SIZE(X), %xmm4
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
movss 0 * SIZE(X), %xmm5
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
movss 0 * SIZE(X), %xmm6
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
movss 0 * SIZE(X), %xmm7
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
movss 0 * SIZE(X), %xmm8
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulss ALPHA, %xmm1
|
|
kusano |
2b45e8 |
mulss ALPHA, %xmm2
|
|
kusano |
2b45e8 |
mulss ALPHA, %xmm3
|
|
kusano |
2b45e8 |
mulss ALPHA, %xmm4
|
|
kusano |
2b45e8 |
mulss ALPHA, %xmm5
|
|
kusano |
2b45e8 |
mulss ALPHA, %xmm6
|
|
kusano |
2b45e8 |
mulss ALPHA, %xmm7
|
|
kusano |
2b45e8 |
mulss ALPHA, %xmm8
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movss %xmm1, 0 * SIZE(XX)
|
|
kusano |
2b45e8 |
movss %xmm2, 1 * SIZE(XX)
|
|
kusano |
2b45e8 |
movss %xmm3, 2 * SIZE(XX)
|
|
kusano |
2b45e8 |
movss %xmm4, 3 * SIZE(XX)
|
|
kusano |
2b45e8 |
movss %xmm5, 4 * SIZE(XX)
|
|
kusano |
2b45e8 |
movss %xmm6, 5 * SIZE(XX)
|
|
kusano |
2b45e8 |
movss %xmm7, 6 * SIZE(XX)
|
|
kusano |
2b45e8 |
movss %xmm8, 7 * 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 |
movss 0 * SIZE(X), %xmm1
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulss ALPHA, %xmm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movss %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 |
movss 0 * SIZE(YY), %xmm0
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
movss 0 * SIZE(YY), %xmm1
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
movss 0 * SIZE(YY), %xmm2
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
movss 0 * SIZE(YY), %xmm3
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
movss 0 * SIZE(YY), %xmm4
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
movss 0 * SIZE(YY), %xmm5
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
movss 0 * SIZE(YY), %xmm6
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
movss 0 * SIZE(YY), %xmm7
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movss %xmm0, 0 * SIZE(XX)
|
|
kusano |
2b45e8 |
movss %xmm1, 1 * SIZE(XX)
|
|
kusano |
2b45e8 |
movss %xmm2, 2 * SIZE(XX)
|
|
kusano |
2b45e8 |
movss %xmm3, 3 * SIZE(XX)
|
|
kusano |
2b45e8 |
movss %xmm4, 4 * SIZE(XX)
|
|
kusano |
2b45e8 |
movss %xmm5, 5 * SIZE(XX)
|
|
kusano |
2b45e8 |
movss %xmm6, 6 * SIZE(XX)
|
|
kusano |
2b45e8 |
movss %xmm7, 7 * 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 |
movss 0 * SIZE(YY), %xmm0
|
|
kusano |
2b45e8 |
addq INCY, YY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movss %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 |
movq IS, I
|
|
kusano |
2b45e8 |
addq $4, I
|
|
kusano |
2b45e8 |
cmpq M, I
|
|
kusano |
2b45e8 |
jg .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 (A, LDA, 4), A
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps 0 * SIZE(NEW_X, IS, SIZE), atemp4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pshufd $0x00, atemp4, atemp1
|
|
kusano |
2b45e8 |
pshufd $0x55, atemp4, atemp2
|
|
kusano |
2b45e8 |
pshufd $0xaa, atemp4, atemp3
|
|
kusano |
2b45e8 |
pshufd $0xff, atemp4, atemp4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pxor xsum1, xsum1
|
|
kusano |
2b45e8 |
pxor xsum2, xsum2
|
|
kusano |
2b45e8 |
pxor xsum3, xsum3
|
|
kusano |
2b45e8 |
pxor xsum4, xsum4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps 0 * SIZE(NEW_X), xtemp1
|
|
kusano |
2b45e8 |
movaps 4 * SIZE(NEW_X), xtemp2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movhps 2 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
movhps 2 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A2), a3
|
|
kusano |
2b45e8 |
movhps 2 * SIZE(A2), a3
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A2, LDA, 1), a4
|
|
kusano |
2b45e8 |
movhps 2 * SIZE(A2, LDA, 1), a4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(NEW_Y), yy1
|
|
kusano |
2b45e8 |
movhps 2 * SIZE(NEW_Y), yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq NEW_X, XX
|
|
kusano |
2b45e8 |
movq NEW_Y, YY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq IS, I
|
|
kusano |
2b45e8 |
sarq $4, I
|
|
kusano |
2b45e8 |
jle .L14
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L12:
|
|
kusano |
2b45e8 |
movaps xtemp1, xt1
|
|
kusano |
2b45e8 |
mulps a1, xt1
|
|
kusano |
2b45e8 |
mulps atemp1, a1
|
|
kusano |
2b45e8 |
addps xt1, xsum1
|
|
kusano |
2b45e8 |
addps a1, yy1
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movhps 6 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PREFETCH PREFETCHSIZE(A1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp1, xt1
|
|
kusano |
2b45e8 |
mulps a2, xt1
|
|
kusano |
2b45e8 |
mulps atemp2, a2
|
|
kusano |
2b45e8 |
addps xt1, xsum2
|
|
kusano |
2b45e8 |
addps a2, yy1
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
movhps 6 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp1, xt1
|
|
kusano |
2b45e8 |
mulps a3, xt1
|
|
kusano |
2b45e8 |
mulps atemp3, a3
|
|
kusano |
2b45e8 |
addps xt1, xsum3
|
|
kusano |
2b45e8 |
addps a3, yy1
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A2), a3
|
|
kusano |
2b45e8 |
movhps 6 * 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 |
movaps xtemp1, xt1
|
|
kusano |
2b45e8 |
movaps 8 * SIZE(XX), xtemp1
|
|
kusano |
2b45e8 |
mulps a4, xt1
|
|
kusano |
2b45e8 |
mulps atemp4, a4
|
|
kusano |
2b45e8 |
addps xt1, xsum4
|
|
kusano |
2b45e8 |
addps a4, yy1
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A2, LDA, 1), a4
|
|
kusano |
2b45e8 |
movhps 6 * SIZE(A2, LDA, 1), a4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlps yy1, 0 * SIZE(YY)
|
|
kusano |
2b45e8 |
movhps yy1, 2 * SIZE(YY)
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
movhps 6 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp2, xt1
|
|
kusano |
2b45e8 |
mulps a1, xt1
|
|
kusano |
2b45e8 |
mulps atemp1, a1
|
|
kusano |
2b45e8 |
addps xt1, xsum1
|
|
kusano |
2b45e8 |
addps a1, yy1
|
|
kusano |
2b45e8 |
movsd 8 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movhps 10 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PREFETCH PREFETCHSIZE(A1, LDA, 1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp2, xt1
|
|
kusano |
2b45e8 |
mulps a2, xt1
|
|
kusano |
2b45e8 |
mulps atemp2, a2
|
|
kusano |
2b45e8 |
addps xt1, xsum2
|
|
kusano |
2b45e8 |
addps a2, yy1
|
|
kusano |
2b45e8 |
movsd 8 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
movhps 10 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp2, xt1
|
|
kusano |
2b45e8 |
mulps a3, xt1
|
|
kusano |
2b45e8 |
mulps atemp3, a3
|
|
kusano |
2b45e8 |
addps xt1, xsum3
|
|
kusano |
2b45e8 |
addps a3, yy1
|
|
kusano |
2b45e8 |
movsd 8 * SIZE(A2), a3
|
|
kusano |
2b45e8 |
movhps 10 * SIZE(A2), a3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp2, xt1
|
|
kusano |
2b45e8 |
movaps 12 * SIZE(XX), xtemp2
|
|
kusano |
2b45e8 |
mulps a4, xt1
|
|
kusano |
2b45e8 |
mulps atemp4, a4
|
|
kusano |
2b45e8 |
addps xt1, xsum4
|
|
kusano |
2b45e8 |
addps a4, yy1
|
|
kusano |
2b45e8 |
movsd 8 * SIZE(A2, LDA, 1), a4
|
|
kusano |
2b45e8 |
movhps 10 * SIZE(A2, LDA, 1), a4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlps yy1, 4 * SIZE(YY)
|
|
kusano |
2b45e8 |
movhps yy1, 6 * SIZE(YY)
|
|
kusano |
2b45e8 |
movsd 8 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
movhps 10 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp1, xt1
|
|
kusano |
2b45e8 |
mulps a1, xt1
|
|
kusano |
2b45e8 |
mulps atemp1, a1
|
|
kusano |
2b45e8 |
addps xt1, xsum1
|
|
kusano |
2b45e8 |
addps a1, yy1
|
|
kusano |
2b45e8 |
movsd 12 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movhps 14 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PREFETCH PREFETCHSIZE(A2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp1, xt1
|
|
kusano |
2b45e8 |
mulps a2, xt1
|
|
kusano |
2b45e8 |
mulps atemp2, a2
|
|
kusano |
2b45e8 |
addps xt1, xsum2
|
|
kusano |
2b45e8 |
addps a2, yy1
|
|
kusano |
2b45e8 |
movsd 12 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
movhps 14 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp1, xt1
|
|
kusano |
2b45e8 |
mulps a3, xt1
|
|
kusano |
2b45e8 |
mulps atemp3, a3
|
|
kusano |
2b45e8 |
addps xt1, xsum3
|
|
kusano |
2b45e8 |
addps a3, yy1
|
|
kusano |
2b45e8 |
movsd 12 * SIZE(A2), a3
|
|
kusano |
2b45e8 |
movhps 14 * SIZE(A2), a3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if !defined(CORE2) && !defined(PENRYN) && !defined(DUNNINGTON)
|
|
kusano |
2b45e8 |
PREFETCHW PREFETCHSIZE(YY)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp1, xt1
|
|
kusano |
2b45e8 |
movaps 16 * SIZE(XX), xtemp1
|
|
kusano |
2b45e8 |
mulps a4, xt1
|
|
kusano |
2b45e8 |
mulps atemp4, a4
|
|
kusano |
2b45e8 |
addps xt1, xsum4
|
|
kusano |
2b45e8 |
addps a4, yy1
|
|
kusano |
2b45e8 |
movsd 12 * SIZE(A2, LDA, 1), a4
|
|
kusano |
2b45e8 |
movhps 14 * SIZE(A2, LDA, 1), a4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlps yy1, 8 * SIZE(YY)
|
|
kusano |
2b45e8 |
movhps yy1, 10 * SIZE(YY)
|
|
kusano |
2b45e8 |
movsd 12 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
movhps 14 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp2, xt1
|
|
kusano |
2b45e8 |
mulps a1, xt1
|
|
kusano |
2b45e8 |
mulps atemp1, a1
|
|
kusano |
2b45e8 |
addps xt1, xsum1
|
|
kusano |
2b45e8 |
addps a1, yy1
|
|
kusano |
2b45e8 |
movsd 16 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movhps 18 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PREFETCH PREFETCHSIZE(A2, LDA, 1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp2, xt1
|
|
kusano |
2b45e8 |
mulps a2, xt1
|
|
kusano |
2b45e8 |
mulps atemp2, a2
|
|
kusano |
2b45e8 |
addps xt1, xsum2
|
|
kusano |
2b45e8 |
addps a2, yy1
|
|
kusano |
2b45e8 |
movsd 16 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
movhps 18 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp2, xt1
|
|
kusano |
2b45e8 |
mulps a3, xt1
|
|
kusano |
2b45e8 |
mulps atemp3, a3
|
|
kusano |
2b45e8 |
addps xt1, xsum3
|
|
kusano |
2b45e8 |
addps a3, yy1
|
|
kusano |
2b45e8 |
movsd 16 * SIZE(A2), a3
|
|
kusano |
2b45e8 |
movhps 18 * SIZE(A2), a3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp2, xt1
|
|
kusano |
2b45e8 |
movaps 20 * SIZE(XX), xtemp2
|
|
kusano |
2b45e8 |
mulps a4, xt1
|
|
kusano |
2b45e8 |
mulps atemp4, a4
|
|
kusano |
2b45e8 |
addps xt1, xsum4
|
|
kusano |
2b45e8 |
addps a4, yy1
|
|
kusano |
2b45e8 |
movsd 16 * SIZE(A2, LDA, 1), a4
|
|
kusano |
2b45e8 |
movhps 18 * SIZE(A2, LDA, 1), a4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlps yy1, 12 * SIZE(YY)
|
|
kusano |
2b45e8 |
movhps yy1, 14 * SIZE(YY)
|
|
kusano |
2b45e8 |
movsd 16 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
movhps 18 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $16 * SIZE, XX
|
|
kusano |
2b45e8 |
addq $16 * SIZE, YY
|
|
kusano |
2b45e8 |
addq $16 * SIZE, A1
|
|
kusano |
2b45e8 |
addq $16 * SIZE, A2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
decq I
|
|
kusano |
2b45e8 |
jg .L12
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L14:
|
|
kusano |
2b45e8 |
testq $8, IS
|
|
kusano |
2b45e8 |
jle .L15
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp1, xt1
|
|
kusano |
2b45e8 |
mulps a1, xt1
|
|
kusano |
2b45e8 |
mulps atemp1, a1
|
|
kusano |
2b45e8 |
addps xt1, xsum1
|
|
kusano |
2b45e8 |
addps a1, yy1
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movhps 6 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp1, xt1
|
|
kusano |
2b45e8 |
mulps a2, xt1
|
|
kusano |
2b45e8 |
mulps atemp2, a2
|
|
kusano |
2b45e8 |
addps xt1, xsum2
|
|
kusano |
2b45e8 |
addps a2, yy1
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
movhps 6 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp1, xt1
|
|
kusano |
2b45e8 |
mulps a3, xt1
|
|
kusano |
2b45e8 |
mulps atemp3, a3
|
|
kusano |
2b45e8 |
addps xt1, xsum3
|
|
kusano |
2b45e8 |
addps a3, yy1
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A2), a3
|
|
kusano |
2b45e8 |
movhps 6 * SIZE(A2), a3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp1, xt1
|
|
kusano |
2b45e8 |
movaps 8 * SIZE(XX), xtemp1
|
|
kusano |
2b45e8 |
mulps a4, xt1
|
|
kusano |
2b45e8 |
mulps atemp4, a4
|
|
kusano |
2b45e8 |
addps xt1, xsum4
|
|
kusano |
2b45e8 |
addps a4, yy1
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A2, LDA, 1), a4
|
|
kusano |
2b45e8 |
movhps 6 * SIZE(A2, LDA, 1), a4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlps yy1, 0 * SIZE(YY)
|
|
kusano |
2b45e8 |
movhps yy1, 2 * SIZE(YY)
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
movhps 6 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp2, xt1
|
|
kusano |
2b45e8 |
mulps a1, xt1
|
|
kusano |
2b45e8 |
mulps atemp1, a1
|
|
kusano |
2b45e8 |
addps xt1, xsum1
|
|
kusano |
2b45e8 |
addps a1, yy1
|
|
kusano |
2b45e8 |
movsd 8 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movhps 10 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp2, xt1
|
|
kusano |
2b45e8 |
mulps a2, xt1
|
|
kusano |
2b45e8 |
mulps atemp2, a2
|
|
kusano |
2b45e8 |
addps xt1, xsum2
|
|
kusano |
2b45e8 |
addps a2, yy1
|
|
kusano |
2b45e8 |
movsd 8 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
movhps 10 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp2, xt1
|
|
kusano |
2b45e8 |
mulps a3, xt1
|
|
kusano |
2b45e8 |
mulps atemp3, a3
|
|
kusano |
2b45e8 |
addps xt1, xsum3
|
|
kusano |
2b45e8 |
addps a3, yy1
|
|
kusano |
2b45e8 |
movsd 8 * SIZE(A2), a3
|
|
kusano |
2b45e8 |
movhps 10 * SIZE(A2), a3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp2, xt1
|
|
kusano |
2b45e8 |
movaps 12 * SIZE(XX), xtemp2
|
|
kusano |
2b45e8 |
mulps a4, xt1
|
|
kusano |
2b45e8 |
mulps atemp4, a4
|
|
kusano |
2b45e8 |
addps xt1, xsum4
|
|
kusano |
2b45e8 |
addps a4, yy1
|
|
kusano |
2b45e8 |
movsd 8 * SIZE(A2, LDA, 1), a4
|
|
kusano |
2b45e8 |
movhps 10 * SIZE(A2, LDA, 1), a4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlps yy1, 4 * SIZE(YY)
|
|
kusano |
2b45e8 |
movhps yy1, 6 * SIZE(YY)
|
|
kusano |
2b45e8 |
movsd 8 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
movhps 10 * SIZE(YY), yy1
|
|
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 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L15:
|
|
kusano |
2b45e8 |
testq $4, IS
|
|
kusano |
2b45e8 |
jle .L18
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp1, xt1
|
|
kusano |
2b45e8 |
mulps a1, xt1
|
|
kusano |
2b45e8 |
mulps atemp1, a1
|
|
kusano |
2b45e8 |
addps xt1, xsum1
|
|
kusano |
2b45e8 |
addps a1, yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp1, xt1
|
|
kusano |
2b45e8 |
mulps a2, xt1
|
|
kusano |
2b45e8 |
mulps atemp2, a2
|
|
kusano |
2b45e8 |
addps xt1, xsum2
|
|
kusano |
2b45e8 |
addps a2, yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp1, xt1
|
|
kusano |
2b45e8 |
mulps a3, xt1
|
|
kusano |
2b45e8 |
mulps atemp3, a3
|
|
kusano |
2b45e8 |
addps xt1, xsum3
|
|
kusano |
2b45e8 |
addps a3, yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp1, xt1
|
|
kusano |
2b45e8 |
mulps a4, xt1
|
|
kusano |
2b45e8 |
mulps atemp4, a4
|
|
kusano |
2b45e8 |
addps xt1, xsum4
|
|
kusano |
2b45e8 |
addps a4, yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlps yy1, 0 * SIZE(YY)
|
|
kusano |
2b45e8 |
movhps yy1, 2 * SIZE(YY)
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
movhps 6 * SIZE(YY), yy1
|
|
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 |
.L18:
|
|
kusano |
2b45e8 |
movaps 0 * SIZE(NEW_X, IS, SIZE), atemp1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movss 0 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movss 0 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
movss 0 * SIZE(A2), a3
|
|
kusano |
2b45e8 |
movss 0 * SIZE(A2, LDA, 1), a4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
unpcklps a3, a1
|
|
kusano |
2b45e8 |
unpcklps a4, a2
|
|
kusano |
2b45e8 |
unpcklps a2, a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulps atemp1, a1
|
|
kusano |
2b45e8 |
addps a1, xsum1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A1, LDA, 1), a1
|
|
kusano |
2b45e8 |
movss 1 * SIZE(A2), a2
|
|
kusano |
2b45e8 |
movhps 1 * SIZE(A2, LDA, 1), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
shufps $0x84, a2, a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulps atemp1, a1
|
|
kusano |
2b45e8 |
addps a1, xsum2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A2), a1
|
|
kusano |
2b45e8 |
movss 2 * SIZE(A2), a2
|
|
kusano |
2b45e8 |
movhps 2 * SIZE(A2, LDA, 1), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
shufps $0x84, a2, a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulps atemp1, a1
|
|
kusano |
2b45e8 |
addps a1, xsum3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A2, LDA, 1), a1
|
|
kusano |
2b45e8 |
movhps 2 * SIZE(A2, LDA, 1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulps atemp1, a1
|
|
kusano |
2b45e8 |
addps a1, xsum4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef HAVE_SSE3
|
|
kusano |
2b45e8 |
movaps xsum1, xtemp1
|
|
kusano |
2b45e8 |
unpcklps xsum3, xsum1
|
|
kusano |
2b45e8 |
unpckhps xsum3, xtemp1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xsum2, xtemp2
|
|
kusano |
2b45e8 |
unpcklps xsum4, xsum2
|
|
kusano |
2b45e8 |
unpckhps xsum4, xtemp2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xsum1, xsum3
|
|
kusano |
2b45e8 |
unpcklps xsum2, xsum1
|
|
kusano |
2b45e8 |
unpckhps xsum2, xsum3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp1, xsum4
|
|
kusano |
2b45e8 |
unpcklps xtemp2, xtemp1
|
|
kusano |
2b45e8 |
unpckhps xtemp2, xsum4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addps xsum3, xsum1
|
|
kusano |
2b45e8 |
addps xtemp1, xsum4
|
|
kusano |
2b45e8 |
addps xsum4, xsum1
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
haddps xsum2, xsum1
|
|
kusano |
2b45e8 |
haddps xsum4, xsum3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
haddps xsum3, xsum1
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addps xsum1, yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlps yy1, 0 * SIZE(YY)
|
|
kusano |
2b45e8 |
movhps yy1, 2 * SIZE(YY)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $4, IS
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq IS, I
|
|
kusano |
2b45e8 |
addq $4, I
|
|
kusano |
2b45e8 |
cmpq M, I
|
|
kusano |
2b45e8 |
jle .L11
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L20:
|
|
kusano |
2b45e8 |
testq $2, M
|
|
kusano |
2b45e8 |
jle .L30
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq A, A1
|
|
kusano |
2b45e8 |
leaq (A, LDA, 2), A
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(NEW_X, IS, SIZE), atemp4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pshufd $0x00, atemp4, atemp1
|
|
kusano |
2b45e8 |
pshufd $0x55, atemp4, atemp2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pxor xsum1, xsum1
|
|
kusano |
2b45e8 |
pxor xsum2, xsum2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps 0 * SIZE(NEW_X), xtemp1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movhps 2 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
movhps 2 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(NEW_Y), yy1
|
|
kusano |
2b45e8 |
movhps 2 * SIZE(NEW_Y), yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq NEW_X, XX
|
|
kusano |
2b45e8 |
movq NEW_Y, YY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq IS, I
|
|
kusano |
2b45e8 |
sarq $2, I
|
|
kusano |
2b45e8 |
jle .L28
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L22:
|
|
kusano |
2b45e8 |
movaps xtemp1, xt1
|
|
kusano |
2b45e8 |
mulps a1, xt1
|
|
kusano |
2b45e8 |
mulps atemp1, a1
|
|
kusano |
2b45e8 |
addps xt1, xsum1
|
|
kusano |
2b45e8 |
addps a1, yy1
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movhps 6 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp1, xt1
|
|
kusano |
2b45e8 |
movaps 4 * SIZE(XX), xtemp1
|
|
kusano |
2b45e8 |
mulps a2, xt1
|
|
kusano |
2b45e8 |
mulps atemp2, a2
|
|
kusano |
2b45e8 |
addps xt1, xsum2
|
|
kusano |
2b45e8 |
addps a2, yy1
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
movhps 6 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlps yy1, 0 * SIZE(YY)
|
|
kusano |
2b45e8 |
movhps yy1, 2 * SIZE(YY)
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
movhps 6 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $4 * SIZE, XX
|
|
kusano |
2b45e8 |
addq $4 * SIZE, YY
|
|
kusano |
2b45e8 |
addq $4 * SIZE, A1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
decq I
|
|
kusano |
2b45e8 |
jg .L22
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L28:
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(NEW_X, IS, SIZE), atemp1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movss 0 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movss 0 * SIZE(A1, LDA, 1), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
unpcklps a2, a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulps atemp1, a1
|
|
kusano |
2b45e8 |
addps a1, xsum1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A1, LDA, 1), a1
|
|
kusano |
2b45e8 |
mulps atemp1, a1
|
|
kusano |
2b45e8 |
addps a1, xsum2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef HAVE_SSE3
|
|
kusano |
2b45e8 |
movhlps xsum1, xsum3
|
|
kusano |
2b45e8 |
movhlps xsum2, xsum4
|
|
kusano |
2b45e8 |
addps xsum3, xsum1
|
|
kusano |
2b45e8 |
addps xsum4, xsum2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
unpcklps xsum2, xsum1
|
|
kusano |
2b45e8 |
movhlps xsum1, xsum2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addps xsum2, xsum1
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
haddps xsum2, xsum1
|
|
kusano |
2b45e8 |
haddps xsum1, xsum1
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addps xsum1, yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movlps yy1, 0 * SIZE(YY)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $2, IS
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L30:
|
|
kusano |
2b45e8 |
testq $1, M
|
|
kusano |
2b45e8 |
jle .L990
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq A, A1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movss 0 * SIZE(NEW_X, IS, SIZE), atemp1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pshufd $0x00, atemp1, atemp1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
pxor xsum1, xsum1
|
|
kusano |
2b45e8 |
pxor xsum2, xsum2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movss 0 * SIZE(NEW_Y), yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movss 0 * SIZE(NEW_X), xtemp1
|
|
kusano |
2b45e8 |
movss 1 * SIZE(NEW_X), xtemp2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movss 0 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
movss 1 * SIZE(A1), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq NEW_X, XX
|
|
kusano |
2b45e8 |
movq NEW_Y, YY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq IS, I
|
|
kusano |
2b45e8 |
sarq $1, I
|
|
kusano |
2b45e8 |
jle .L38
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L32:
|
|
kusano |
2b45e8 |
movaps xtemp1, xt1
|
|
kusano |
2b45e8 |
movss 2 * SIZE(XX), xtemp1
|
|
kusano |
2b45e8 |
mulps a1, xt1
|
|
kusano |
2b45e8 |
mulps atemp1, a1
|
|
kusano |
2b45e8 |
addps xt1, xsum1
|
|
kusano |
2b45e8 |
addps a1, yy1
|
|
kusano |
2b45e8 |
movss 2 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movss yy1, 0 * SIZE(YY)
|
|
kusano |
2b45e8 |
movss 1 * SIZE(YY), yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movaps xtemp2, xt1
|
|
kusano |
2b45e8 |
movss 3 * SIZE(XX), xtemp2
|
|
kusano |
2b45e8 |
mulps a2, xt1
|
|
kusano |
2b45e8 |
mulps atemp1, a2
|
|
kusano |
2b45e8 |
addps xt1, xsum1
|
|
kusano |
2b45e8 |
addps a2, yy1
|
|
kusano |
2b45e8 |
movss 3 * SIZE(A1), a2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movss yy1, 1 * SIZE(YY)
|
|
kusano |
2b45e8 |
movss 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 |
|
|
kusano |
2b45e8 |
decq I
|
|
kusano |
2b45e8 |
jg .L32
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L38:
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(NEW_X, IS, SIZE), atemp1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movss 0 * SIZE(A1), a1
|
|
kusano |
2b45e8 |
mulss atemp1, a1
|
|
kusano |
2b45e8 |
addss a1, xsum1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef HAVE_SSE3
|
|
kusano |
2b45e8 |
movhlps xsum1, xsum3
|
|
kusano |
2b45e8 |
movhlps xsum2, xsum4
|
|
kusano |
2b45e8 |
addps xsum3, xsum1
|
|
kusano |
2b45e8 |
addps xsum4, xsum2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
unpcklps xsum2, xsum1
|
|
kusano |
2b45e8 |
movhlps xsum1, xsum2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addps xsum2, xsum1
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
addss xsum2, xsum1
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addss xsum1, yy1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movss yy1, 0 * SIZE(YY)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $2, IS
|
|
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 |
movss 0 * SIZE(NEW_Y), %xmm0
|
|
kusano |
2b45e8 |
movss 1 * SIZE(NEW_Y), %xmm1
|
|
kusano |
2b45e8 |
movss 2 * SIZE(NEW_Y), %xmm2
|
|
kusano |
2b45e8 |
movss 3 * SIZE(NEW_Y), %xmm3
|
|
kusano |
2b45e8 |
movss 4 * SIZE(NEW_Y), %xmm4
|
|
kusano |
2b45e8 |
movss 5 * SIZE(NEW_Y), %xmm5
|
|
kusano |
2b45e8 |
movss 6 * SIZE(NEW_Y), %xmm6
|
|
kusano |
2b45e8 |
movss 7 * SIZE(NEW_Y), %xmm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movss %xmm0, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
movss %xmm1, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
movss %xmm2, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
movss %xmm3, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
movss %xmm4, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
movss %xmm5, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
movss %xmm6, 0 * SIZE(Y)
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
movss %xmm7, 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 |
movss 0 * SIZE(NEW_Y), %xmm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movss %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
|