|
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 |
#include "l2param.h"
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define PREFETCH prefetchnta
|
|
kusano |
2b45e8 |
#define PREFETCHW prefetcht0
|
|
kusano |
2b45e8 |
#define PREFETCH_SIZE (8 * 6)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef WINDOWS_ABI
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define STACKSIZE 64
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define OLD_INCX 8 + STACKSIZE(%rsp)
|
|
kusano |
2b45e8 |
#define OLD_Y 16 + STACKSIZE(%rsp)
|
|
kusano |
2b45e8 |
#define OLD_INCY 24 + STACKSIZE(%rsp)
|
|
kusano |
2b45e8 |
#define OLD_BUFFER 32 + STACKSIZE(%rsp)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define M %rdi
|
|
kusano |
2b45e8 |
#define N %rsi
|
|
kusano |
2b45e8 |
#define A %rcx
|
|
kusano |
2b45e8 |
#define LDA %r8
|
|
kusano |
2b45e8 |
#define X %r9
|
|
kusano |
2b45e8 |
#define INCX %rdx
|
|
kusano |
2b45e8 |
#define Y %rbp
|
|
kusano |
2b45e8 |
#define INCY %r10
|
|
kusano |
2b45e8 |
#define BUFFER %rbx
|
|
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 %rcx
|
|
kusano |
2b45e8 |
#define N %rdx
|
|
kusano |
2b45e8 |
#define A %rdi
|
|
kusano |
2b45e8 |
#define LDA %r8
|
|
kusano |
2b45e8 |
#define X %r9
|
|
kusano |
2b45e8 |
#define INCX %rsi
|
|
kusano |
2b45e8 |
#define Y %rbp
|
|
kusano |
2b45e8 |
#define INCY %r10
|
|
kusano |
2b45e8 |
#define BUFFER %rbx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define I %rax
|
|
kusano |
2b45e8 |
#define J %r11
|
|
kusano |
2b45e8 |
#define A1 %r12
|
|
kusano |
2b45e8 |
#define A2 %r13
|
|
kusano |
2b45e8 |
#define X1 %r14
|
|
kusano |
2b45e8 |
#define Y1 %r15
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define ALPHA %xmm3
|
|
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 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq OLD_INCX, INCX
|
|
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 |
#ifndef WINDOWS_ABI
|
|
kusano |
2b45e8 |
movapd %xmm0, ALPHA
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq Y, Y1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
testq M, M
|
|
kusano |
2b45e8 |
jle .L999
|
|
kusano |
2b45e8 |
testq N, N
|
|
kusano |
2b45e8 |
jle .L999
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
cmpq $SIZE, INCX
|
|
kusano |
2b45e8 |
cmoveq X, BUFFER
|
|
kusano |
2b45e8 |
je .L10
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq BUFFER, X1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq M, I
|
|
kusano |
2b45e8 |
sarq $3, I
|
|
kusano |
2b45e8 |
jle .L05
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L02:
|
|
kusano |
2b45e8 |
movsd (X), %xmm0
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
movsd (X), %xmm1
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd (X), %xmm2
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
movsd (X), %xmm8
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd (X), %xmm4
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
movsd (X), %xmm5
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd (X), %xmm6
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
movsd (X), %xmm7
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd %xmm0, 0 * SIZE(X1)
|
|
kusano |
2b45e8 |
movsd %xmm1, 1 * SIZE(X1)
|
|
kusano |
2b45e8 |
movsd %xmm2, 2 * SIZE(X1)
|
|
kusano |
2b45e8 |
movsd %xmm8, 3 * SIZE(X1)
|
|
kusano |
2b45e8 |
movsd %xmm4, 4 * SIZE(X1)
|
|
kusano |
2b45e8 |
movsd %xmm5, 5 * SIZE(X1)
|
|
kusano |
2b45e8 |
movsd %xmm6, 6 * SIZE(X1)
|
|
kusano |
2b45e8 |
movsd %xmm7, 7 * SIZE(X1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $8 * SIZE, X1
|
|
kusano |
2b45e8 |
decq I
|
|
kusano |
2b45e8 |
jg .L02
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L05:
|
|
kusano |
2b45e8 |
movq M, I
|
|
kusano |
2b45e8 |
andq $7, I
|
|
kusano |
2b45e8 |
jle .L10
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L06:
|
|
kusano |
2b45e8 |
movsd (X), %xmm0
|
|
kusano |
2b45e8 |
addq INCX, X
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd %xmm0, (X1)
|
|
kusano |
2b45e8 |
addq $SIZE, X1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
decq I
|
|
kusano |
2b45e8 |
jg .L06
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L10:
|
|
kusano |
2b45e8 |
movq N, J
|
|
kusano |
2b45e8 |
sarq $1, J
|
|
kusano |
2b45e8 |
jle .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 (A, LDA, 2), A
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq BUFFER, X1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
xorps %xmm0, %xmm0
|
|
kusano |
2b45e8 |
xorps %xmm1, %xmm1
|
|
kusano |
2b45e8 |
PREFETCHW 1 * SIZE(X1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq M, I
|
|
kusano |
2b45e8 |
sarq $3, I
|
|
kusano |
2b45e8 |
jle .L14
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(X1), %xmm4
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A1), %xmm8
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A2), %xmm12
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(X1), %xmm5
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(A1), %xmm9
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(A2), %xmm13
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(X1), %xmm6
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(A1), %xmm10
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(A2), %xmm14
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 3 * SIZE(X1), %xmm7
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm8
|
|
kusano |
2b45e8 |
movsd 3 * SIZE(A1), %xmm11
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm12
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(X1), %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulsd %xmm5, %xmm9
|
|
kusano |
2b45e8 |
movsd 3 * SIZE(A2), %xmm15
|
|
kusano |
2b45e8 |
mulsd %xmm5, %xmm13
|
|
kusano |
2b45e8 |
movsd 5 * SIZE(X1), %xmm5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
decq I
|
|
kusano |
2b45e8 |
jle .L13
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L12:
|
|
kusano |
2b45e8 |
PREFETCH PREFETCH_SIZE * SIZE(A1)
|
|
kusano |
2b45e8 |
addsd %xmm8, %xmm0
|
|
kusano |
2b45e8 |
PREFETCH PREFETCH_SIZE * SIZE(A2)
|
|
kusano |
2b45e8 |
mulsd %xmm6, %xmm10
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A1), %xmm8
|
|
kusano |
2b45e8 |
addsd %xmm12, %xmm1
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A2), %xmm12
|
|
kusano |
2b45e8 |
mulsd %xmm6, %xmm14
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(X1), %xmm6
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm9, %xmm0
|
|
kusano |
2b45e8 |
movsd 5 * SIZE(A1), %xmm9
|
|
kusano |
2b45e8 |
mulsd %xmm7, %xmm11
|
|
kusano |
2b45e8 |
addsd %xmm13, %xmm1
|
|
kusano |
2b45e8 |
movsd 5 * SIZE(A2), %xmm13
|
|
kusano |
2b45e8 |
mulsd %xmm7, %xmm15
|
|
kusano |
2b45e8 |
movsd 7 * SIZE(X1), %xmm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm10, %xmm0
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(A1), %xmm10
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm8
|
|
kusano |
2b45e8 |
addsd %xmm14, %xmm1
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(A2), %xmm14
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm12
|
|
kusano |
2b45e8 |
movsd 8 * SIZE(X1), %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm11, %xmm0
|
|
kusano |
2b45e8 |
movsd 7 * SIZE(A1), %xmm11
|
|
kusano |
2b45e8 |
mulsd %xmm5, %xmm9
|
|
kusano |
2b45e8 |
addsd %xmm15, %xmm1
|
|
kusano |
2b45e8 |
movsd 7 * SIZE(A2), %xmm15
|
|
kusano |
2b45e8 |
mulsd %xmm5, %xmm13
|
|
kusano |
2b45e8 |
movsd 9 * SIZE(X1), %xmm5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm8, %xmm0
|
|
kusano |
2b45e8 |
movsd 8 * SIZE(A1), %xmm8
|
|
kusano |
2b45e8 |
mulsd %xmm6, %xmm10
|
|
kusano |
2b45e8 |
addq $8 * SIZE, X1
|
|
kusano |
2b45e8 |
addsd %xmm12, %xmm1
|
|
kusano |
2b45e8 |
movsd 8 * SIZE(A2), %xmm12
|
|
kusano |
2b45e8 |
mulsd %xmm6, %xmm14
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(X1), %xmm6
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm9, %xmm0
|
|
kusano |
2b45e8 |
movsd 9 * SIZE(A1), %xmm9
|
|
kusano |
2b45e8 |
mulsd %xmm7, %xmm11
|
|
kusano |
2b45e8 |
addq $8 * SIZE, A2
|
|
kusano |
2b45e8 |
addsd %xmm13, %xmm1
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(A2), %xmm13
|
|
kusano |
2b45e8 |
mulsd %xmm7, %xmm15
|
|
kusano |
2b45e8 |
movsd 3 * SIZE(X1), %xmm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm10, %xmm0
|
|
kusano |
2b45e8 |
movsd 10 * SIZE(A1), %xmm10
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm8
|
|
kusano |
2b45e8 |
addq $8 * SIZE, A1
|
|
kusano |
2b45e8 |
addsd %xmm14, %xmm1
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(A2), %xmm14
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm12
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(X1), %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm11, %xmm0
|
|
kusano |
2b45e8 |
movsd 3 * SIZE(A1), %xmm11
|
|
kusano |
2b45e8 |
mulsd %xmm5, %xmm9
|
|
kusano |
2b45e8 |
decq I
|
|
kusano |
2b45e8 |
addsd %xmm15, %xmm1
|
|
kusano |
2b45e8 |
movsd 3 * SIZE(A2), %xmm15
|
|
kusano |
2b45e8 |
mulsd %xmm5, %xmm13
|
|
kusano |
2b45e8 |
movsd 5 * SIZE(X1), %xmm5
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
jg .L12
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L13:
|
|
kusano |
2b45e8 |
addsd %xmm8, %xmm0
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A1), %xmm8
|
|
kusano |
2b45e8 |
mulsd %xmm6, %xmm10
|
|
kusano |
2b45e8 |
addsd %xmm12, %xmm1
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A2), %xmm12
|
|
kusano |
2b45e8 |
mulsd %xmm6, %xmm14
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(X1), %xmm6
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm9, %xmm0
|
|
kusano |
2b45e8 |
movsd 5 * SIZE(A1), %xmm9
|
|
kusano |
2b45e8 |
mulsd %xmm7, %xmm11
|
|
kusano |
2b45e8 |
addsd %xmm13, %xmm1
|
|
kusano |
2b45e8 |
movsd 5 * SIZE(A2), %xmm13
|
|
kusano |
2b45e8 |
mulsd %xmm7, %xmm15
|
|
kusano |
2b45e8 |
movsd 7 * SIZE(X1), %xmm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm10, %xmm0
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(A1), %xmm10
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm8
|
|
kusano |
2b45e8 |
addsd %xmm14, %xmm1
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(A2), %xmm14
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm12
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm11, %xmm0
|
|
kusano |
2b45e8 |
movsd 7 * SIZE(A1), %xmm11
|
|
kusano |
2b45e8 |
mulsd %xmm5, %xmm9
|
|
kusano |
2b45e8 |
addsd %xmm15, %xmm1
|
|
kusano |
2b45e8 |
movsd 7 * SIZE(A2), %xmm15
|
|
kusano |
2b45e8 |
mulsd %xmm5, %xmm13
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm8, %xmm0
|
|
kusano |
2b45e8 |
mulsd %xmm6, %xmm10
|
|
kusano |
2b45e8 |
addsd %xmm12, %xmm1
|
|
kusano |
2b45e8 |
mulsd %xmm6, %xmm14
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm9, %xmm0
|
|
kusano |
2b45e8 |
mulsd %xmm7, %xmm11
|
|
kusano |
2b45e8 |
addsd %xmm13, %xmm1
|
|
kusano |
2b45e8 |
mulsd %xmm7, %xmm15
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm10, %xmm0
|
|
kusano |
2b45e8 |
addq $8 * SIZE, A1
|
|
kusano |
2b45e8 |
addsd %xmm14, %xmm1
|
|
kusano |
2b45e8 |
addq $8 * SIZE, A2
|
|
kusano |
2b45e8 |
addsd %xmm11, %xmm0
|
|
kusano |
2b45e8 |
addq $8 * SIZE, X1
|
|
kusano |
2b45e8 |
addsd %xmm15, %xmm1
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L14:
|
|
kusano |
2b45e8 |
testq $4, M
|
|
kusano |
2b45e8 |
je .L16
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(X1), %xmm4
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A1), %xmm8
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A2), %xmm12
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(X1), %xmm5
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(A1), %xmm9
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(A2), %xmm13
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(X1), %xmm6
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(A1), %xmm10
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(A2), %xmm14
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 3 * SIZE(X1), %xmm7
|
|
kusano |
2b45e8 |
movsd 3 * SIZE(A1), %xmm11
|
|
kusano |
2b45e8 |
movsd 3 * SIZE(A2), %xmm15
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm8
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm12
|
|
kusano |
2b45e8 |
mulsd %xmm5, %xmm9
|
|
kusano |
2b45e8 |
mulsd %xmm5, %xmm13
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm8, %xmm0
|
|
kusano |
2b45e8 |
addsd %xmm12, %xmm1
|
|
kusano |
2b45e8 |
addsd %xmm9, %xmm0
|
|
kusano |
2b45e8 |
addsd %xmm13, %xmm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulsd %xmm6, %xmm10
|
|
kusano |
2b45e8 |
mulsd %xmm6, %xmm14
|
|
kusano |
2b45e8 |
mulsd %xmm7, %xmm11
|
|
kusano |
2b45e8 |
mulsd %xmm7, %xmm15
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm10, %xmm0
|
|
kusano |
2b45e8 |
addsd %xmm14, %xmm1
|
|
kusano |
2b45e8 |
addsd %xmm11, %xmm0
|
|
kusano |
2b45e8 |
addsd %xmm15, %xmm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $4 * SIZE, A1
|
|
kusano |
2b45e8 |
addq $4 * SIZE, A2
|
|
kusano |
2b45e8 |
addq $4 * SIZE, X1
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L16:
|
|
kusano |
2b45e8 |
testq $2, M
|
|
kusano |
2b45e8 |
je .L17
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(X1), %xmm4
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A1), %xmm8
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A2), %xmm12
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(X1), %xmm5
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(A1), %xmm9
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(A2), %xmm13
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm8
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm12
|
|
kusano |
2b45e8 |
mulsd %xmm5, %xmm9
|
|
kusano |
2b45e8 |
mulsd %xmm5, %xmm13
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm8, %xmm0
|
|
kusano |
2b45e8 |
addsd %xmm12, %xmm1
|
|
kusano |
2b45e8 |
addsd %xmm9, %xmm0
|
|
kusano |
2b45e8 |
addsd %xmm13, %xmm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $2 * SIZE, A1
|
|
kusano |
2b45e8 |
addq $2 * SIZE, A2
|
|
kusano |
2b45e8 |
addq $2 * SIZE, X1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L17:
|
|
kusano |
2b45e8 |
testq $1, M
|
|
kusano |
2b45e8 |
je .L19
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(X1), %xmm4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A1), %xmm8
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A2), %xmm12
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm8
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm12
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm8, %xmm0
|
|
kusano |
2b45e8 |
addsd %xmm12, %xmm1
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L19:
|
|
kusano |
2b45e8 |
mulsd ALPHA, %xmm0
|
|
kusano |
2b45e8 |
addsd (Y), %xmm0
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulsd ALPHA, %xmm1
|
|
kusano |
2b45e8 |
addsd (Y), %xmm1
|
|
kusano |
2b45e8 |
addq INCY, Y
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd %xmm0, (Y1)
|
|
kusano |
2b45e8 |
addq INCY, Y1
|
|
kusano |
2b45e8 |
movsd %xmm1, (Y1)
|
|
kusano |
2b45e8 |
addq INCY, Y1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
decq J
|
|
kusano |
2b45e8 |
jg .L11
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L20:
|
|
kusano |
2b45e8 |
testq $1, N
|
|
kusano |
2b45e8 |
jle .L999
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq A, A1
|
|
kusano |
2b45e8 |
movq BUFFER, X1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
xorps %xmm0, %xmm0
|
|
kusano |
2b45e8 |
xorps %xmm1, %xmm1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movq M, I
|
|
kusano |
2b45e8 |
sarq $3, I
|
|
kusano |
2b45e8 |
jle .L24
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(X1), %xmm4
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A1), %xmm8
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(X1), %xmm5
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(A1), %xmm9
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(X1), %xmm6
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(A1), %xmm10
|
|
kusano |
2b45e8 |
movsd 3 * SIZE(X1), %xmm7
|
|
kusano |
2b45e8 |
movsd 3 * SIZE(A1), %xmm11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm8
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(X1), %xmm4
|
|
kusano |
2b45e8 |
mulsd %xmm5, %xmm9
|
|
kusano |
2b45e8 |
movsd 5 * SIZE(X1), %xmm5
|
|
kusano |
2b45e8 |
mulsd %xmm6, %xmm10
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(X1), %xmm6
|
|
kusano |
2b45e8 |
mulsd %xmm7, %xmm11
|
|
kusano |
2b45e8 |
movsd 7 * SIZE(X1), %xmm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
decq I
|
|
kusano |
2b45e8 |
jle .L23
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L22:
|
|
kusano |
2b45e8 |
PREFETCH PREFETCH_SIZE * SIZE(A1)
|
|
kusano |
2b45e8 |
addsd %xmm8, %xmm0
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A1), %xmm8
|
|
kusano |
2b45e8 |
addsd %xmm9, %xmm0
|
|
kusano |
2b45e8 |
movsd 5 * SIZE(A1), %xmm9
|
|
kusano |
2b45e8 |
addsd %xmm10, %xmm0
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(A1), %xmm10
|
|
kusano |
2b45e8 |
addsd %xmm11, %xmm0
|
|
kusano |
2b45e8 |
movsd 7 * SIZE(A1), %xmm11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm8
|
|
kusano |
2b45e8 |
movsd 8 * SIZE(X1), %xmm4
|
|
kusano |
2b45e8 |
mulsd %xmm5, %xmm9
|
|
kusano |
2b45e8 |
movsd 9 * SIZE(X1), %xmm5
|
|
kusano |
2b45e8 |
mulsd %xmm6, %xmm10
|
|
kusano |
2b45e8 |
movsd 10 * SIZE(X1), %xmm6
|
|
kusano |
2b45e8 |
mulsd %xmm7, %xmm11
|
|
kusano |
2b45e8 |
movsd 11 * SIZE(X1), %xmm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm8, %xmm0
|
|
kusano |
2b45e8 |
movsd 8 * SIZE(A1), %xmm8
|
|
kusano |
2b45e8 |
addsd %xmm9, %xmm1
|
|
kusano |
2b45e8 |
movsd 9 * SIZE(A1), %xmm9
|
|
kusano |
2b45e8 |
addsd %xmm10, %xmm1
|
|
kusano |
2b45e8 |
movsd 10 * SIZE(A1), %xmm10
|
|
kusano |
2b45e8 |
addsd %xmm11, %xmm0
|
|
kusano |
2b45e8 |
movsd 11 * SIZE(A1), %xmm11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm8
|
|
kusano |
2b45e8 |
movsd 12 * SIZE(X1), %xmm4
|
|
kusano |
2b45e8 |
mulsd %xmm5, %xmm9
|
|
kusano |
2b45e8 |
movsd 13 * SIZE(X1), %xmm5
|
|
kusano |
2b45e8 |
mulsd %xmm6, %xmm10
|
|
kusano |
2b45e8 |
movsd 14 * SIZE(X1), %xmm6
|
|
kusano |
2b45e8 |
mulsd %xmm7, %xmm11
|
|
kusano |
2b45e8 |
movsd 15 * SIZE(X1), %xmm7
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addq $8 * SIZE, A1
|
|
kusano |
2b45e8 |
addq $8 * SIZE, X1
|
|
kusano |
2b45e8 |
decq I
|
|
kusano |
2b45e8 |
jg .L22
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L23:
|
|
kusano |
2b45e8 |
addsd %xmm8, %xmm0
|
|
kusano |
2b45e8 |
movsd 4 * SIZE(A1), %xmm8
|
|
kusano |
2b45e8 |
addsd %xmm9, %xmm1
|
|
kusano |
2b45e8 |
movsd 5 * SIZE(A1), %xmm9
|
|
kusano |
2b45e8 |
addsd %xmm10, %xmm0
|
|
kusano |
2b45e8 |
movsd 6 * SIZE(A1), %xmm10
|
|
kusano |
2b45e8 |
addsd %xmm11, %xmm1
|
|
kusano |
2b45e8 |
movsd 7 * SIZE(A1), %xmm11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm8
|
|
kusano |
2b45e8 |
mulsd %xmm5, %xmm9
|
|
kusano |
2b45e8 |
mulsd %xmm6, %xmm10
|
|
kusano |
2b45e8 |
mulsd %xmm7, %xmm11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm8, %xmm0
|
|
kusano |
2b45e8 |
addsd %xmm9, %xmm1
|
|
kusano |
2b45e8 |
addsd %xmm10, %xmm0
|
|
kusano |
2b45e8 |
addq $8 * SIZE, A1
|
|
kusano |
2b45e8 |
addsd %xmm11, %xmm1
|
|
kusano |
2b45e8 |
addq $8 * SIZE, X1
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L24:
|
|
kusano |
2b45e8 |
testq $4, M
|
|
kusano |
2b45e8 |
je .L26
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(X1), %xmm4
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A1), %xmm8
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(X1), %xmm5
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(A1), %xmm9
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(X1), %xmm6
|
|
kusano |
2b45e8 |
movsd 2 * SIZE(A1), %xmm10
|
|
kusano |
2b45e8 |
movsd 3 * SIZE(X1), %xmm7
|
|
kusano |
2b45e8 |
movsd 3 * SIZE(A1), %xmm11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm8
|
|
kusano |
2b45e8 |
mulsd %xmm5, %xmm9
|
|
kusano |
2b45e8 |
mulsd %xmm6, %xmm10
|
|
kusano |
2b45e8 |
mulsd %xmm7, %xmm11
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd %xmm8, %xmm0
|
|
kusano |
2b45e8 |
addsd %xmm9, %xmm1
|
|
kusano |
2b45e8 |
addsd %xmm10, %xmm0
|
|
kusano |
2b45e8 |
addq $4 * SIZE, A1
|
|
kusano |
2b45e8 |
addsd %xmm11, %xmm1
|
|
kusano |
2b45e8 |
addq $4 * SIZE, X1
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L26:
|
|
kusano |
2b45e8 |
testq $2, M
|
|
kusano |
2b45e8 |
je .L27
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(X1), %xmm4
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A1), %xmm8
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(X1), %xmm5
|
|
kusano |
2b45e8 |
movsd 1 * SIZE(A1), %xmm9
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm8
|
|
kusano |
2b45e8 |
mulsd %xmm5, %xmm9
|
|
kusano |
2b45e8 |
addsd %xmm8, %xmm0
|
|
kusano |
2b45e8 |
addq $2 * SIZE, A1
|
|
kusano |
2b45e8 |
addsd %xmm9, %xmm1
|
|
kusano |
2b45e8 |
addq $2 * SIZE, X1
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L27:
|
|
kusano |
2b45e8 |
testq $1, M
|
|
kusano |
2b45e8 |
je .L29
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(X1), %xmm4
|
|
kusano |
2b45e8 |
movsd 0 * SIZE(A1), %xmm8
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulsd %xmm4, %xmm8
|
|
kusano |
2b45e8 |
addsd %xmm8, %xmm0
|
|
kusano |
2b45e8 |
ALIGN_4
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L29:
|
|
kusano |
2b45e8 |
addsd %xmm1, %xmm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
mulsd ALPHA, %xmm0
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addsd (Y), %xmm0
|
|
kusano |
2b45e8 |
movsd %xmm0, (Y1)
|
|
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 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
EPILOGUE
|