|
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 PENTIUM
|
|
kusano |
2b45e8 |
#define P 32
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(ATHLON) || defined(OPTERON)
|
|
kusano |
2b45e8 |
#define P 32
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef P
|
|
kusano |
2b45e8 |
#define P DTB_DEFAULT_ENTRIES
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define STACK 16
|
|
kusano |
2b45e8 |
#define ARGS 16
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define PLDA_M 0 + STACK(%esp)
|
|
kusano |
2b45e8 |
#define XP 4 + STACK(%esp)
|
|
kusano |
2b45e8 |
#define MIN_N 8 + STACK(%esp)
|
|
kusano |
2b45e8 |
#define IS 12 + STACK(%esp)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define M 4 + STACK + ARGS(%esp)
|
|
kusano |
2b45e8 |
#define N 8 + STACK + ARGS(%esp)
|
|
kusano |
2b45e8 |
#define K 12 + STACK + ARGS(%esp)
|
|
kusano |
2b45e8 |
#define ALPHA 16 + STACK + ARGS(%esp)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define A 32 + STACK + ARGS(%esp)
|
|
kusano |
2b45e8 |
#define LDA 36 + STACK + ARGS(%esp)
|
|
kusano |
2b45e8 |
#define X 40 + STACK + ARGS(%esp)
|
|
kusano |
2b45e8 |
#define INCX 44 + STACK + ARGS(%esp)
|
|
kusano |
2b45e8 |
#define Y 48 + STACK + ARGS(%esp)
|
|
kusano |
2b45e8 |
#define INCY 52 + STACK + ARGS(%esp)
|
|
kusano |
2b45e8 |
#define BUFFER 56 + STACK + ARGS(%esp)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PROLOGUE
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
subl $ARGS, %esp
|
|
kusano |
2b45e8 |
pushl %ebp
|
|
kusano |
2b45e8 |
pushl %edi
|
|
kusano |
2b45e8 |
pushl %esi
|
|
kusano |
2b45e8 |
pushl %ebx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
PROFCODE
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD ALPHA
|
|
kusano |
2b45e8 |
movl X, %edi
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl LDA, %ebx
|
|
kusano |
2b45e8 |
sall $BASE_SHIFT, %ebx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl $0, IS
|
|
kusano |
2b45e8 |
movl M, %edx
|
|
kusano |
2b45e8 |
movl N, %esi
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
test %esi, %esi
|
|
kusano |
2b45e8 |
jle .L79 # goto END
|
|
kusano |
2b45e8 |
test %edx, %edx
|
|
kusano |
2b45e8 |
jle .L79 # goto END
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl INCY, %eax
|
|
kusano |
2b45e8 |
sall $BASE_SHIFT, %eax
|
|
kusano |
2b45e8 |
movl %eax, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl LDA, %eax
|
|
kusano |
2b45e8 |
imull $P, %eax # P * lda
|
|
kusano |
2b45e8 |
subl M ,%eax # P * lda - m
|
|
kusano |
2b45e8 |
sall $BASE_SHIFT, %eax
|
|
kusano |
2b45e8 |
movl %eax, PLDA_M
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L32:
|
|
kusano |
2b45e8 |
movl IS, %esi
|
|
kusano |
2b45e8 |
movl $P, %edx
|
|
kusano |
2b45e8 |
movl N, %eax
|
|
kusano |
2b45e8 |
subl %esi,%eax # n - is
|
|
kusano |
2b45e8 |
cmpl %edx, %eax
|
|
kusano |
2b45e8 |
#ifdef PENTIUM
|
|
kusano |
2b45e8 |
jle .L33
|
|
kusano |
2b45e8 |
movl %edx, %eax
|
|
kusano |
2b45e8 |
.L33:
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
cmovg %edx, %eax
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl %eax, MIN_N
|
|
kusano |
2b45e8 |
movl INCX, %edx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
sall $BASE_SHIFT, %esi
|
|
kusano |
2b45e8 |
leal (%edi, %esi, 1), %esi
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl %esi, XP
|
|
kusano |
2b45e8 |
cmpl $1, %edx
|
|
kusano |
2b45e8 |
je .L34 # if incx == 1 goto L34
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl BUFFER, %esi
|
|
kusano |
2b45e8 |
sall $BASE_SHIFT, %edx
|
|
kusano |
2b45e8 |
movl %esi, XP # xp = buffer
|
|
kusano |
2b45e8 |
sarl $2,%eax
|
|
kusano |
2b45e8 |
jle .L35
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L36:
|
|
kusano |
2b45e8 |
FLD (%edi)
|
|
kusano |
2b45e8 |
addl %edx,%edi # x += incx
|
|
kusano |
2b45e8 |
FLD (%edi)
|
|
kusano |
2b45e8 |
addl %edx,%edi # x += incx
|
|
kusano |
2b45e8 |
FLD (%edi)
|
|
kusano |
2b45e8 |
addl %edx,%edi # x += incx
|
|
kusano |
2b45e8 |
FLD (%edi)
|
|
kusano |
2b45e8 |
addl %edx,%edi # x += incx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FST 3 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FST 2 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FST 1 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FST 0 * SIZE(%esi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $4 * SIZE, %esi # xp += 4
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jg .L36
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L35:
|
|
kusano |
2b45e8 |
movl MIN_N, %eax
|
|
kusano |
2b45e8 |
andl $3, %eax
|
|
kusano |
2b45e8 |
jle .L34
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L42:
|
|
kusano |
2b45e8 |
FLD (%edi)
|
|
kusano |
2b45e8 |
addl %edx, %edi
|
|
kusano |
2b45e8 |
FST (%esi)
|
|
kusano |
2b45e8 |
addl $SIZE, %esi
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jg .L42
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
/* Main Routine */
|
|
kusano |
2b45e8 |
.L34:
|
|
kusano |
2b45e8 |
movl Y, %ecx # c_offset
|
|
kusano |
2b45e8 |
movl M, %ebp
|
|
kusano |
2b45e8 |
sarl $2, %ebp # j = (m >> 2)
|
|
kusano |
2b45e8 |
jle .L47
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L48:
|
|
kusano |
2b45e8 |
movl A, %edx # a_offset = a
|
|
kusano |
2b45e8 |
fldz
|
|
kusano |
2b45e8 |
addl $4 * SIZE, A # a += 4
|
|
kusano |
2b45e8 |
fldz
|
|
kusano |
2b45e8 |
movl XP, %esi # b_offset = xp
|
|
kusano |
2b45e8 |
fldz
|
|
kusano |
2b45e8 |
movl MIN_N, %eax # i = min_n
|
|
kusano |
2b45e8 |
fldz
|
|
kusano |
2b45e8 |
FLD (%esi) # bt1 = b_offset
|
|
kusano |
2b45e8 |
sarl $1, %eax
|
|
kusano |
2b45e8 |
jle .L51
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifdef PENTIUM3
|
|
kusano |
2b45e8 |
#define PRESIZE 8
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
#define PRESIZE 24
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L80:
|
|
kusano |
2b45e8 |
#ifdef PENTIUM3
|
|
kusano |
2b45e8 |
prefetcht1 PRESIZE * SIZE(%edx, %ebx, 1)
|
|
kusano |
2b45e8 |
FLD 0 * SIZE(%edx) # at1 = *(a_offset + 0)
|
|
kusano |
2b45e8 |
fmul %st(1), %st # at1 *= bt1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
prefetcht1 PRESIZE * SIZE(%esi)
|
|
kusano |
2b45e8 |
faddp %st, %st(2) # ct1 += at1
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%edx) # at1 = *(a_offset + 1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fmul %st(1), %st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st, %st(3) # ct2 += at1
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%edx) # at1 = *(a_offset + 2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fmul %st(1), %st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st, %st(4) # ct3 += at1
|
|
kusano |
2b45e8 |
FLD 3 * SIZE(%edx) # bt1 *= *(a_offset + 3)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st, %st(4) # ct4 += at1
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%esi) # bt1 = b_offset
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
prefetcht1 PRESIZE * SIZE(%edx, %ebx, 2)
|
|
kusano |
2b45e8 |
addl %ebx, %edx # a_offset += lda
|
|
kusano |
2b45e8 |
FLD 0 * SIZE(%edx) # at1 = *(a_offset + 0)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fmul %st(1), %st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st, %st(2) # ct1 += at1
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%edx) # at1 = *(a_offset + 1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fmul %st(1), %st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st, %st(3) # ct2 += at1
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%edx) # at1 = *(a_offset + 2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fmul %st(1), %st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st, %st(4) # ct3 += at1
|
|
kusano |
2b45e8 |
FLD 3 * SIZE(%edx) # bt1 *= *(a_offset + 3)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
addl %ebx, %edx
|
|
kusano |
2b45e8 |
faddp %st, %st(4) # ct4 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%esi) # bt1 = b_offset
|
|
kusano |
2b45e8 |
addl $2 * SIZE, %esi # b_offset += 2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
#ifdef PENTIUM4
|
|
kusano |
2b45e8 |
prefetchnta 8 * SIZE(%esi)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
FLD 0 * SIZE(%edx) # at1 = *(a_offset + 0)
|
|
kusano |
2b45e8 |
fmul %st(1), %st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st, %st(2) # ct1 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%edx) # at1 = *(a_offset + 1)
|
|
kusano |
2b45e8 |
fmul %st(1), %st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st, %st(3) # ct2 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%edx) # at1 = *(a_offset + 2)
|
|
kusano |
2b45e8 |
fmul %st(1), %st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st, %st(4) # ct3 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 3 * SIZE(%edx) # bt1 *= *(a_offset + 3)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st, %st(4) # ct4 += at1
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%esi) # bt1 = b_offset
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl %ebx, %edx # a_offset += lda
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 0 * SIZE(%edx) # at1 = *(a_offset + 0)
|
|
kusano |
2b45e8 |
fmul %st(1), %st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st, %st(2) # ct1 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%edx) # at1 = *(a_offset + 1)
|
|
kusano |
2b45e8 |
fmul %st(1), %st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st, %st(3) # ct2 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%edx) # at1 = *(a_offset + 2)
|
|
kusano |
2b45e8 |
fmul %st(1), %st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st, %st(4) # ct3 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 3 * SIZE(%edx) # bt1 *= *(a_offset + 3)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st, %st(4) # ct4 += at1
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%esi) # bt1 = b_offset
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl %ebx, %edx
|
|
kusano |
2b45e8 |
addl $2 * SIZE, %esi # b_offset += 2
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jg .L80
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L51:
|
|
kusano |
2b45e8 |
movl MIN_N,%eax
|
|
kusano |
2b45e8 |
andl $1, %eax
|
|
kusano |
2b45e8 |
je .L57
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 0 * SIZE(%edx) # at1 = *(a_offset + 0)
|
|
kusano |
2b45e8 |
fmul %st(1), %st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st, %st(2) # ct1 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%edx) # at1 = *(a_offset + 1)
|
|
kusano |
2b45e8 |
fmul %st(1), %st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st, %st(3) # ct2 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%edx) # at1 = *(a_offset + 2)
|
|
kusano |
2b45e8 |
fmul %st(1), %st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st, %st(4) # ct3 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 3 * SIZE(%edx) # bt1 *= *(a_offset + 3)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st, %st(4) # ct4 += at1
|
|
kusano |
2b45e8 |
fldz
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L57:
|
|
kusano |
2b45e8 |
ffreep %st(0)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fxch %st(4)
|
|
kusano |
2b45e8 |
fmul %st, %st(4)
|
|
kusano |
2b45e8 |
fmul %st, %st(1)
|
|
kusano |
2b45e8 |
fmul %st, %st(2)
|
|
kusano |
2b45e8 |
fmul %st, %st(3)
|
|
kusano |
2b45e8 |
fxch %st(4)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl INCY, %eax
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD (%ecx)
|
|
kusano |
2b45e8 |
faddp %st, %st(1)
|
|
kusano |
2b45e8 |
FST (%ecx)
|
|
kusano |
2b45e8 |
addl %eax, %ecx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD (%ecx)
|
|
kusano |
2b45e8 |
faddp %st, %st(1)
|
|
kusano |
2b45e8 |
FST (%ecx)
|
|
kusano |
2b45e8 |
addl %eax, %ecx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD (%ecx)
|
|
kusano |
2b45e8 |
faddp %st, %st(1)
|
|
kusano |
2b45e8 |
FST (%ecx)
|
|
kusano |
2b45e8 |
addl %eax, %ecx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD (%ecx)
|
|
kusano |
2b45e8 |
faddp %st, %st(1)
|
|
kusano |
2b45e8 |
FST (%ecx)
|
|
kusano |
2b45e8 |
addl %eax, %ecx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
decl %ebp # j --
|
|
kusano |
2b45e8 |
jg .L48
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L47:
|
|
kusano |
2b45e8 |
movl M, %ebp
|
|
kusano |
2b45e8 |
andl $3, %ebp # j = (m & 3)
|
|
kusano |
2b45e8 |
jle .L60
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L61:
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl A, %edx # a_offset = a
|
|
kusano |
2b45e8 |
fldz
|
|
kusano |
2b45e8 |
addl $SIZE, A # a++
|
|
kusano |
2b45e8 |
fldz
|
|
kusano |
2b45e8 |
movl XP,%esi
|
|
kusano |
2b45e8 |
fldz
|
|
kusano |
2b45e8 |
movl MIN_N,%eax
|
|
kusano |
2b45e8 |
fldz
|
|
kusano |
2b45e8 |
sarl $3,%eax
|
|
kusano |
2b45e8 |
jle .L64
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L65:
|
|
kusano |
2b45e8 |
FLD 0 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FLD (%edx)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st, %st(1)
|
|
kusano |
2b45e8 |
addl %ebx, %edx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FLD (%edx)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st, %st(2)
|
|
kusano |
2b45e8 |
addl %ebx ,%edx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FLD (%edx)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st, %st(3)
|
|
kusano |
2b45e8 |
addl %ebx, %edx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 3 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FLD (%edx)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st, %st(4)
|
|
kusano |
2b45e8 |
addl %ebx, %edx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 4 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FLD (%edx)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st,%st(1)
|
|
kusano |
2b45e8 |
addl %ebx, %edx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 5 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FLD (%edx)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st, %st(2)
|
|
kusano |
2b45e8 |
addl %ebx, %edx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 6 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FLD (%edx)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st,%st(3)
|
|
kusano |
2b45e8 |
addl %ebx, %edx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 7 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FLD (%edx)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
addl %ebx, %edx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $8 * SIZE, %esi
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jg .L65
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L64:
|
|
kusano |
2b45e8 |
movl MIN_N,%eax
|
|
kusano |
2b45e8 |
andl $7, %eax
|
|
kusano |
2b45e8 |
jle .L70
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L71:
|
|
kusano |
2b45e8 |
FLD (%esi)
|
|
kusano |
2b45e8 |
addl $SIZE, %esi # b_offset ++
|
|
kusano |
2b45e8 |
FLD (%edx)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
addl %ebx, %edx # a_offset += lda
|
|
kusano |
2b45e8 |
faddp %st, %st(1)
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jg .L71
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L70:
|
|
kusano |
2b45e8 |
faddp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st, %st(1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fmul %st(1), %st
|
|
kusano |
2b45e8 |
movl INCY, %eax
|
|
kusano |
2b45e8 |
FLD (%ecx)
|
|
kusano |
2b45e8 |
faddp %st, %st(1)
|
|
kusano |
2b45e8 |
FST (%ecx)
|
|
kusano |
2b45e8 |
addl %eax, %ecx
|
|
kusano |
2b45e8 |
decl %ebp
|
|
kusano |
2b45e8 |
jg .L61
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L60:
|
|
kusano |
2b45e8 |
movl PLDA_M, %esi
|
|
kusano |
2b45e8 |
addl %esi, A # a += P * lda - m
|
|
kusano |
2b45e8 |
addl $P, IS
|
|
kusano |
2b45e8 |
movl N, %esi
|
|
kusano |
2b45e8 |
cmpl %esi,IS
|
|
kusano |
2b45e8 |
jl .L32
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L79:
|
|
kusano |
2b45e8 |
ffreep %st(0)
|
|
kusano |
2b45e8 |
popl %ebx
|
|
kusano |
2b45e8 |
popl %esi
|
|
kusano |
2b45e8 |
popl %edi
|
|
kusano |
2b45e8 |
popl %ebp
|
|
kusano |
2b45e8 |
addl $ARGS, %esp
|
|
kusano |
2b45e8 |
ret
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
EPILOGUE
|