|
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 88
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#ifndef P
|
|
kusano |
2b45e8 |
#define P 1000
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define STACK 16
|
|
kusano |
2b45e8 |
#define ARGS 24
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define NLDA 0 + STACK(%esp)
|
|
kusano |
2b45e8 |
#define XP 4 + STACK(%esp)
|
|
kusano |
2b45e8 |
#define MIN_M 8 + STACK(%esp)
|
|
kusano |
2b45e8 |
#define J 12 + STACK(%esp)
|
|
kusano |
2b45e8 |
#define IS 16 + 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 |
|
|
kusano |
2b45e8 |
movl X, %edi # X
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl $0, IS
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl M, %ebx
|
|
kusano |
2b45e8 |
movl N, %eax
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
testl %ebx, %ebx
|
|
kusano |
2b45e8 |
jle .L79
|
|
kusano |
2b45e8 |
testl %eax, %eax
|
|
kusano |
2b45e8 |
jle .L79
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl INCX, %esi
|
|
kusano |
2b45e8 |
sall $BASE_SHIFT, %esi
|
|
kusano |
2b45e8 |
movl %esi, INCX
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl INCY, %esi
|
|
kusano |
2b45e8 |
sall $BASE_SHIFT, %esi
|
|
kusano |
2b45e8 |
movl %esi, INCY
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl LDA, %ebx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
imull %ebx, %eax
|
|
kusano |
2b45e8 |
movl $P, %esi
|
|
kusano |
2b45e8 |
subl %eax, %esi
|
|
kusano |
2b45e8 |
sall $BASE_SHIFT, %esi
|
|
kusano |
2b45e8 |
movl %esi, NLDA
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl %ebx, %esi
|
|
kusano |
2b45e8 |
sall $BASE_SHIFT, %esi
|
|
kusano |
2b45e8 |
movl %esi, LDA
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L32:
|
|
kusano |
2b45e8 |
movl IS, %esi
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl $P, %edx
|
|
kusano |
2b45e8 |
movl M, %eax
|
|
kusano |
2b45e8 |
subl %esi, %eax
|
|
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 |
movl %eax, MIN_M
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl IS, %ecx
|
|
kusano |
2b45e8 |
sall $BASE_SHIFT, %ecx
|
|
kusano |
2b45e8 |
leal (%edi,%ecx, 1), %ecx
|
|
kusano |
2b45e8 |
movl INCX, %ebx
|
|
kusano |
2b45e8 |
movl %ecx, XP
|
|
kusano |
2b45e8 |
cmpl $SIZE, %ebx
|
|
kusano |
2b45e8 |
je .L34
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl BUFFER, %esi
|
|
kusano |
2b45e8 |
movl MIN_M, %ecx
|
|
kusano |
2b45e8 |
movl %esi, XP
|
|
kusano |
2b45e8 |
sarl $2, %ecx
|
|
kusano |
2b45e8 |
jle .L35
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L36:
|
|
kusano |
2b45e8 |
FLD (%edi)
|
|
kusano |
2b45e8 |
addl %ebx, %edi
|
|
kusano |
2b45e8 |
FST 0 * SIZE(%esi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD (%edi)
|
|
kusano |
2b45e8 |
addl %ebx, %edi
|
|
kusano |
2b45e8 |
FST 1 * SIZE(%esi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD (%edi)
|
|
kusano |
2b45e8 |
addl %ebx, %edi
|
|
kusano |
2b45e8 |
FST 2 * SIZE(%esi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD (%edi)
|
|
kusano |
2b45e8 |
addl %ebx, %edi
|
|
kusano |
2b45e8 |
FST 3 * SIZE(%esi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $4 * SIZE, %esi
|
|
kusano |
2b45e8 |
decl %ecx
|
|
kusano |
2b45e8 |
jg .L36
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L35:
|
|
kusano |
2b45e8 |
movl MIN_M, %ecx
|
|
kusano |
2b45e8 |
andl $3,%ecx
|
|
kusano |
2b45e8 |
jle .L34
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L42:
|
|
kusano |
2b45e8 |
FLD (%edi)
|
|
kusano |
2b45e8 |
addl %ebx, %edi
|
|
kusano |
2b45e8 |
FST (%esi)
|
|
kusano |
2b45e8 |
addl $SIZE, %esi
|
|
kusano |
2b45e8 |
decl %ecx
|
|
kusano |
2b45e8 |
jg .L42
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
/* Main Routine */
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L34:
|
|
kusano |
2b45e8 |
movl Y, %ebp # coffset = y
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl N, %esi
|
|
kusano |
2b45e8 |
sarl $2, %esi
|
|
kusano |
2b45e8 |
movl %esi, J
|
|
kusano |
2b45e8 |
jle .L47
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L48:
|
|
kusano |
2b45e8 |
movl A, %ebx # a_offset = a
|
|
kusano |
2b45e8 |
fldz
|
|
kusano |
2b45e8 |
movl LDA, %edx
|
|
kusano |
2b45e8 |
fldz
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
leal (%ebx, %edx), %ecx # a_offset2 = a + lda
|
|
kusano |
2b45e8 |
fldz
|
|
kusano |
2b45e8 |
leal (%ebx, %edx, 4), %eax
|
|
kusano |
2b45e8 |
fldz
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl %eax, A
|
|
kusano |
2b45e8 |
movl XP, %esi
|
|
kusano |
2b45e8 |
FLD (%esi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl MIN_M, %eax
|
|
kusano |
2b45e8 |
sarl $2,%eax
|
|
kusano |
2b45e8 |
jle .L51
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#define PRESIZE 8
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L80:
|
|
kusano |
2b45e8 |
#ifdef PENTIUM3
|
|
kusano |
2b45e8 |
prefetcht0 PRESIZE * SIZE(%ebx, %edx, 2)
|
|
kusano |
2b45e8 |
FLD 0 * SIZE(%ebx) # at = *(a_offset + 0 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st # at1 *= bt1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
prefetcht0 PRESIZE * SIZE(%ecx)
|
|
kusano |
2b45e8 |
faddp %st,%st(2) # ct1 += at1
|
|
kusano |
2b45e8 |
FLD 0 * SIZE(%ecx) # at1 = *(a_offset2 + 0 * lda)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
prefetcht0 PRESIZE * SIZE(%ecx, %edx, 2)
|
|
kusano |
2b45e8 |
fmul %st(1),%st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st,%st(3) # ct2 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
prefetcht0 PRESIZE * SIZE(%ebx)
|
|
kusano |
2b45e8 |
FLD 0 * SIZE(%ebx, %edx, 2) # at = *(a_offset + 2 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
FLD 0 * SIZE(%ecx, %edx, 2) # at1 = *(a_offset2 + 2 * lda)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%ebx) # at = *(a_offset + 0 * lda)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fmul %st(1),%st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st,%st(2) # ct1 += at1
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%ecx) # at1 = *(a_offset2 + 0 * lda)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fmul %st(1),%st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st,%st(3) # ct2 += at1
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%ebx, %edx, 2) # at = *(a_offset + 2 * lda)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fmul %st(1),%st
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%ecx, %edx, 2) # at1 = *(a_offset2 + 2 * lda)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%esi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%ebx) # at = *(a_offset + 0 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st,%st(2) # ct1 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%ecx) # at1 = *(a_offset2 + 0 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st,%st(3) # ct2 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%ebx, %edx, 2) # at = *(a_offset + 2 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%ecx, %edx, 2) # at1 = *(a_offset2 + 2 * lda)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 3 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FLD 3 * SIZE(%ebx) # at = *(a_offset + 0 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st # at1 *= bt1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
faddp %st,%st(2) # ct1 += at1
|
|
kusano |
2b45e8 |
FLD 3 * SIZE(%ecx) # at1 = *(a_offset2 + 0 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st # at1 *= bt1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
faddp %st,%st(3) # ct2 += at1
|
|
kusano |
2b45e8 |
FLD 3 * SIZE(%ebx, %edx, 2) # at = *(a_offset + 2 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
FLD 3 * SIZE(%ecx, %edx, 2) # at1 = *(a_offset2 + 2 * lda)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $4 * SIZE, %ebx
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
addl $4 * SIZE, %ecx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 4 * SIZE(%esi)
|
|
kusano |
2b45e8 |
addl $4 * SIZE, %esi
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#else
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
#if defined(HAS_PREFETCH)
|
|
kusano |
2b45e8 |
prefetcht0 PRESIZE * SIZE(%ebx)
|
|
kusano |
2b45e8 |
prefetcht0 PRESIZE * SIZE(%ebx, %edx, 2)
|
|
kusano |
2b45e8 |
prefetcht0 PRESIZE * SIZE(%ecx)
|
|
kusano |
2b45e8 |
prefetcht0 PRESIZE * SIZE(%ecx, %edx, 2)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 0 * SIZE(%ebx) # at = *(a_offset + 0 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st,%st(2) # ct1 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 0 * SIZE(%ecx) # at1 = *(a_offset2 + 0 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st,%st(3) # ct2 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 0 * SIZE(%ebx, %edx, 2) # at = *(a_offset + 2 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 0 * SIZE(%ecx, %edx, 2) # at1 = *(a_offset2 + 2 * lda)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%esi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%ebx) # at = *(a_offset + 0 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st,%st(2) # ct1 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%ecx) # at1 = *(a_offset2 + 0 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st,%st(3) # ct2 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%ebx, %edx, 2) # at = *(a_offset + 2 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%ecx, %edx, 2) # at1 = *(a_offset2 + 2 * lda)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%esi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%ebx) # at = *(a_offset + 0 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st,%st(2) # ct1 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%ecx) # at1 = *(a_offset2 + 0 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st,%st(3) # ct2 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%ebx, %edx, 2) # at = *(a_offset + 2 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%ecx, %edx, 2) # at1 = *(a_offset2 + 2 * lda)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
FLD 3 * SIZE(%esi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 3 * SIZE(%ebx) # at = *(a_offset + 0 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st,%st(2) # ct1 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 3 * SIZE(%ecx) # at1 = *(a_offset2 + 0 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st,%st(3) # ct2 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 3 * SIZE(%ebx, %edx, 2) # at = *(a_offset + 2 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 3 * SIZE(%ecx, %edx, 2) # at1 = *(a_offset2 + 2 * lda)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
FLD 4 * SIZE(%esi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $4 * SIZE, %ebx
|
|
kusano |
2b45e8 |
addl $4 * SIZE, %ecx
|
|
kusano |
2b45e8 |
addl $4 * SIZE, %esi
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jg .L80
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L51:
|
|
kusano |
2b45e8 |
movl MIN_M, %eax
|
|
kusano |
2b45e8 |
andl $3, %eax
|
|
kusano |
2b45e8 |
je .L81
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L52:
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD (%ebx) # at = *(a_offset + 0 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st,%st(2) # ct1 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD (%ecx) # at1 = *(a_offset2 + 0 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st # at1 *= bt1
|
|
kusano |
2b45e8 |
faddp %st,%st(3) # ct2 += at1
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD (%ebx, %edx, 2) # at = *(a_offset + 2 * lda)
|
|
kusano |
2b45e8 |
fmul %st(1),%st
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD (%ecx, %edx, 2) # at1 = *(a_offset2 + 2 * lda)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%esi)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $SIZE, %ebx
|
|
kusano |
2b45e8 |
addl $SIZE, %ecx
|
|
kusano |
2b45e8 |
addl $SIZE, %esi
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jg .L52
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L81:
|
|
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 (%ebp)
|
|
kusano |
2b45e8 |
faddp %st, %st(1)
|
|
kusano |
2b45e8 |
FST (%ebp)
|
|
kusano |
2b45e8 |
addl %eax, %ebp
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD (%ebp)
|
|
kusano |
2b45e8 |
faddp %st, %st(1)
|
|
kusano |
2b45e8 |
FST (%ebp)
|
|
kusano |
2b45e8 |
addl %eax, %ebp
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD (%ebp)
|
|
kusano |
2b45e8 |
faddp %st, %st(1)
|
|
kusano |
2b45e8 |
FST (%ebp)
|
|
kusano |
2b45e8 |
addl %eax, %ebp
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD (%ebp)
|
|
kusano |
2b45e8 |
faddp %st, %st(1)
|
|
kusano |
2b45e8 |
FST (%ebp)
|
|
kusano |
2b45e8 |
addl %eax, %ebp
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
decl J
|
|
kusano |
2b45e8 |
jg .L48
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L47:
|
|
kusano |
2b45e8 |
movl N, %esi
|
|
kusano |
2b45e8 |
andl $3,%esi
|
|
kusano |
2b45e8 |
movl %esi, J
|
|
kusano |
2b45e8 |
jle .L60
|
|
kusano |
2b45e8 |
ALIGN_2
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L61:
|
|
kusano |
2b45e8 |
movl A, %ebx # a_offset = a
|
|
kusano |
2b45e8 |
fldz # ct1 = ZERO
|
|
kusano |
2b45e8 |
movl LDA, %edx
|
|
kusano |
2b45e8 |
fldz # ct1 = ZERO
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl %ebx, %edx
|
|
kusano |
2b45e8 |
fldz # ct1 = ZERO
|
|
kusano |
2b45e8 |
movl %edx, A
|
|
kusano |
2b45e8 |
fldz # ct1 = ZERO
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl XP, %esi
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
movl MIN_M, %eax
|
|
kusano |
2b45e8 |
sarl $3,%eax
|
|
kusano |
2b45e8 |
jle .L64
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L65:
|
|
kusano |
2b45e8 |
#ifdef HAS_PREFETCH
|
|
kusano |
2b45e8 |
prefetcht0 PRESIZE * 2 * SIZE(%ebx)
|
|
kusano |
2b45e8 |
prefetcht0 PRESIZE * 2 * SIZE(%ebx)
|
|
kusano |
2b45e8 |
#endif
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 0 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FLD 0 * SIZE(%ebx)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st,%st(1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FLD 1 * SIZE(%ebx)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st,%st(2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FLD 2 * SIZE(%ebx)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st,%st(3)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 3 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FLD 3 * SIZE(%ebx)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 4 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FLD 4 * SIZE(%ebx)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st,%st(1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 5 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FLD 5 * SIZE(%ebx)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st,%st(2)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 6 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FLD 6 * SIZE(%ebx)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st,%st(3)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
FLD 7 * SIZE(%esi)
|
|
kusano |
2b45e8 |
FLD 7 * SIZE(%ebx)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st,%st(4)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $8 * SIZE, %esi
|
|
kusano |
2b45e8 |
addl $8 * SIZE, %ebx
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jg .L65
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L64:
|
|
kusano |
2b45e8 |
movl MIN_M, %eax
|
|
kusano |
2b45e8 |
andl $7, %eax
|
|
kusano |
2b45e8 |
jle .L70
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L71:
|
|
kusano |
2b45e8 |
FLD (%esi)
|
|
kusano |
2b45e8 |
FLD (%ebx)
|
|
kusano |
2b45e8 |
fmulp %st, %st(1)
|
|
kusano |
2b45e8 |
faddp %st,%st(1)
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $SIZE, %esi
|
|
kusano |
2b45e8 |
addl $SIZE, %ebx
|
|
kusano |
2b45e8 |
decl %eax
|
|
kusano |
2b45e8 |
jg .L71
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
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 |
FLD (%ebp)
|
|
kusano |
2b45e8 |
faddp %st, %st(1)
|
|
kusano |
2b45e8 |
FST (%ebp)
|
|
kusano |
2b45e8 |
addl INCY, %ebp
|
|
kusano |
2b45e8 |
decl J
|
|
kusano |
2b45e8 |
jg .L61
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
.L60:
|
|
kusano |
2b45e8 |
movl A, %ebx
|
|
kusano |
2b45e8 |
addl NLDA, %ebx
|
|
kusano |
2b45e8 |
movl %ebx, A
|
|
kusano |
2b45e8 |
|
|
kusano |
2b45e8 |
addl $P, IS
|
|
kusano |
2b45e8 |
movl M, %esi
|
|
kusano |
2b45e8 |
cmpl %esi, IS
|
|
kusano |
2b45e8 |
jl .L32
|
|
kusano |
2b45e8 |
ALIGN_3
|
|
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
|