|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231 |
- /*********************************************************************/
- /* 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 KKK 8 + STACK(%esp)
- #define AORIG 12 + 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, %eax
- andl $1, %eax
- je .L20
- 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(3)
- #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
-
- .L20:
- movl M, I
- sarl $1, I
- je .L29
- 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
-
- .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 %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, %eax
- andl $1, %eax
- je .L40
- 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
-
- .L40:
- movl M, I
- sarl $1, I
- je .L49
- 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(3)
- #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
-
- .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
|