|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229 |
- /*********************************************************************/
- /* Copyright 2009, 2010 The University of Texas at Austin. */
- /* All rights reserved. */
- /* */
- /* Redistribution and use in source and binary forms, with or */
- /* without modification, are permitted provided that the following */
- /* conditions are met: */
- /* */
- /* 1. Redistributions of source code must retain the above */
- /* copyright notice, this list of conditions and the following */
- /* disclaimer. */
- /* */
- /* 2. Redistributions in binary form must reproduce the above */
- /* copyright notice, this list of conditions and the following */
- /* disclaimer in the documentation and/or other materials */
- /* provided with the distribution. */
- /* */
- /* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */
- /* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */
- /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
- /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
- /* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */
- /* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */
- /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
- /* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */
- /* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */
- /* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
- /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
- /* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */
- /* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
- /* POSSIBILITY OF SUCH DAMAGE. */
- /* */
- /* The views and conclusions contained in the software and */
- /* documentation are those of the authors and should not be */
- /* interpreted as representing official policies, either expressed */
- /* or implied, of The University of Texas at Austin. */
- /*********************************************************************/
-
- #define ASSEMBLER
- #include "common.h"
-
- #ifdef OPTERON
- #define PREFETCH prefetch
- #define PREFETCHW prefetchw
- #else
- #define PREFETCH prefetcht0
- #define PREFETCHW prefetcht0
- #endif
-
- #define PREFETCHSIZE (5 + 4 * 10)
- #define STACK 16
- #define ARGS 16
-
- #define J 0 + STACK(%esp)
- #define KK 4 + STACK(%esp)
- #define AORIG 8 + STACK(%esp)
-
- #define M 4 + STACK + ARGS(%esp)
- #define N 8 + STACK + ARGS(%esp)
- #define K 12 + STACK + ARGS(%esp)
- #define ALPHA 16 + STACK + ARGS(%esp)
- #define A 32 + STACK + ARGS(%esp)
- #define ARG_B 36 + STACK + ARGS(%esp)
- #define C 40 + STACK + ARGS(%esp)
- #define ARG_LDC 44 + STACK + ARGS(%esp)
- #define OFFSET 48 + STACK + ARGS(%esp)
-
- #define I %esi
- #define B %ebx
- #define CO %edi
- #define AO %edx
- #define BO %ecx
- #define LDC %ebp
-
- #define PREFETCH_OFFSET 48
-
- PROLOGUE
-
- subl $ARGS, %esp # Generate Stack Frame
-
- pushl %ebp
- pushl %edi
- pushl %esi
- pushl %ebx
-
- PROFCODE
-
- movl ARG_LDC, LDC
- movl ARG_B, B
- sall $BASE_SHIFT, LDC
-
- addl $8 * SIZE, A
- addl $8 * SIZE, B
-
- #ifdef LN
- movl M, %eax
- sall $BASE_SHIFT, %eax
- addl %eax, C
- imull K, %eax
- addl %eax, A
- #endif
-
- #ifdef RT
- movl N, %eax
- sall $BASE_SHIFT, %eax
- imull K, %eax
- addl %eax, B
-
- movl N, %eax
- imull %ebp, %eax
- addl %eax, C
- #endif
-
- #ifdef RN
- movl OFFSET, %eax
- negl %eax
- movl %eax, KK
- #endif
-
- #ifdef RT
- movl N, %eax
- subl OFFSET, %eax
- movl %eax, KK
- #endif
-
- movl N, %eax
- sarl $1, %eax
- movl %eax, J
- je .L30
- ALIGN_4
-
- .L01:
- #if defined(LT) || defined(RN)
- movl A, AO
- #else
- movl A, %eax
- movl %eax, AORIG
- #endif
-
- #ifdef RT
- movl K, %eax
- sall $1 + BASE_SHIFT, %eax
- subl %eax, B
- #endif
-
- lea (, LDC, 2), %eax
-
- #ifdef RT
- subl %eax, C
- #endif
- movl C, CO
- #ifndef RT
- addl %eax, C
- #endif
-
- #ifdef LN
- movl OFFSET, %eax
- addl M, %eax
- movl %eax, KK
- #endif
-
- #ifdef LT
- movl OFFSET, %eax
- movl %eax, KK
- #endif
-
- movl M, I
- sarl $1, I
- je .L20
- ALIGN_4
-
- .L11:
- #ifdef LN
- movl K, %eax
- sall $1 + BASE_SHIFT, %eax
- subl %eax, AORIG
- #endif
-
- #if defined(LN) || defined(RT)
- movl KK, %eax
- sall $BASE_SHIFT, %eax
- movl AORIG, AO
- leal (AO, %eax, 2), AO
- leal (B, %eax, 2), BO
- #else
- movl B, BO
- #endif
-
- fldz
- fldz
- fldz
- fldz
-
- #if defined(HAVE_3DNOW)
- prefetchw 2 * SIZE(CO)
- prefetchw 2 * SIZE(CO, LDC, 1)
- #elif defined(HAVE_SSE)
- prefetchnta 2 * SIZE(CO)
- prefetchnta 2 * SIZE(CO, LDC, 1)
- #endif
-
- #if defined(LT) || defined(RN)
- movl KK, %eax
- #else
- movl K, %eax
- subl KK, %eax
- #endif
- sarl $2, %eax
- je .L15
- ALIGN_4
-
- .L12:
- PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
-
- FLD -8 * SIZE(AO)
-
- FLD -8 * SIZE(BO)
- fld %st(1)
- fmul %st(1), %st
- faddp %st, %st(3)
-
- FLD -7 * SIZE(BO)
- fmul %st, %st(2)
-
- FLD -7 * SIZE(AO)
- fmul %st, %st(2)
- fmulp %st, %st(1)
-
- faddp %st, %st(6)
- faddp %st, %st(4)
- faddp %st, %st(2)
-
- FLD -6 * SIZE(AO)
-
- FLD -6 * SIZE(BO)
- fld %st(1)
- fmul %st(1), %st
- faddp %st, %st(3)
-
- FLD -5 * SIZE(BO)
- fmul %st, %st(2)
-
- FLD -5 * SIZE(AO)
- fmul %st, %st(2)
- fmulp %st, %st(1)
-
- faddp %st, %st(6)
- faddp %st, %st(4)
- faddp %st, %st(2)
-
- PREFETCH (PREFETCHSIZE + 4) * SIZE(AO)
-
- FLD -4 * SIZE(AO)
-
- FLD -4 * SIZE(BO)
- fld %st(1)
- fmul %st(1), %st
- faddp %st, %st(3)
-
- FLD -3 * SIZE(BO)
- fmul %st, %st(2)
-
- FLD -3 * SIZE(AO)
- fmul %st, %st(2)
- fmulp %st, %st(1)
-
- faddp %st, %st(6)
- faddp %st, %st(4)
- faddp %st, %st(2)
-
- FLD -2 * SIZE(AO)
-
- FLD -2 * SIZE(BO)
- fld %st(1)
- fmul %st(1), %st
- faddp %st, %st(3)
-
- FLD -1 * SIZE(BO)
- fmul %st, %st(2)
-
- FLD -1 * SIZE(AO)
- fmul %st, %st(2)
- fmulp %st, %st(1)
-
- faddp %st, %st(6)
- faddp %st, %st(4)
- faddp %st, %st(2)
-
- addl $8 * SIZE,AO
- addl $8 * SIZE,BO
-
- decl %eax
- jne .L12
- ALIGN_4
-
- .L15:
- #if defined(LT) || defined(RN)
- movl KK, %eax
- #else
- movl K, %eax
- subl KK, %eax
- #endif
- and $3, %eax
- je .L18
- ALIGN_4
-
- .L16:
- FLD -8 * SIZE(AO)
-
- FLD -8 * SIZE(BO)
- fld %st(1)
- fmul %st(1), %st
- faddp %st, %st(3)
-
- FLD -7 * SIZE(BO)
- fmul %st, %st(2)
-
- FLD -7 * SIZE(AO)
- fmul %st, %st(2)
- fmulp %st, %st(1)
-
- faddp %st, %st(6)
- faddp %st, %st(4)
- faddp %st, %st(2)
-
- addl $2 * SIZE,AO
- addl $2 * SIZE,BO
-
- decl %eax
- jne .L16
- ALIGN_4
-
- .L18:
- #if defined(LN) || defined(RT)
- movl KK, %eax
- #ifdef LN
- subl $2, %eax
- #else
- subl $2, %eax
- #endif
-
- sall $BASE_SHIFT, %eax
-
- movl AORIG, AO
- leal (AO, %eax, 2), AO
- leal (B, %eax, 2), BO
- #endif
-
- #if defined(LN) || defined(LT)
- FLD -8 * SIZE(BO)
- fsubp %st, %st(1)
- FLD -7 * SIZE(BO)
- fsubp %st, %st(2)
- FLD -6 * SIZE(BO)
- fsubp %st, %st(3)
- FLD -5 * SIZE(BO)
- fsubp %st, %st(4)
- #else
- FLD -8 * SIZE(AO)
- fsubp %st, %st(1)
- FLD -7 * SIZE(AO)
- fsubp %st, %st(3)
- FLD -6 * SIZE(AO)
- fsubp %st, %st(2)
- FLD -5 * SIZE(AO)
- fsubp %st, %st(4)
- #endif
-
- #ifdef LN
- FLD -5 * SIZE(AO)
- fmul %st, %st(3)
- fmulp %st, %st(4)
-
- FLD -6 * SIZE(AO)
- fmul %st(3), %st
- FLD -6 * SIZE(AO)
- fmul %st(5), %st
-
- fsubrp %st, %st(3)
- fsubrp %st, %st(1)
-
- FLD -8 * SIZE(AO)
- fmul %st, %st(1)
- fmulp %st, %st(2)
- #endif
-
- #ifdef LT
- FLD -8 * SIZE(AO)
- fmul %st, %st(1)
- fmulp %st, %st(2)
-
- FLD -7 * SIZE(AO)
- fmul %st(1), %st
- FLD -7 * SIZE(AO)
- fmul %st(3), %st
-
- fsubrp %st, %st(5)
- fsubrp %st, %st(3)
-
- FLD -5 * SIZE(AO)
- fmul %st, %st(3)
- fmulp %st, %st(4)
- #endif
-
- #ifdef RN
- FLD -8 * SIZE(BO)
- fmul %st, %st(1)
- fmulp %st, %st(3)
-
- FLD -7 * SIZE(BO)
- fmul %st(1), %st
- FLD -7 * SIZE(BO)
- fmul %st(4), %st
-
- fsubrp %st, %st(5)
- fsubrp %st, %st(2)
-
- FLD -5 * SIZE(BO)
- fmul %st, %st(2)
- fmulp %st, %st(4)
- #endif
-
- #ifdef RT
- FLD -5 * SIZE(BO)
- fmul %st, %st(2)
- fmulp %st, %st(4)
-
- FLD -6 * SIZE(BO)
- fmul %st(2), %st
- FLD -6 * SIZE(BO)
- fmul %st(5), %st
-
- fsubrp %st, %st(4)
- fsubrp %st, %st(1)
-
- FLD -8 * SIZE(BO)
- fmul %st, %st(1)
- fmulp %st, %st(3)
- #endif
-
- #ifdef LN
- subl $2 * SIZE, CO
- #endif
-
- #if defined(LN) || defined(LT)
- fld %st
- FST -8 * SIZE(BO)
- fxch %st(1)
- fld %st
- FST -7 * SIZE(BO)
- fxch %st(2)
- fld %st
- FST -6 * SIZE(BO)
- fxch %st(3)
- fld %st
- FST -5 * SIZE(BO)
-
- FST 1 * SIZE(CO, LDC)
- FST 0 * SIZE(CO)
- FST 0 * SIZE(CO, LDC)
- FST 1 * SIZE(CO)
- #else
- fld %st
- FST -8 * SIZE(AO)
- fxch %st(2)
- fld %st
- FST -7 * SIZE(AO)
- fxch %st(1)
- fld %st
- FST -6 * SIZE(AO)
- fxch %st(3)
- fld %st
- FST -5 * SIZE(AO)
-
- FST 1 * SIZE(CO, LDC)
- FST 1 * SIZE(CO)
- FST 0 * SIZE(CO)
- FST 0 * SIZE(CO, LDC)
- #endif
-
- #ifndef LN
- addl $2 * SIZE, CO
- #endif
-
- #if defined(LT) || defined(RN)
- movl K, %eax
- subl KK, %eax
- sall $BASE_SHIFT, %eax
- leal (AO, %eax, 2), AO
- leal (BO, %eax, 2), BO
- #endif
-
- #ifdef LN
- subl $2, KK
- #endif
-
- #ifdef LT
- addl $2, KK
- #endif
-
- #ifdef RT
- movl K, %eax
- sall $1 + BASE_SHIFT, %eax
- addl %eax, AORIG
- #endif
-
- decl I
- jne .L11
- ALIGN_4
-
- .L20:
- movl M, %eax
- andl $1, %eax
- je .L29
- ALIGN_4
-
- .L21:
- #ifdef LN
- movl K, %eax
- sall $0 + BASE_SHIFT, %eax
- subl %eax, AORIG
- #endif
-
- #if defined(LN) || defined(RT)
- movl KK, %eax
- sall $BASE_SHIFT, %eax
- movl AORIG, AO
- leal (AO, %eax, 1), AO
- leal (B, %eax, 2), BO
- #else
- movl B, BO
- #endif
-
- fldz
- fldz
-
- #if defined(LT) || defined(RN)
- movl KK, %eax
- #else
- movl K, %eax
- subl KK, %eax
- #endif
- sarl $2, %eax
- je .L25
- ALIGN_4
-
- .L22:
- PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
-
- FLD -8 * SIZE(AO)
-
- FLD -8 * SIZE(BO)
- fmul %st(1), %st
- faddp %st, %st(2)
-
- FLD -7 * SIZE(BO)
- fmulp %st, %st(1)
- faddp %st, %st(2)
-
- FLD -7 * SIZE(AO)
-
- FLD -6 * SIZE(BO)
- fmul %st(1), %st
- faddp %st, %st(2)
-
- FLD -5 * SIZE(BO)
- fmulp %st, %st(1)
- faddp %st, %st(2)
-
- FLD -6 * SIZE(AO)
-
- FLD -4 * SIZE(BO)
- fmul %st(1), %st
- faddp %st, %st(2)
-
- FLD -3 * SIZE(BO)
- fmulp %st, %st(1)
- faddp %st, %st(2)
-
- FLD -5 * SIZE(AO)
-
- FLD -2 * SIZE(BO)
- fmul %st(1), %st
- faddp %st, %st(2)
-
- FLD -1 * SIZE(BO)
- fmulp %st, %st(1)
- faddp %st, %st(2)
-
- addl $4 * SIZE,AO
- addl $8 * SIZE,BO
-
- decl %eax
- jne .L22
- ALIGN_4
-
- .L25:
- #if defined(LT) || defined(RN)
- movl KK, %eax
- #else
- movl K, %eax
- subl KK, %eax
- #endif
- and $3, %eax
- je .L28
- ALIGN_4
-
- .L26:
- FLD -8 * SIZE(AO)
-
- FLD -8 * SIZE(BO)
- fmul %st(1), %st
- faddp %st, %st(2)
-
- FLD -7 * SIZE(BO)
- fmulp %st, %st(1)
- faddp %st, %st(2)
-
- addl $1 * SIZE,AO
- addl $2 * SIZE,BO
-
- decl %eax
- jne .L26
- ALIGN_4
-
- .L28:
- #if defined(LN) || defined(RT)
- movl KK, %eax
- #ifdef LN
- subl $1, %eax
- #else
- subl $2, %eax
- #endif
-
- sall $BASE_SHIFT, %eax
-
- movl AORIG, AO
- leal (AO, %eax, 1), AO
- leal (B, %eax, 2), BO
- #endif
-
- #if defined(LN) || defined(LT)
- FLD -8 * SIZE(BO)
- fsubp %st, %st(1)
- FLD -7 * SIZE(BO)
- fsubp %st, %st(2)
- #else
- FLD -8 * SIZE(AO)
- fsubp %st, %st(1)
- FLD -7 * SIZE(AO)
- fsubp %st, %st(2)
- #endif
-
- #if defined(LN) || defined(LT)
- FLD -8 * SIZE(AO)
- fmul %st, %st(1)
- fmulp %st, %st(2)
- #endif
-
- #ifdef RN
- FLD -8 * SIZE(BO)
- fmulp %st, %st(1)
-
- FLD -7 * SIZE(BO)
- fmul %st(1), %st
-
- fsubrp %st, %st(2)
-
- FLD -5 * SIZE(BO)
- fmulp %st, %st(2)
- #endif
-
- #ifdef RT
- FLD -5 * SIZE(BO)
- fmulp %st, %st(2)
-
- FLD -6 * SIZE(BO)
- fmul %st(2), %st
-
- fsubrp %st, %st(1)
-
- FLD -8 * SIZE(BO)
- fmulp %st, %st(1)
- #endif
-
- #ifdef LN
- subl $1 * SIZE, CO
- #endif
-
- #if defined(LN) || defined(LT)
- fld %st
- FST -8 * SIZE(BO)
- fxch %st(1)
- fld %st
- FST -7 * SIZE(BO)
- #else
- fld %st
- FST -8 * SIZE(AO)
- fxch %st(1)
- fld %st
- FST -7 * SIZE(AO)
- #endif
-
- FST 0 * SIZE(CO, LDC)
- FST 0 * SIZE(CO)
-
- #ifndef LN
- addl $1 * SIZE, CO
- #endif
-
- #if defined(LT) || defined(RN)
- movl K, %eax
- subl KK, %eax
- sall $BASE_SHIFT, %eax
- leal (AO, %eax, 1), AO
- leal (BO, %eax, 2), BO
- #endif
-
- #ifdef LN
- subl $1, KK
- #endif
-
- #ifdef LT
- addl $1, KK
- #endif
-
- #ifdef RT
- movl K, %eax
- sall $0 + BASE_SHIFT, %eax
- addl %eax, AORIG
- #endif
- ALIGN_4
-
- .L29:
- #ifdef LN
- movl K, %eax
- sall $BASE_SHIFT, %eax
- leal (B, %eax, 2), B
- #endif
-
- #if defined(LT) || defined(RN)
- movl BO, B
- #endif
-
- #ifdef RN
- addl $2, KK
- #endif
-
- #ifdef RT
- subl $2, KK
- #endif
-
- decl J
- jne .L01
- ALIGN_4
-
- .L30:
- movl N, %eax
- testl $1, %eax
- je .L999
-
- #if defined(LT) || defined(RN)
- movl A, AO
- #else
- movl A, %eax
- movl %eax, AORIG
- #endif
-
- #ifdef RT
- movl K, %eax
- sall $0 + BASE_SHIFT, %eax
- subl %eax, B
- #endif
-
- #ifdef RT
- subl LDC, C
- #endif
- movl C, CO
- #ifndef RT
- addl LDC, C
- #endif
-
- #ifdef LN
- movl OFFSET, %eax
- addl M, %eax
- movl %eax, KK
- #endif
-
- #ifdef LT
- movl OFFSET, %eax
- movl %eax, KK
- #endif
-
- movl M, I
- sarl $1, I
- je .L40
- ALIGN_4
-
- .L31:
- #ifdef LN
- movl K, %eax
- sall $1 + BASE_SHIFT, %eax
- subl %eax, AORIG
- #endif
-
- #if defined(LN) || defined(RT)
- movl KK, %eax
- sall $BASE_SHIFT, %eax
- movl AORIG, AO
- leal (AO, %eax, 2), AO
- leal (B, %eax, 1), BO
- #else
- movl B, BO
- #endif
-
- fldz
- fldz
-
- #if defined(HAVE_3DNOW)
- prefetchw 2 * SIZE(CO)
- #elif defined(HAVE_SSE)
- prefetchnta 2 * SIZE(CO)
- #endif
-
- #if defined(LT) || defined(RN)
- movl KK, %eax
- #else
- movl K, %eax
- subl KK, %eax
- #endif
- sarl $2, %eax
- je .L35
- ALIGN_4
-
- .L32:
- PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
-
- FLD -8 * SIZE(BO)
- FLD -8 * SIZE(AO)
- fmul %st(1), %st
- faddp %st, %st(2)
-
- FLD -7 * SIZE(AO)
- fmulp %st, %st(1)
- faddp %st, %st(2)
-
- FLD -7 * SIZE(BO)
- FLD -6 * SIZE(AO)
- fmul %st(1), %st
- faddp %st, %st(2)
-
- FLD -5 * SIZE(AO)
- fmulp %st, %st(1)
- faddp %st, %st(2)
-
- FLD -6 * SIZE(BO)
- FLD -4 * SIZE(AO)
- fmul %st(1), %st
- faddp %st, %st(2)
-
- FLD -3 * SIZE(AO)
- fmulp %st, %st(1)
- faddp %st, %st(2)
-
- FLD -5 * SIZE(BO)
- FLD -2 * SIZE(AO)
- fmul %st(1), %st
- faddp %st, %st(2)
-
- FLD -1 * SIZE(AO)
- fmulp %st, %st(1)
- faddp %st, %st(2)
-
- addl $8 * SIZE,AO
- addl $4 * SIZE,BO
-
- decl %eax
- jne .L32
- ALIGN_4
-
- .L35:
- #if defined(LT) || defined(RN)
- movl KK, %eax
- #else
- movl K, %eax
- subl KK, %eax
- #endif
- and $3, %eax
- je .L38
- ALIGN_4
-
- .L36:
- FLD -8 * SIZE(BO)
-
- FLD -8 * SIZE(AO)
- fmul %st(1), %st
- faddp %st, %st(2)
-
- FLD -7 * SIZE(AO)
- fmulp %st, %st(1)
- faddp %st, %st(2)
-
- addl $2 * SIZE,AO
- addl $1 * SIZE,BO
-
- decl %eax
- jne .L36
- ALIGN_4
-
- .L38:
- #if defined(LN) || defined(RT)
- movl KK, %eax
- #ifdef LN
- subl $2, %eax
- #else
- subl $1, %eax
- #endif
-
- sall $BASE_SHIFT, %eax
-
- movl AORIG, AO
- leal (AO, %eax, 2), AO
- leal (B, %eax, 1), BO
- #endif
-
- #if defined(LN) || defined(LT)
- FLD -8 * SIZE(BO)
- fsubp %st, %st(1)
- FLD -7 * SIZE(BO)
- fsubp %st, %st(2)
- #else
- FLD -8 * SIZE(AO)
- fsubp %st, %st(1)
- FLD -7 * SIZE(AO)
- fsubp %st, %st(2)
- #endif
-
- #ifdef LN
- FLD -5 * SIZE(AO)
- fmulp %st, %st(2)
-
- FLD -6 * SIZE(AO)
- fmul %st(2), %st
-
- fsubrp %st, %st(1)
- FLD -8 * SIZE(AO)
- fmulp %st, %st(1)
- #endif
-
- #ifdef LT
- FLD -8 * SIZE(AO)
- fmulp %st, %st(1)
-
- FLD -7 * SIZE(AO)
- fmul %st(1), %st
-
- fsubrp %st, %st(2)
-
- FLD -5 * SIZE(AO)
- fmulp %st, %st(2)
- #endif
-
- #ifdef RN
- FLD -8 * SIZE(BO)
- fmul %st, %st(1)
- fmulp %st, %st(2)
- #endif
-
- #ifdef RT
- FLD -8 * SIZE(BO)
- fmul %st, %st(1)
- fmulp %st, %st(2)
- #endif
-
- #ifdef LN
- subl $2 * SIZE, CO
- #endif
-
- #if defined(LN) || defined(LT)
- fld %st
- FST -8 * SIZE(BO)
- fxch %st(1)
- fld %st
- FST -7 * SIZE(BO)
- #else
- fld %st
- FST -8 * SIZE(AO)
- fxch %st(1)
- fld %st
- FST -7 * SIZE(AO)
- #endif
-
- FST 1 * SIZE(CO)
- FST 0 * SIZE(CO)
-
- #ifndef LN
- addl $2 * SIZE, CO
- #endif
-
- #if defined(LT) || defined(RN)
- movl K, %eax
- subl KK, %eax
- sall $BASE_SHIFT, %eax
- leal (AO, %eax, 2), AO
- leal (BO, %eax, 1), BO
- #endif
-
- #ifdef LN
- subl $2, KK
- #endif
-
- #ifdef LT
- addl $2, KK
- #endif
-
- #ifdef RT
- movl K, %eax
- sall $1 + BASE_SHIFT, %eax
- addl %eax, AORIG
- #endif
-
- decl I
- jne .L31
- ALIGN_4
-
- .L40:
- movl M, %eax
- andl $1, %eax
- je .L49
- ALIGN_4
-
- .L41:
- #ifdef LN
- movl K, %eax
- sall $0 + BASE_SHIFT, %eax
- subl %eax, AORIG
- #endif
-
- #if defined(LN) || defined(RT)
- movl KK, %eax
- sall $BASE_SHIFT, %eax
- movl AORIG, AO
- leal (AO, %eax, 1), AO
- leal (B, %eax, 1), BO
- #else
- movl B, BO
- #endif
-
- fldz
-
- #if defined(LT) || defined(RN)
- movl KK, %eax
- #else
- movl K, %eax
- subl KK, %eax
- #endif
- sarl $2, %eax
- je .L45
- ALIGN_4
-
- .L42:
- PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
-
- FLD -8 * SIZE(AO)
- FLD -8 * SIZE(BO)
- fmulp %st, %st(1)
- faddp %st, %st(1)
-
- FLD -7 * SIZE(AO)
- FLD -7 * SIZE(BO)
- fmulp %st, %st(1)
- faddp %st, %st(1)
-
- FLD -6 * SIZE(AO)
- FLD -6 * SIZE(BO)
- fmulp %st, %st(1)
- faddp %st, %st(1)
-
- FLD -5 * SIZE(AO)
- FLD -5 * SIZE(BO)
- fmulp %st, %st(1)
- faddp %st, %st(1)
-
- addl $4 * SIZE,AO
- addl $4 * SIZE,BO
-
- decl %eax
- jne .L42
- ALIGN_4
-
- .L45:
- #if defined(LT) || defined(RN)
- movl KK, %eax
- #else
- movl K, %eax
- subl KK, %eax
- #endif
- and $3, %eax
- je .L48
- ALIGN_4
-
- .L46:
- FLD -8 * SIZE(AO)
-
- FLD -8 * SIZE(BO)
- fmulp %st, %st(1)
- faddp %st, %st(1)
-
- addl $1 * SIZE,AO
- addl $1 * SIZE,BO
-
- decl %eax
- jne .L46
- ALIGN_4
-
- .L48:
- #if defined(LN) || defined(RT)
- movl KK, %eax
- #ifdef LN
- subl $1, %eax
- #else
- subl $1, %eax
- #endif
-
- sall $BASE_SHIFT, %eax
-
- movl AORIG, AO
- leal (AO, %eax, 1), AO
- leal (B, %eax, 1), BO
- #endif
-
- #if defined(LN) || defined(LT)
- FLD -8 * SIZE(BO)
- fsubp %st, %st(1)
- #else
- FLD -8 * SIZE(AO)
- fsubp %st, %st(1)
- #endif
-
- #ifdef LN
- FLD -8 * SIZE(AO)
- fmulp %st, %st(1)
- #endif
-
- #ifdef LT
- FLD -8 * SIZE(AO)
- fmulp %st, %st(1)
- #endif
-
- #ifdef RN
- FLD -8 * SIZE(BO)
- fmulp %st, %st(1)
- #endif
-
- #ifdef RT
- FLD -8 * SIZE(BO)
- fmulp %st, %st(1)
- #endif
-
- #ifdef LN
- subl $1 * SIZE, CO
- #endif
-
- #if defined(LN) || defined(LT)
- fld %st
- FST -8 * SIZE(BO)
- #else
- fld %st
- FST -8 * SIZE(AO)
- #endif
-
- FST 0 * SIZE(CO)
-
- #ifndef LN
- addl $1 * SIZE, CO
- #endif
-
- #if defined(LT) || defined(RN)
- movl K, %eax
- subl KK, %eax
- sall $BASE_SHIFT, %eax
- leal (AO, %eax, 1), AO
- leal (BO, %eax, 1), BO
- #endif
-
- #ifdef LN
- subl $1, KK
- #endif
-
- #ifdef LT
- addl $1, KK
- #endif
-
- #ifdef RT
- movl K, %eax
- sall $0 + BASE_SHIFT, %eax
- addl %eax, AORIG
- #endif
- ALIGN_4
-
- .L49:
- #ifdef LN
- movl K, %eax
- sall $BASE_SHIFT, %eax
- leal (B, %eax, 1), B
- #endif
-
- #if defined(LT) || defined(RN)
- movl BO, B
- #endif
-
- #ifdef RN
- addl $1, KK
- #endif
-
- #ifdef RT
- subl $1, KK
- #endif
- ALIGN_4
-
- .L999:
- popl %ebx
- popl %esi
- popl %edi
- popl %ebp
- addl $ARGS, %esp
- ret
-
- EPILOGUE
|