|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251 |
- /*********************************************************************/
- /* 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"
-
- #define STACK 16
- #define ARGS 32
-
- #define J 0 + STACK(%esp)
- #define I 4 + STACK(%esp)
- #define KK 8 + STACK(%esp)
- #define KKK 12 + STACK(%esp)
- #define AORIG 16 + 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)
- #ifdef DOUBLE
- #define STACK_A 24 + STACK + ARGS(%esp)
- #define STACK_B 28 + STACK + ARGS(%esp)
- #define C 32 + STACK + ARGS(%esp)
- #define STACK_LDC 36 + STACK + ARGS(%esp)
- #define OFFSET 40 + STACK + ARGS(%esp)
- #else
- #define STACK_A 20 + STACK + ARGS(%esp)
- #define STACK_B 24 + STACK + ARGS(%esp)
- #define C 28 + STACK + ARGS(%esp)
- #define STACK_LDC 32 + STACK + ARGS(%esp)
- #define OFFSET 36 + STACK + ARGS(%esp)
- #endif
-
- #define A %edx
- #define B %ecx
- #define B_ORIG %ebx
- #define LDC %ebp
-
- #define PREFETCHSIZE (5 + 8 * 10)
-
- PROLOGUE
-
- subl $ARGS, %esp # Generate Stack Frame
-
- pushl %ebp
- pushl %edi
- pushl %esi
- pushl %ebx
-
- PROFCODE
-
- movl STACK_B, B_ORIG
- movl STACK_LDC, LDC
- leal (, LDC, SIZE), LDC
-
- #ifdef LN
- movl M, %eax
- leal (, %eax, SIZE), %eax
- addl %eax, C
- imull K, %eax
- addl %eax, STACK_A
- #endif
-
- #ifdef RT
- movl N, %eax
- leal (, %eax, SIZE), %eax
- imull K, %eax
- addl %eax, B_ORIG
-
- movl N, %eax
- imull LDC, %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
-
- subl $-16 * SIZE, B_ORIG
- subl $-16 * SIZE, STACK_A
-
- movl M, %eax
- testl %eax, %eax
- jle .L999
-
- movl N, %eax
- testl %eax, %eax
- jle .L999
-
- movl K, %eax
- testl %eax, %eax
- jle .L999
-
- movl N, %eax
- andl $1, %eax
- je .L20
- ALIGN_3
-
- .L31:
- #if defined(LT) || defined(RN)
- movl STACK_A, A
- #else
- movl STACK_A, %eax
- movl %eax, AORIG
- #endif
-
- #ifdef RT
- movl K, %eax
- sall $0 + BASE_SHIFT, %eax
- subl %eax, B_ORIG
- #endif
-
- #ifdef RT
- subl LDC, C
- #endif
- movl C, %edi
- #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 B_ORIG, B
-
- #if defined(LT) || defined(RN)
- movl KK, %eax
- #else
- movl K, %eax
- subl KK, %eax
- #endif
- sarl $5, %eax
- jle .L33
- ALIGN_4
-
- .L32:
- movl -16 * SIZE(B), %esi
- movl -8 * SIZE(B), %esi
- movl 0 * SIZE(B), %esi
- movl 8 * SIZE(B), %esi
- subl $-32 * SIZE, B
- decl %eax
- jne .L32
- ALIGN_3
-
- .L33:
- movl M, %esi
- movl %esi, I
- ALIGN_3
-
- .L34:
- #ifdef LN
- movl K, %eax
- sall $BASE_SHIFT, %eax
- subl %eax, AORIG
- #endif
-
- #if defined(LN) || defined(RT)
- movl KK, %eax
- leal (, %eax, SIZE), %eax
- movl AORIG, A
- leal (A , %eax, 1), A
- leal (B_ORIG, %eax, 1), B
- #else
- movl B_ORIG, B
- #endif
-
- fldz
- fldz
- fldz
- fldz
-
- prefetchw 1 * SIZE(%edi)
-
- #if defined(LT) || defined(RN)
- movl KK, %eax
- #else
- movl K, %eax
- subl KK, %eax
- #endif
- sarl $3, %eax
- je .L36
- ALIGN_3
-
- .L35:
- FLD -16 * SIZE(A)
- FMUL -16 * SIZE(B)
- faddp %st, %st(1)
-
- FLD -15 * SIZE(A)
- FMUL -15 * SIZE(B)
- faddp %st, %st(2)
-
- FLD -14 * SIZE(A)
- FMUL -14 * SIZE(B)
- faddp %st, %st(3)
-
- FLD -13 * SIZE(A)
- FMUL -13 * SIZE(B)
- faddp %st, %st(4)
-
- FLD -12 * SIZE(A)
- FMUL -12 * SIZE(B)
- faddp %st, %st(1)
-
- FLD -11 * SIZE(A)
- FMUL -11 * SIZE(B)
- faddp %st, %st(2)
-
- FLD -10 * SIZE(A)
- FMUL -10 * SIZE(B)
- faddp %st, %st(3)
-
- FLD -9 * SIZE(A)
- FMUL -9 * SIZE(B)
- faddp %st, %st(4)
-
- addl $8 * SIZE, A
- addl $8 * SIZE, B
-
- decl %eax
- jne .L35
- ALIGN_4
-
- .L36:
- #if defined(LT) || defined(RN)
- movl KK, %eax
- #else
- movl K, %eax
- subl KK, %eax
- #endif
- and $7, %eax
- je .L39
- ALIGN_4
-
- .L37:
- FLD -16 * SIZE(A)
- FMUL -16 * SIZE(B)
- faddp %st, %st(1)
-
- addl $1 * SIZE,A
- addl $1 * SIZE,B
- decl %eax
- jne .L37
- ALIGN_4
-
- .L39:
- faddp %st, %st(2)
- faddp %st, %st(2)
- faddp %st, %st(1)
-
- #if defined(LN) || defined(RT)
- movl KK, %eax
- subl $1, %eax
-
- movl AORIG, A
- leal (A, %eax, SIZE), A
- leal (B_ORIG, %eax, SIZE), B
- #endif
-
- #if defined(LN) || defined(LT)
- FLD 0 * SIZE - 16 * SIZE(B)
- fsubp %st, %st(1)
- #else
- FLD 0 * SIZE - 16 * SIZE(A)
- fsubp %st, %st(1)
- #endif
-
- #if defined(LN) || defined(LT)
- FLD 0 * SIZE - 16 * SIZE(A)
- fmulp %st, %st(1)
- #endif
-
- #if defined(RN) || defined(RT)
- FMUL 0 * SIZE - 16 * SIZE(B)
- #endif
-
- #ifdef LN
- subl $1 * SIZE, %edi
- #endif
-
- #if defined(LN) || defined(LT)
- FSTU 0 * SIZE - 16 * SIZE(B)
- #else
- FSTU 0 * SIZE - 16 * SIZE(A)
- #endif
-
- FST 0 * SIZE(%edi)
-
- #ifndef LN
- addl $1 * SIZE, %edi
- #endif
-
- #if defined(LT) || defined(RN)
- movl K, %eax
- subl KK, %eax
- leal (A, %eax, SIZE), A
- leal (B, %eax, SIZE), B
- #endif
-
- #ifdef LN
- subl $1, KK
- #endif
-
- #ifdef LT
- addl $1, KK
- #endif
-
- #ifdef RT
- movl K, %eax
- sall $BASE_SHIFT, %eax
- addl %eax, AORIG
- #endif
- decl I
- jne .L34
-
- #ifdef LN
- movl K, %eax
- leal ( , %eax, SIZE), %eax
- leal (B_ORIG, %eax, 1), B_ORIG
- #endif
- #if defined(LT) || defined(RN)
- movl B, B_ORIG
- #endif
-
- #ifdef RN
- addl $1, KK
- #endif
-
- #ifdef RT
- subl $1, KK
- #endif
- ALIGN_4
-
- .L20:
- movl N, %eax
- andl $2, %eax
- je .L30
-
- #if defined(LT) || defined(RN)
- movl STACK_A, A
- #else
- movl STACK_A, %eax
- movl %eax, AORIG
- #endif
-
- #ifdef RT
- movl K, %eax
- sall $1 + BASE_SHIFT, %eax
- subl %eax, B_ORIG
- #endif
-
- leal (, LDC, 2), %eax
- #ifdef RT
- subl %eax, C
- #endif
- movl C, %edi
- #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 B_ORIG, B
-
- #if defined(LT) || defined(RN)
- movl KK, %eax
- #else
- movl K, %eax
- subl KK, %eax
- #endif
- sarl $4, %eax
- jle .L23
- ALIGN_4
-
- .L22:
- movl -16 * SIZE(B), %esi
- movl -8 * SIZE(B), %esi
- movl 0 * SIZE(B), %esi
- movl 8 * SIZE(B), %esi
- subl $-32 * SIZE, B
- decl %eax
- jne .L22
- ALIGN_3
-
- .L23:
- movl M, %esi
- movl %esi, I
- ALIGN_3
-
- .L24:
- #ifdef LN
- movl K, %eax
- sall $BASE_SHIFT, %eax
- subl %eax, AORIG
- #endif
-
- #if defined(LN) || defined(RT)
- movl KK, %eax
- leal (, %eax, SIZE), %eax
- movl AORIG, A
- leal (A , %eax, 1), A
- leal (B_ORIG, %eax, 2), B
- #else
- movl B_ORIG, B
- #endif
-
- fldz
- fldz
- fldz
- fldz
-
- FLD -16 * SIZE(A)
- FLD -16 * SIZE(B)
-
- prefetchw 1 * SIZE(%edi)
- prefetchw 1 * SIZE(%edi, LDC)
-
- #if defined(LT) || defined(RN)
- movl KK, %eax
- #else
- movl K, %eax
- subl KK, %eax
- #endif
- sarl $3, %eax
- je .L26
- ALIGN_3
-
- .L25:
- fmul %st(1), %st
- faddp %st, %st(2)
-
- FMUL -15 * SIZE(B)
- faddp %st, %st(2)
-
- FLD -15 * SIZE(A)
- FLD -14 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(4)
-
- FMUL -13 * SIZE(B)
- faddp %st, %st(4)
-
- FLD -14 * SIZE(A)
- FLD -12 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(2)
-
- FMUL -11 * SIZE(B)
- faddp %st, %st(2)
-
- FLD -13 * SIZE(A)
- FLD -10 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(4)
-
- FMUL -9 * SIZE(B)
- faddp %st, %st(4)
-
- FLD -12 * SIZE(A)
- FLD -8 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(2)
-
- FMUL -7 * SIZE(B)
- faddp %st, %st(2)
-
- FLD -11 * SIZE(A)
- FLD -6 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(4)
-
- FMUL -5 * SIZE(B)
- faddp %st, %st(4)
-
- FLD -10 * SIZE(A)
- FLD -4 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(2)
-
- FMUL -3 * SIZE(B)
- faddp %st, %st(2)
-
- FLD -9 * SIZE(A)
- FLD -2 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(4)
-
- FMUL -1 * SIZE(B)
- faddp %st, %st(4)
-
- FLD -8 * SIZE(A)
- FLD 0 * SIZE(B)
-
- addl $ 8 * SIZE, A
- subl $-16 * SIZE, B
-
- decl %eax
- jne .L25
- ALIGN_4
-
- .L26:
- #if defined(LT) || defined(RN)
- movl KK, %eax
- #else
- movl K, %eax
- subl KK, %eax
- #endif
- and $7, %eax
- je .L29
- ALIGN_4
-
- .L27:
- fmul %st(1), %st
- faddp %st, %st(2)
-
- FMUL -15 * SIZE(B)
- faddp %st, %st(2)
-
- FLD -15 * SIZE(A)
- FLD -14 * SIZE(B)
-
- addl $1 * SIZE,A
- addl $2 * SIZE,B
-
- decl %eax
- jne .L27
- ALIGN_4
-
- .L29:
- ffreep %st(0)
- ffreep %st(0)
-
- faddp %st, %st(2)
- faddp %st, %st(2)
-
- #if defined(LN) || defined(RT)
- movl KK, %eax
- #ifdef LN
- subl $1, %eax
- #else
- subl $2, %eax
- #endif
-
- leal (, %eax, SIZE), %eax
-
- movl AORIG, A
- leal (A, %eax, 1), A
- leal (B_ORIG, %eax, 2), B
- #endif
-
- #if defined(LN) || defined(LT)
- FLD 0 * SIZE - 16 * SIZE(B)
- fsubp %st, %st(1)
- FLD 1 * SIZE - 16 * SIZE(B)
- fsubp %st, %st(2)
- #else
- FLD 0 * SIZE - 16 * SIZE(A)
- fsubp %st, %st(1)
- FLD 1 * SIZE - 16 * SIZE(A)
- fsubp %st, %st(2)
- #endif
-
- #ifdef LN
- FLD 0 * SIZE - 16 * SIZE(A)
- fmul %st, %st(1)
- fmulp %st, %st(2)
- #endif
-
- #ifdef LT
- FLD 0 * SIZE - 16 * SIZE(A)
- fmul %st, %st(1)
- fmulp %st, %st(2)
- #endif
-
- #ifdef RN
- FMUL 0 * SIZE - 16 * SIZE(B)
-
- FLD 1 * SIZE - 16 * SIZE(B)
- fmul %st(1), %st
- fsubrp %st, %st(2)
-
- FLD 3 * SIZE - 16 * SIZE(B)
- fmulp %st, %st(2)
- #endif
-
- #ifdef RT
- FLD 3 * SIZE - 16 * SIZE(B)
- fmulp %st, %st(2)
- FLD 2 * SIZE - 16 * SIZE(B)
- fmul %st(2), %st
- fsubrp %st, %st(1)
-
- FLD 0 * SIZE - 16 * SIZE(B)
- fmulp %st, %st(1)
- #endif
-
- #ifdef LN
- subl $1 * SIZE, %edi
- #endif
-
- #if defined(LN) || defined(LT)
- FSTU 0 * SIZE - 16 * SIZE(B)
- fxch %st(1)
- FSTU 1 * SIZE - 16 * SIZE(B)
- #else
- FSTU 0 * SIZE - 16 * SIZE(A)
- fxch %st(1)
- FSTU 1 * SIZE - 16 * SIZE(A)
- #endif
-
- FST 0 * SIZE(%edi, LDC)
- FST 0 * SIZE(%edi)
-
- #ifndef LN
- addl $1 * SIZE, %edi
- #endif
-
- #if defined(LT) || defined(RN)
- movl K, %eax
- subl KK, %eax
- leal (,%eax, SIZE), %eax
- leal (A, %eax, 1), A
- leal (B, %eax, 2), B
- #endif
-
- #ifdef LN
- subl $1, KK
- #endif
-
- #ifdef LT
- addl $1, KK
- #endif
-
- #ifdef RT
- movl K, %eax
- sall $BASE_SHIFT, %eax
- addl %eax, AORIG
- #endif
- decl I
- jne .L24
-
- #ifdef LN
- movl K, %eax
- leal ( , %eax, SIZE), %eax
- leal (B_ORIG, %eax, 2), B_ORIG
- #endif
- #if defined(LT) || defined(RN)
- movl B, B_ORIG
- #endif
-
- #ifdef RN
- addl $2, KK
- #endif
-
- #ifdef RT
- subl $2, KK
- #endif
- ALIGN_4
-
- .L30:
- movl N, %eax
- sarl $2, %eax
- movl %eax, J
- je .L999
- ALIGN_3
-
- .L11:
- #if defined(LT) || defined(RN)
- movl STACK_A, A
- #else
- movl STACK_A, %eax
- movl %eax, AORIG
- #endif
-
- #ifdef RT
- movl K, %eax
- sall $2 + BASE_SHIFT, %eax
- subl %eax, B_ORIG
- #endif
-
- leal (, LDC, 4), %eax
- #ifdef RT
- subl %eax, C
- #endif
- movl C, %edi
- #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 B_ORIG, B
-
- #if defined(LT) || defined(RN)
- movl KK, %eax
- #else
- movl K, %eax
- subl KK, %eax
- #endif
- sarl $4, %eax
- jle .L13
- ALIGN_4
-
- .L12:
- movl -16 * SIZE(B), %esi
- movl -8 * SIZE(B), %esi
- movl 0 * SIZE(B), %esi
- movl 8 * SIZE(B), %esi
- movl 16 * SIZE(B), %esi
- movl 24 * SIZE(B), %esi
- movl 32 * SIZE(B), %esi
- movl 40 * SIZE(B), %esi
- subl $-64 * SIZE, B
- decl %eax
- jne .L12
- ALIGN_3
-
- .L13:
- movl M, %esi
- movl %esi, I
- ALIGN_3
-
- .L14:
- #ifdef LN
- movl K, %eax
- sall $BASE_SHIFT, %eax
- subl %eax, AORIG
- #endif
-
- #if defined(LN) || defined(RT)
- movl KK, %eax
- leal (, %eax, SIZE), %eax
- movl AORIG, A
- leal (A , %eax, 1), A
- leal (B_ORIG, %eax, 4), B
- #else
- movl B_ORIG, B
- #endif
-
- leal (%edi, LDC, 2), %eax
-
- fldz
- fldz
- fldz
- fldz
-
- FLD -8 * SIZE(A)
- FLD -16 * SIZE(A)
- FLD -16 * SIZE(B)
-
- movl $32 * SIZE, %esi
-
- prefetchw 1 * SIZE(%edi)
- prefetchw 1 * SIZE(%edi, LDC)
- prefetchw 1 * SIZE(%eax)
- prefetchw 1 * SIZE(%eax, LDC)
-
- #if defined(LT) || defined(RN)
- movl KK, %eax
- #else
- movl K, %eax
- subl KK, %eax
- #endif
- sarl $3, %eax
- je .L16
- ALIGN_3
-
- .L15:
- fmul %st(1), %st
- faddp %st, %st(3)
- PADDING
- FLD -15 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(4)
- PADDING
- FLD -14 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(5)
- PADDING
- FMUL -13 * SIZE(B)
-
- faddp %st, %st(5)
- FLD -15 * SIZE(A)
- FLD -12 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(3)
- PADDING
- FLD -11 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(4)
- PADDING
- FLD -10 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(5)
- PADDING
- FMUL -9 * SIZE(B)
-
- faddp %st, %st(5)
- FLD -14 * SIZE(A)
- FLD -8 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(3)
- PADDING
- FLD -7 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(4)
- PADDING
- FLD -6 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(5)
- PADDING
- FMUL -5 * SIZE(B)
-
- faddp %st, %st(5)
- FLD -13 * SIZE(A)
- FLD -4 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(3)
- PADDING
- FLD -3 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(4)
- PADDING
- FLD -2 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(5)
- PADDING
- FMUL -1 * SIZE(B)
-
- faddp %st, %st(5)
- FLD -12 * SIZE(A)
- FLD 0 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(3)
- PADDING
- FLD 1 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(4)
- PADDING
- FLD 2 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(5)
- PADDING
- FMUL 3 * SIZE(B)
-
- faddp %st, %st(5)
- FLD -11 * SIZE(A)
- FLD 4 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(3)
- PADDING
- FLD 5 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(4)
- PADDING
- FLD 6 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(5)
- PADDING
- FMUL 7 * SIZE(B)
-
- faddp %st, %st(5)
- FLD -10 * SIZE(A)
- FLD 8 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(3)
- PADDING
- FLD 9 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(4)
- PADDING
- FLD 10 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(5)
- PADDING
- FMUL 11 * SIZE(B)
-
- faddp %st, %st(5)
- FLD -9 * SIZE(A)
- FLD 12 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(3)
- PADDING
- FLD 13 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(4)
- PADDING
- FLD 14 * SIZE(B)
-
- fmul %st(1), %st
- faddp %st, %st(5)
- PADDING
- FMUL 15 * SIZE(B)
-
- faddp %st, %st(5)
- FLD 0 * SIZE(A)
-
- PADDING prefetch PREFETCHSIZE * SIZE(A)
-
- addl $8 * SIZE, A
- fxch %st(1)
- addl $32 * SIZE, B
-
- FLD -16 * SIZE(B)
- decl %eax
- jne .L15
- ALIGN_4
-
- .L16:
- #if defined(LT) || defined(RN)
- movl KK, %eax
- #else
- movl K, %eax
- subl KK, %eax
- #endif
- and $7, %eax
- je .L19
- ALIGN_4
-
- .L17:
- fmul %st(1), %st
- faddp %st, %st(3)
-
- FLD -15 * SIZE(B)
- fmul %st(1), %st
- faddp %st, %st(4)
-
- FLD -14 * SIZE(B)
- fmul %st(1), %st
- faddp %st, %st(5)
-
- FMUL -13 * SIZE(B)
- faddp %st, %st(5)
- FLD -15 * SIZE(A)
- FLD -12 * SIZE(B)
-
- addl $1 * SIZE,A
- addl $4 * SIZE,B
-
- decl %eax
- jne .L17
- ALIGN_4
-
- .L19:
- ffreep %st(0)
- ffreep %st(0)
- ffreep %st(0)
-
- #if defined(LN) || defined(RT)
- movl KK, %eax
- #ifdef LN
- subl $1, %eax
- #else
- subl $4, %eax
- #endif
-
- leal (, %eax, SIZE), %eax
-
- movl AORIG, A
- leal (A, %eax, 1), A
- leal (B_ORIG, %eax, 4), B
- #endif
-
- #if defined(LN) || defined(LT)
- FLD 0 * SIZE - 16 * SIZE(B)
- fsubp %st, %st(1)
- FLD 1 * SIZE - 16 * SIZE(B)
- fsubp %st, %st(2)
- FLD 2 * SIZE - 16 * SIZE(B)
- fsubp %st, %st(3)
- FLD 3 * SIZE - 16 * SIZE(B)
- fsubp %st, %st(4)
- #else
- FLD 0 * SIZE - 16 * SIZE(A)
- fsubp %st, %st(1)
- FLD 1 * SIZE - 16 * SIZE(A)
- fsubp %st, %st(2)
- FLD 2 * SIZE - 16 * SIZE(A)
- fsubp %st, %st(3)
- FLD 3 * SIZE - 16 * SIZE(A)
- fsubp %st, %st(4)
- #endif
-
- #ifdef LN
- FLD 0 * SIZE - 16 * SIZE(A)
- fmul %st, %st(1)
- fmul %st, %st(2)
- fmul %st, %st(3)
- fmulp %st, %st(4)
- #endif
-
- #ifdef LT
- FLD 0 * SIZE - 16 * SIZE(A)
- fmul %st, %st(1)
- fmul %st, %st(2)
- fmul %st, %st(3)
- fmulp %st, %st(4)
- #endif
-
- #ifdef RN
- FMUL 0 * SIZE - 16 * SIZE(B)
-
- FLD 1 * SIZE - 16 * SIZE(B)
- fmul %st(1), %st
- fsubrp %st, %st(2)
- FLD 2 * SIZE - 16 * SIZE(B)
- fmul %st(1), %st
- fsubrp %st, %st(3)
- FLD 3 * SIZE - 16 * SIZE(B)
- fmul %st(1), %st
- fsubrp %st, %st(4)
-
- FLD 5 * SIZE - 16 * SIZE(B)
- fmulp %st, %st(2)
- FLD 6 * SIZE - 16 * SIZE(B)
- fmul %st(2), %st
- fsubrp %st, %st(3)
- FLD 7 * SIZE - 16 * SIZE(B)
- fmul %st(2), %st
- fsubrp %st, %st(4)
-
- FLD 10 * SIZE - 16 * SIZE(B)
- fmulp %st, %st(3)
- FLD 11 * SIZE - 16 * SIZE(B)
- fmul %st(3), %st
- fsubrp %st, %st(4)
-
- FLD 15 * SIZE - 16 * SIZE(B)
- fmulp %st, %st(4)
- #endif
-
- #ifdef RT
- FLD 15 * SIZE - 16 * SIZE(B)
- fmulp %st, %st(4)
-
- FLD 14 * SIZE - 16 * SIZE(B)
- fmul %st(4), %st
- fsubrp %st, %st(3)
- FLD 13 * SIZE - 16 * SIZE(B)
- fmul %st(4), %st
- fsubrp %st, %st(2)
- FLD 12 * SIZE - 16 * SIZE(B)
- fmul %st(4), %st
- fsubrp %st, %st(1)
-
- FLD 10 * SIZE - 16 * SIZE(B)
- fmulp %st, %st(3)
- FLD 9 * SIZE - 16 * SIZE(B)
- fmul %st(3), %st
- fsubrp %st, %st(2)
- FLD 8 * SIZE - 16 * SIZE(B)
- fmul %st(3), %st
- fsubrp %st, %st(1)
-
- FLD 5 * SIZE - 16 * SIZE(B)
- fmulp %st, %st(2)
- FLD 4 * SIZE - 16 * SIZE(B)
- fmul %st(2), %st
- fsubrp %st, %st(1)
-
- FLD 0 * SIZE - 16 * SIZE(B)
- fmulp %st, %st(1)
- #endif
-
- #ifdef LN
- subl $1 * SIZE, %edi
- #endif
-
- #if defined(LN) || defined(LT)
- FSTU 0 * SIZE - 16 * SIZE(B)
- fxch %st(1)
- FSTU 1 * SIZE - 16 * SIZE(B)
- fxch %st(2)
- FSTU 2 * SIZE - 16 * SIZE(B)
- fxch %st(3)
- FSTU 3 * SIZE - 16 * SIZE(B)
- #else
- FSTU 0 * SIZE - 16 * SIZE(A)
- fxch %st(1)
- FSTU 1 * SIZE - 16 * SIZE(A)
- fxch %st(2)
- FSTU 2 * SIZE - 16 * SIZE(A)
- fxch %st(3)
- FSTU 3 * SIZE - 16 * SIZE(A)
- #endif
-
- leal (%edi, LDC, 2), %eax
-
- FST 0 * SIZE(%eax, LDC)
- FST 0 * SIZE(%edi)
- FST 0 * SIZE(%edi, LDC)
- FST 0 * SIZE(%eax)
-
- #ifndef LN
- addl $1 * SIZE, %edi
- #endif
-
- #if defined(LT) || defined(RN)
- movl K, %eax
- subl KK, %eax
- leal (,%eax, SIZE), %eax
- leal (A, %eax, 1), A
- leal (B, %eax, 4), B
- #endif
-
- #ifdef LN
- subl $1, KK
- #endif
-
- #ifdef LT
- addl $1, KK
- #endif
-
- #ifdef RT
- movl K, %eax
- sall $BASE_SHIFT, %eax
- addl %eax, AORIG
- #endif
-
- decl I
- jne .L14
-
- #ifdef LN
- movl K, %eax
- leal ( , %eax, SIZE), %eax
- leal (B_ORIG, %eax, 4), B_ORIG
- #endif
- #if defined(LT) || defined(RN)
- movl B, B_ORIG
- #endif
-
- #ifdef RN
- addl $4, KK
- #endif
-
- #ifdef RT
- subl $4, KK
- #endif
-
- decl J
- jne .L11
- ALIGN_4
-
- .L999:
- popl %ebx
- popl %esi
- popl %edi
- popl %ebp
- addl $ARGS, %esp
- ret
-
- EPILOGUE
|