|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116 |
- /*********************************************************************/
- /* 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 M %rdi
- #define N %rsi
- #define K %rdx
-
- #define A %rcx
- #define B %r8
- #define C %r9
- #define LDC %r10
-
- #define I %r11
- #define AO %r13
- #define BO %r14
- #define CO1 %r15
- #define CO2 %rbx
- #define KK %rbp
- #define BB %r12
-
- #ifndef WINDOWS_ABI
-
- #define STACKSIZE 128
-
- #define OLD_LDC 8 + STACKSIZE(%rsp)
- #define OLD_OFFSET 16 + STACKSIZE(%rsp)
-
- #define OFFSET 48(%rsp)
- #define J 56(%rsp)
- #define KKK 64(%rsp)
- #define AORIG 72(%rsp)
-
- #else
-
- #define STACKSIZE 256
-
- #define OLD_A 40 + STACKSIZE(%rsp)
- #define OLD_B 48 + STACKSIZE(%rsp)
- #define OLD_C 56 + STACKSIZE(%rsp)
- #define OLD_LDC 64 + STACKSIZE(%rsp)
- #define OLD_OFFSET 72 + STACKSIZE(%rsp)
-
- #define OFFSET 224(%rsp)
- #define J 232(%rsp)
- #define KKK 240(%rsp)
- #define AORIG 248(%rsp)
-
- #endif
-
- #define PREFETCH prefetcht0
- #define PREFETCHSIZE (8 * 8 + 3)
-
- PROLOGUE
- PROFCODE
-
- subq $STACKSIZE, %rsp
- movq %rbx, 0(%rsp)
- movq %rbp, 8(%rsp)
- movq %r12, 16(%rsp)
- movq %r13, 24(%rsp)
- movq %r14, 32(%rsp)
- movq %r15, 40(%rsp)
-
- #ifdef WINDOWS_ABI
- movq %rdi, 48(%rsp)
- movq %rsi, 56(%rsp)
- movups %xmm6, 64(%rsp)
- movups %xmm7, 80(%rsp)
- movups %xmm8, 96(%rsp)
- movups %xmm9, 112(%rsp)
- movups %xmm10, 128(%rsp)
- movups %xmm11, 144(%rsp)
- movups %xmm12, 160(%rsp)
- movups %xmm13, 176(%rsp)
- movups %xmm14, 192(%rsp)
- movups %xmm15, 208(%rsp)
-
- movq ARG1, M
- movq ARG2, N
- movq ARG3, K
- movq OLD_A, A
- movq OLD_B, B
- movq OLD_C, C
- #endif
-
- movq OLD_LDC, LDC
- movq OLD_OFFSET, KK
-
- movq KK, OFFSET
-
- leaq (, LDC, SIZE), LDC
-
- #ifdef LN
- leaq (, M, SIZE), %rax
- addq %rax, C
- imulq K, %rax
- addq %rax, A
- #endif
-
- #ifdef RT
- leaq (, N, SIZE), %rax
- imulq K, %rax
- addq %rax, B
- movq N, %rax
- imulq LDC, %rax
- addq %rax, C
- #endif
-
- #ifdef RN
- negq KK
- #endif
-
- #ifdef RT
- movq N, %rax
- subq OFFSET, %rax
- movq %rax, KK
- #endif
-
- movq N, J
- sarq $1, J
- jle .L40
- ALIGN_4
-
- .L10:
- #if defined(LT) || defined(RN)
- movq A, AO
- #else
- movq A, AORIG
- #endif
-
- #ifdef RT
- movq K, %rax
- salq $1 + BASE_SHIFT, %rax
- subq %rax, B
-
- leaq (, LDC, 2), %rax
- subq %rax, C
- #endif
-
- movq C, CO1
- leaq (C, LDC, 1), CO2
- #ifndef RT
- leaq (C, LDC, 2), C
- #endif
-
- #ifdef LN
- movq OFFSET, %rax
- addq M, %rax
- movq %rax, KK
- #endif
-
- movq K, %rax
- salq $BASE_SHIFT + 1, %rax
- leaq (B, %rax), BB
-
- #ifdef LT
- movq OFFSET, %rax
- movq %rax, KK
- #endif
-
- testq $1, M
- je .L20
-
- #ifdef LN
- movq K, %rax
- salq $0 + BASE_SHIFT, %rax
- subq %rax, AORIG
- #endif
-
-
- #if defined(LN) || defined(RT)
- movq KK, %rax
- leaq (, %rax, SIZE), %rax
- movq AORIG, AO
- leaq (AO, %rax, 1), AO
- leaq (B, %rax, 2), BO
- #else
- movq B, BO
- #endif
-
- movsd 0 * SIZE(AO), %xmm0
- xorps %xmm7, %xmm7
- movsd 1 * SIZE(AO), %xmm2
- xorps %xmm5, %xmm5
-
- movsd 0 * SIZE(BO), %xmm1
- xorps %xmm8, %xmm8
- xorps %xmm9, %xmm9
- movsd 1 * SIZE(BO), %xmm3
-
- #if defined(LT) || defined(RN)
- movq KK, %rax
- #else
- movq K, %rax
- subq KK, %rax
- #endif
- sarq $2, %rax
- je .L35
- ALIGN_4
-
- .L32:
- addsd %xmm5, %xmm8
- movsd 2 * SIZE(BO), %xmm5
- mulsd %xmm0, %xmm1
- PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
-
- addsd %xmm7, %xmm9
- movsd 3 * SIZE(BO), %xmm7
- mulsd %xmm0, %xmm3
- movsd 2 * SIZE(AO), %xmm0
-
- addsd %xmm1, %xmm8
- movsd 4 * SIZE(BO), %xmm1
- mulsd %xmm2, %xmm5
-
- addsd %xmm3, %xmm9
- movsd 5 * SIZE(BO), %xmm3
- mulsd %xmm2, %xmm7
- movsd 3 * SIZE(AO), %xmm2
-
- addsd %xmm5, %xmm8
- movsd 6 * SIZE(BO), %xmm5
- mulsd %xmm0, %xmm1
-
- addsd %xmm7, %xmm9
- movsd 7 * SIZE(BO), %xmm7
- mulsd %xmm0, %xmm3
- movsd 4 * SIZE(AO), %xmm0
-
- addsd %xmm1, %xmm8
- movsd 8 * SIZE(BO), %xmm1
- mulsd %xmm2, %xmm5
-
- addsd %xmm3, %xmm9
- movsd 9 * SIZE(BO), %xmm3
- mulsd %xmm2, %xmm7
- movsd 5 * SIZE(AO), %xmm2
-
- addq $4 * SIZE, AO
- addq $8 * SIZE, BO
-
- decq %rax
- jne .L32
- ALIGN_4
-
- .L35:
- #if defined(LT) || defined(RN)
- movq KK, %rax
- #else
- movq K, %rax
- subq KK, %rax
- #endif
- addsd %xmm5, %xmm8
- addsd %xmm7, %xmm9
-
- andq $3, %rax
- BRANCH
- BRANCH
- je .L38
- ALIGN_4
-
- .L36:
- mulsd %xmm0, %xmm1
- addq $2 * SIZE, BO
- mulsd %xmm0, %xmm3
- movsd 1 * SIZE(AO), %xmm0
-
- addsd %xmm1, %xmm8
- movsd 0 * SIZE(BO), %xmm1
- addsd %xmm3, %xmm9
- movsd 1 * SIZE(BO), %xmm3
-
- addq $1 * SIZE, AO
- decq %rax
- BRANCH
- jg .L36
- ALIGN_4
-
- .L38:
- #if defined(LN) || defined(RT)
- movq KK, %rax
- #ifdef LN
- subq $1, %rax
- #else
- subq $2, %rax
- #endif
-
- leaq (, %rax, SIZE), %rax
- movq AORIG, AO
- leaq (AO, %rax, 1), AO
- leaq (B, %rax, 2), BO
- #endif
-
- #if defined(LN) || defined(LT)
- movsd 0 * SIZE(BO), %xmm0
- movsd 1 * SIZE(BO), %xmm1
-
- subsd %xmm8, %xmm0
- subsd %xmm9, %xmm1
- #else
- movsd 0 * SIZE(AO), %xmm0
- movsd 1 * SIZE(AO), %xmm1
-
- subsd %xmm8, %xmm0
- subsd %xmm9, %xmm1
- #endif
-
- #if defined(LN) || defined(LT)
- movsd 0 * SIZE(AO), %xmm8
- mulsd %xmm8, %xmm0
- mulsd %xmm8, %xmm1
- #endif
-
- #ifdef RN
- movsd 0 * SIZE(BO), %xmm8
- mulsd %xmm8, %xmm0
- movsd 1 * SIZE(BO), %xmm9
- mulsd %xmm0, %xmm9
- movsd 3 * SIZE(BO), %xmm13
- subsd %xmm9, %xmm1
- mulsd %xmm13, %xmm1
- #endif
-
- #ifdef RT
- movsd 3 * SIZE(BO), %xmm8
- mulsd %xmm8, %xmm1
- movsd 2 * SIZE(BO), %xmm9
- mulsd %xmm1, %xmm9
- movsd 0 * SIZE(BO), %xmm13
- subsd %xmm9, %xmm0
- mulsd %xmm13, %xmm0
- #endif
-
- #ifdef LN
- subq $1 * SIZE, CO1
- subq $1 * SIZE, CO2
- #endif
-
- movsd %xmm0, 0 * SIZE(CO1)
- movsd %xmm1, 0 * SIZE(CO2)
-
- #if defined(LN) || defined(LT)
- movsd %xmm0, 0 * SIZE(BO)
- movsd %xmm1, 1 * SIZE(BO)
- #else
- movsd %xmm0, 0 * SIZE(AO)
- movsd %xmm1, 1 * SIZE(AO)
- #endif
-
- #ifndef LN
- addq $1 * SIZE, CO1
- addq $1 * SIZE, CO2
- #endif
-
- #if defined(LT) || defined(RN)
- movq K, %rax
- subq KK, %rax
- leaq (,%rax, SIZE), %rax
- leaq (AO, %rax, 1), AO
- leaq (BO, %rax, 2), BO
- #endif
-
- #ifdef LN
- subq $1, KK
- #endif
-
- #ifdef LT
- addq $1, KK
- #endif
-
- #ifdef RT
- movq K, %rax
- salq $0 + BASE_SHIFT, %rax
- addq %rax, AORIG
- #endif
- ALIGN_4
-
- .L20:
- testq $2, M
- BRANCH
- je .L30
-
- #ifdef LN
- movq K, %rax
- salq $1 + BASE_SHIFT, %rax
- subq %rax, AORIG
- #endif
-
- #if defined(LN) || defined(RT)
- movq KK, %rax
- leaq (, %rax, SIZE), %rax
- movq AORIG, AO
- leaq (AO, %rax, 2), AO
- leaq (B, %rax, 2), BO
- #else
- movq B, BO
- #endif
-
- movsd 0 * SIZE(AO), %xmm0
- xorps %xmm2, %xmm2
- movsd 1 * SIZE(AO), %xmm4
- xorps %xmm5, %xmm5
- movsd 2 * SIZE(AO), %xmm5
- xorps %xmm6, %xmm6
- movsd 3 * SIZE(AO), %xmm7
-
- movsd 0 * SIZE(BO), %xmm1
- xorps %xmm8, %xmm8
- xorps %xmm9, %xmm9
- movsd 1 * SIZE(BO), %xmm3
- xorps %xmm10, %xmm10
- xorps %xmm11, %xmm11
-
- #if defined(LT) || defined(RN)
- movq KK, %rax
- #else
- movq K, %rax
- subq KK, %rax
- #endif
- sarq $2, %rax
- je .L25
- ALIGN_4
-
- .L22:
- PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
- addsd %xmm2, %xmm9
- movaps %xmm0, %xmm2
- mulsd %xmm1, %xmm0
-
- addsd %xmm6, %xmm11
- movaps %xmm4, %xmm6
- mulsd %xmm1, %xmm4
- movsd 2 * SIZE(BO), %xmm1
-
- addsd %xmm0, %xmm8
- movsd 4 * SIZE(AO), %xmm0
- mulsd %xmm3, %xmm2
-
- addsd %xmm4, %xmm10
- movsd 5 * SIZE(AO), %xmm4
- mulsd %xmm3, %xmm6
- movsd 3 * SIZE(BO), %xmm3
-
- addsd %xmm2, %xmm9
- movaps %xmm5, %xmm2
- mulsd %xmm1, %xmm5
-
- addsd %xmm6, %xmm11
- movaps %xmm7, %xmm6
- mulsd %xmm1, %xmm7
- movsd 4 * SIZE(BO), %xmm1
-
- addsd %xmm5, %xmm8
- movsd 6 * SIZE(AO), %xmm5
- mulsd %xmm3, %xmm2
-
- addsd %xmm7, %xmm10
- movsd 7 * SIZE(AO), %xmm7
- mulsd %xmm3, %xmm6
- movsd 5 * SIZE(BO), %xmm3
-
- addsd %xmm2, %xmm9
- movaps %xmm0, %xmm2
- mulsd %xmm1, %xmm0
-
- addsd %xmm6, %xmm11
- movaps %xmm4, %xmm6
- mulsd %xmm1, %xmm4
- movsd 6 * SIZE(BO), %xmm1
-
- addsd %xmm0, %xmm8
- movsd 8 * SIZE(AO), %xmm0
- mulsd %xmm3, %xmm2
-
- addsd %xmm4, %xmm10
- movsd 9 * SIZE(AO), %xmm4
- mulsd %xmm3, %xmm6
- movsd 7 * SIZE(BO), %xmm3
-
- addsd %xmm2, %xmm9
- movaps %xmm5, %xmm2
- mulsd %xmm1, %xmm5
-
- addsd %xmm6, %xmm11
- movaps %xmm7, %xmm6
- mulsd %xmm1, %xmm7
- movsd 8 * SIZE(BO), %xmm1
-
- addsd %xmm5, %xmm8
- movsd 10 * SIZE(AO), %xmm5
- mulsd %xmm3, %xmm2
-
- addsd %xmm7, %xmm10
- movsd 11 * SIZE(AO), %xmm7
- mulsd %xmm3, %xmm6
- movsd 9 * SIZE(BO), %xmm3
-
- addq $8 * SIZE, AO
- addq $8 * SIZE, BO
-
- decq %rax
- jne .L22
- ALIGN_4
-
- .L25:
- #if defined(LT) || defined(RN)
- movq KK, %rax
- #else
- movq K, %rax
- subq KK, %rax
- #endif
- andq $3, %rax
- BRANCH
- je .L29
- ALIGN_4
-
- .L26:
- addsd %xmm2, %xmm9
- movaps %xmm0, %xmm2
- mulsd %xmm1, %xmm0
-
- addsd %xmm6, %xmm11
- movaps %xmm4, %xmm6
- mulsd %xmm1, %xmm4
- movsd 2 * SIZE(BO), %xmm1
-
- mulsd %xmm3, %xmm2
- addsd %xmm0, %xmm8
- movsd 2 * SIZE(AO), %xmm0
-
- mulsd %xmm3, %xmm6
- movsd 3 * SIZE(BO), %xmm3
- addsd %xmm4, %xmm10
- movsd 3 * SIZE(AO), %xmm4
-
- addq $2 * SIZE, AO
- addq $2 * SIZE, BO
- decq %rax
- BRANCH
- jg .L26
- ALIGN_4
-
- .L29:
- addsd %xmm2, %xmm9
- addsd %xmm6, %xmm11
-
- #if defined(LN) || defined(RT)
- movq KK, %rax
- #ifdef LN
- subq $2, %rax
- #else
- subq $2, %rax
- #endif
-
- leaq (, %rax, SIZE), %rax
- movq AORIG, AO
- leaq (AO, %rax, 2), AO
- leaq (B, %rax, 2), BO
- #endif
-
- #if defined(LN) || defined(LT)
- movsd 0 * SIZE(BO), %xmm0
- movsd 1 * SIZE(BO), %xmm1
- movsd 2 * SIZE(BO), %xmm2
- movsd 3 * SIZE(BO), %xmm3
-
- subsd %xmm8, %xmm0
- subsd %xmm9, %xmm1
- subsd %xmm10, %xmm2
- subsd %xmm11, %xmm3
- #else
- movsd 0 * SIZE(AO), %xmm0
- movsd 1 * SIZE(AO), %xmm2
- movsd 2 * SIZE(AO), %xmm1
- movsd 3 * SIZE(AO), %xmm3
-
- subsd %xmm8, %xmm0
- subsd %xmm10, %xmm2
- subsd %xmm9, %xmm1
- subsd %xmm11, %xmm3
- #endif
-
- #ifdef LN
- movsd 3 * SIZE(AO), %xmm8
- mulsd %xmm8, %xmm2
- movsd 2 * SIZE(AO), %xmm9
- mulsd %xmm8, %xmm3
- movsd 0 * SIZE(AO), %xmm13
-
- movaps %xmm9, %xmm10
- mulsd %xmm2, %xmm9
- mulsd %xmm3, %xmm10
-
- subsd %xmm9, %xmm0
- subsd %xmm10, %xmm1
-
- mulsd %xmm13, %xmm0
- mulsd %xmm13, %xmm1
- #endif
-
- #ifdef LT
- movsd 0 * SIZE(AO), %xmm8
- mulsd %xmm8, %xmm0
- movsd 1 * SIZE(AO), %xmm9
- mulsd %xmm8, %xmm1
- movsd 3 * SIZE(AO), %xmm13
-
- movaps %xmm9, %xmm10
- mulsd %xmm0, %xmm9
- mulsd %xmm1, %xmm10
-
- subsd %xmm9, %xmm2
- subsd %xmm10, %xmm3
-
- mulsd %xmm13, %xmm2
- mulsd %xmm13, %xmm3
- #endif
-
- #ifdef RN
- movsd 0 * SIZE(BO), %xmm8
- mulsd %xmm8, %xmm0
- movsd 1 * SIZE(BO), %xmm9
- mulsd %xmm8, %xmm2
- movsd 3 * SIZE(BO), %xmm13
-
- movaps %xmm9, %xmm10
- mulsd %xmm0, %xmm9
- mulsd %xmm2, %xmm10
-
- subsd %xmm9, %xmm1
- subsd %xmm10, %xmm3
-
- mulsd %xmm13, %xmm1
- mulsd %xmm13, %xmm3
- #endif
-
- #ifdef RT
- movsd 3 * SIZE(BO), %xmm8
- mulsd %xmm8, %xmm1
- movsd 2 * SIZE(BO), %xmm9
- mulsd %xmm8, %xmm3
- movsd 0 * SIZE(BO), %xmm13
-
- movaps %xmm9, %xmm10
- mulsd %xmm1, %xmm9
- mulsd %xmm3, %xmm10
-
- subsd %xmm9, %xmm0
- subsd %xmm10, %xmm2
-
- mulsd %xmm13, %xmm0
- mulsd %xmm13, %xmm2
- #endif
-
- #ifdef LN
- subq $2 * SIZE, CO1
- subq $2 * SIZE, CO2
- #endif
-
- movsd %xmm0, 0 * SIZE(CO1)
- movsd %xmm2, 1 * SIZE(CO1)
- movsd %xmm1, 0 * SIZE(CO2)
- movsd %xmm3, 1 * SIZE(CO2)
-
- #if defined(LN) || defined(LT)
- movsd %xmm0, 0 * SIZE(BO)
- movsd %xmm1, 1 * SIZE(BO)
- movsd %xmm2, 2 * SIZE(BO)
- movsd %xmm3, 3 * SIZE(BO)
- #else
- movsd %xmm0, 0 * SIZE(AO)
- movsd %xmm2, 1 * SIZE(AO)
- movsd %xmm1, 2 * SIZE(AO)
- movsd %xmm3, 3 * SIZE(AO)
- #endif
-
- #ifndef LN
- addq $2 * SIZE, CO1
- addq $2 * SIZE, CO2
- #endif
-
- #if defined(LT) || defined(RN)
- movq K, %rax
- subq KK, %rax
- leaq (,%rax, SIZE), %rax
- leaq (AO, %rax, 2), AO
- leaq (BO, %rax, 2), BO
- #endif
-
- #ifdef LN
- subq $2, KK
- #endif
-
- #ifdef LT
- addq $2, KK
- #endif
-
- #ifdef RT
- movq K, %rax
- salq $1 + BASE_SHIFT, %rax
- addq %rax, AORIG
- #endif
- ALIGN_4
-
- .L30:
- movq M, I
- sarq $2, I
- jle .L39
- ALIGN_4
-
- .L11:
- #ifdef LN
- movq K, %rax
- salq $2 + BASE_SHIFT, %rax
- subq %rax, AORIG
- #endif
-
- #if defined(LN) || defined(RT)
- movq KK, %rax
- leaq (, %rax, SIZE), %rax
- movq AORIG, AO
- leaq (AO, %rax, 4), AO
- leaq (B, %rax, 2), BO
- #else
- movq B, BO
- #endif
-
- prefetcht0 0 * SIZE(BB)
- subq $-8 * SIZE, BB
-
- movsd 0 * SIZE(AO), %xmm0
- xorps %xmm2, %xmm2
- movsd 1 * SIZE(AO), %xmm4
- xorps %xmm5, %xmm5
- movsd 2 * SIZE(AO), %xmm5
- xorps %xmm6, %xmm6
- xorps %xmm7, %xmm7
-
- movsd 0 * SIZE(BO), %xmm1
- xorps %xmm8, %xmm8
- xorps %xmm9, %xmm9
- movsd 1 * SIZE(BO), %xmm3
- xorps %xmm10, %xmm10
- xorps %xmm11, %xmm11
-
- prefetcht0 3 * SIZE(CO1)
- xorps %xmm12, %xmm12
- xorps %xmm13, %xmm13
- prefetcht0 3 * SIZE(CO2)
- xorps %xmm14, %xmm14
- xorps %xmm15, %xmm15
-
- #if defined(LT) || defined(RN)
- movq KK, %rax
- #else
- movq K, %rax
- subq KK, %rax
- #endif
- sarq $2, %rax
- je .L15
- ALIGN_4
-
- .L12:
- addsd %xmm2, %xmm13
- PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
- movaps %xmm0, %xmm2
- mulsd %xmm1, %xmm0
-
- addsd %xmm7, %xmm14
- movsd 3 * SIZE(AO), %xmm7
- mulsd %xmm3, %xmm2
-
- addsd %xmm6, %xmm15
- PREFETCH (PREFETCHSIZE + 0) * SIZE(BO)
- movaps %xmm4, %xmm6
- mulsd %xmm1, %xmm4
-
- addsd %xmm0, %xmm8
- movsd 4 * SIZE(AO), %xmm0
- mulsd %xmm3, %xmm6
-
- addsd %xmm2, %xmm9
- movaps %xmm5, %xmm2
- mulsd %xmm1, %xmm5
-
- addsd %xmm4, %xmm10
- movsd 5 * SIZE(AO), %xmm4
- mulsd %xmm3, %xmm2
-
- addsd %xmm6, %xmm11
- movaps %xmm7, %xmm6
- mulsd %xmm1, %xmm7
- movsd 2 * SIZE(BO), %xmm1
-
- addsd %xmm5, %xmm12
- movsd 6 * SIZE(AO), %xmm5
- mulsd %xmm3, %xmm6
- movsd 3 * SIZE(BO), %xmm3
-
- addsd %xmm2, %xmm13
- movaps %xmm0, %xmm2
- mulsd %xmm1, %xmm0
-
- addsd %xmm7, %xmm14
- movsd 7 * SIZE(AO), %xmm7
- mulsd %xmm3, %xmm2
-
- addsd %xmm6, %xmm15
- movaps %xmm4, %xmm6
- mulsd %xmm1, %xmm4
-
- addsd %xmm0, %xmm8
- movsd 8 * SIZE(AO), %xmm0
- mulsd %xmm3, %xmm6
-
- addsd %xmm2, %xmm9
- movaps %xmm5, %xmm2
- mulsd %xmm1, %xmm5
-
- addsd %xmm4, %xmm10
- movsd 9 * SIZE(AO), %xmm4
- mulsd %xmm3, %xmm2
-
- addsd %xmm6, %xmm11
- movaps %xmm7, %xmm6
- mulsd %xmm1, %xmm7
- movsd 4 * SIZE(BO), %xmm1
-
- addsd %xmm5, %xmm12
- movsd 10 * SIZE(AO), %xmm5
- mulsd %xmm3, %xmm6
- movsd 5 * SIZE(BO), %xmm3
-
- addsd %xmm2, %xmm13
- PREFETCH (PREFETCHSIZE + 8) * SIZE(AO)
- movaps %xmm0, %xmm2
- mulsd %xmm1, %xmm0
-
- addsd %xmm7, %xmm14
- movsd 11 * SIZE(AO), %xmm7
- mulsd %xmm3, %xmm2
-
- addsd %xmm6, %xmm15
- movaps %xmm4, %xmm6
- mulsd %xmm1, %xmm4
-
- addsd %xmm0, %xmm8
- movsd 12 * SIZE(AO), %xmm0
- mulsd %xmm3, %xmm6
-
- addsd %xmm2, %xmm9
- movaps %xmm5, %xmm2
- mulsd %xmm1, %xmm5
-
- addsd %xmm4, %xmm10
- movsd 13 * SIZE(AO), %xmm4
- mulsd %xmm3, %xmm2
-
- addsd %xmm6, %xmm11
- movaps %xmm7, %xmm6
- mulsd %xmm1, %xmm7
- movsd 6 * SIZE(BO), %xmm1
-
- addsd %xmm5, %xmm12
- movsd 14 * SIZE(AO), %xmm5
- mulsd %xmm3, %xmm6
- movsd 7 * SIZE(BO), %xmm3
-
- addsd %xmm2, %xmm13
- movaps %xmm0, %xmm2
- mulsd %xmm1, %xmm0
-
- addsd %xmm7, %xmm14
- movsd 15 * SIZE(AO), %xmm7
- mulsd %xmm3, %xmm2
- subq $-16 * SIZE, AO
-
- addsd %xmm6, %xmm15
- movaps %xmm4, %xmm6
- mulsd %xmm1, %xmm4
-
- addsd %xmm0, %xmm8
- movsd 0 * SIZE(AO), %xmm0
- mulsd %xmm3, %xmm6
-
- addsd %xmm2, %xmm9
- movaps %xmm5, %xmm2
- mulsd %xmm1, %xmm5
- addq $ 8 * SIZE, BO
-
- addsd %xmm4, %xmm10
- movsd 1 * SIZE(AO), %xmm4
- mulsd %xmm3, %xmm2
- decq %rax
-
- addsd %xmm6, %xmm11
- movaps %xmm7, %xmm6
- mulsd %xmm1, %xmm7
- movsd 0 * SIZE(BO), %xmm1
-
- addsd %xmm5, %xmm12
- movsd 2 * SIZE(AO), %xmm5
- mulsd %xmm3, %xmm6
- movsd 1 * SIZE(BO), %xmm3
-
- jne .L12
- ALIGN_4
-
- .L15:
- #if defined(LT) || defined(RN)
- movq KK, %rax
- #else
- movq K, %rax
- subq KK, %rax
- #endif
- andq $3, %rax
- BRANCH
- je .L19
- ALIGN_4
-
- .L16:
- addsd %xmm2, %xmm13
- movaps %xmm0, %xmm2
- mulsd %xmm1, %xmm0
-
- addsd %xmm7, %xmm14
- movsd 3 * SIZE(AO), %xmm7
- mulsd %xmm3, %xmm2
-
- addsd %xmm6, %xmm15
- movaps %xmm4, %xmm6
- mulsd %xmm1, %xmm4
-
- addsd %xmm0, %xmm8
- movsd 4 * SIZE(AO), %xmm0
- mulsd %xmm3, %xmm6
-
- addsd %xmm2, %xmm9
- movaps %xmm5, %xmm2
- mulsd %xmm1, %xmm5
-
- addsd %xmm4, %xmm10
- movsd 5 * SIZE(AO), %xmm4
- mulsd %xmm3, %xmm2
-
- addsd %xmm6, %xmm11
- movaps %xmm7, %xmm6
- mulsd %xmm1, %xmm7
- movsd 2 * SIZE(BO), %xmm1
-
- addsd %xmm5, %xmm12
- movsd 6 * SIZE(AO), %xmm5
- mulsd %xmm3, %xmm6
- movsd 3 * SIZE(BO), %xmm3
-
- addq $4 * SIZE, AO
- addq $2 * SIZE, BO
- decq %rax
- BRANCH
- jg .L16
- ALIGN_4
-
- .L19:
- addsd %xmm2, %xmm13
- addsd %xmm7, %xmm14
- addsd %xmm6, %xmm15
-
- #if defined(LN) || defined(RT)
- movq KK, %rax
- #ifdef LN
- subq $4, %rax
- #else
- subq $2, %rax
- #endif
-
- leaq (, %rax, SIZE), %rax
-
- movq AORIG, AO
- leaq (AO, %rax, 4), AO
- leaq (B, %rax, 2), BO
- #endif
-
- #if defined(LN) || defined(LT)
- movsd 0 * SIZE(BO), %xmm0
- movsd 1 * SIZE(BO), %xmm1
- movsd 2 * SIZE(BO), %xmm2
- movsd 3 * SIZE(BO), %xmm3
- movsd 4 * SIZE(BO), %xmm4
- movsd 5 * SIZE(BO), %xmm5
- movsd 6 * SIZE(BO), %xmm6
- movsd 7 * SIZE(BO), %xmm7
-
- subsd %xmm8, %xmm0
- subsd %xmm9, %xmm1
- subsd %xmm10, %xmm2
- subsd %xmm11, %xmm3
- subsd %xmm12, %xmm4
- subsd %xmm13, %xmm5
- subsd %xmm14, %xmm6
- subsd %xmm15, %xmm7
- #else
- movsd 0 * SIZE(AO), %xmm0
- movsd 1 * SIZE(AO), %xmm2
- movsd 2 * SIZE(AO), %xmm4
- movsd 3 * SIZE(AO), %xmm6
-
- movsd 4 * SIZE(AO), %xmm1
- movsd 5 * SIZE(AO), %xmm3
- movsd 6 * SIZE(AO), %xmm5
- movsd 7 * SIZE(AO), %xmm7
-
- subsd %xmm8, %xmm0
- subsd %xmm10, %xmm2
- subsd %xmm12, %xmm4
- subsd %xmm14, %xmm6
- subsd %xmm9, %xmm1
- subsd %xmm11, %xmm3
- subsd %xmm13, %xmm5
- subsd %xmm15, %xmm7
- #endif
-
- #ifdef LN
- movsd 15 * SIZE(AO), %xmm8
- mulsd %xmm8, %xmm6
- movsd 14 * SIZE(AO), %xmm9
- mulsd %xmm8, %xmm7
- movsd 13 * SIZE(AO), %xmm11
-
- movaps %xmm9, %xmm10
- movsd 12 * SIZE(AO), %xmm13
- mulsd %xmm6, %xmm9
- movsd 10 * SIZE(AO), %xmm8
- mulsd %xmm7, %xmm10
- subsd %xmm9, %xmm4
- movsd 9 * SIZE(AO), %xmm9
- subsd %xmm10, %xmm5
-
- movaps %xmm11, %xmm12
- mulsd %xmm6, %xmm11
- mulsd %xmm7, %xmm12
- subsd %xmm11, %xmm2
- movsd 8 * SIZE(AO), %xmm11
- subsd %xmm12, %xmm3
-
- movaps %xmm13, %xmm14
- mulsd %xmm6, %xmm13
- mulsd %xmm7, %xmm14
- subsd %xmm13, %xmm0
- subsd %xmm14, %xmm1
-
- mulsd %xmm8, %xmm4
- mulsd %xmm8, %xmm5
- movsd 5 * SIZE(AO), %xmm8
-
- movaps %xmm9, %xmm10
- mulsd %xmm4, %xmm9
- mulsd %xmm5, %xmm10
- subsd %xmm9, %xmm2
- movsd 4 * SIZE(AO), %xmm9
- subsd %xmm10, %xmm3
-
- movaps %xmm11, %xmm12
- mulsd %xmm4, %xmm11
- mulsd %xmm5, %xmm12
- subsd %xmm11, %xmm0
- movsd 0 * SIZE(AO), %xmm11
- subsd %xmm12, %xmm1
-
- mulsd %xmm8, %xmm2
- mulsd %xmm8, %xmm3
-
- movaps %xmm9, %xmm10
- mulsd %xmm2, %xmm9
- mulsd %xmm3, %xmm10
- subsd %xmm9, %xmm0
- subsd %xmm10, %xmm1
-
- mulsd %xmm11, %xmm0
- mulsd %xmm11, %xmm1
- #endif
-
- #ifdef LT
- movsd 0 * SIZE(AO), %xmm8
- mulsd %xmm8, %xmm0
- movsd 1 * SIZE(AO), %xmm9
- mulsd %xmm8, %xmm1
-
- movsd 2 * SIZE(AO), %xmm11
- movaps %xmm9, %xmm10
- movsd 3 * SIZE(AO), %xmm13
- mulsd %xmm0, %xmm9
- movsd 5 * SIZE(AO), %xmm8
- mulsd %xmm1, %xmm10
- subsd %xmm9, %xmm2
- movsd 6 * SIZE(AO), %xmm9
- subsd %xmm10, %xmm3
-
- movaps %xmm11, %xmm12
- mulsd %xmm0, %xmm11
- mulsd %xmm1, %xmm12
- subsd %xmm11, %xmm4
- movsd 7 * SIZE(AO), %xmm11
- subsd %xmm12, %xmm5
-
- movaps %xmm13, %xmm14
- mulsd %xmm0, %xmm13
- mulsd %xmm1, %xmm14
- subsd %xmm13, %xmm6
- subsd %xmm14, %xmm7
-
- mulsd %xmm8, %xmm2
- mulsd %xmm8, %xmm3
- movsd 10 * SIZE(AO), %xmm8
-
- movaps %xmm9, %xmm10
- mulsd %xmm2, %xmm9
- mulsd %xmm3, %xmm10
- subsd %xmm9, %xmm4
- movsd 11 * SIZE(AO), %xmm9
- subsd %xmm10, %xmm5
-
- movaps %xmm11, %xmm12
- mulsd %xmm2, %xmm11
- mulsd %xmm3, %xmm12
- subsd %xmm11, %xmm6
- subsd %xmm12, %xmm7
-
- mulsd %xmm8, %xmm4
- mulsd %xmm8, %xmm5
- movsd 15 * SIZE(AO), %xmm8
-
- movaps %xmm9, %xmm10
- mulsd %xmm4, %xmm9
- mulsd %xmm5, %xmm10
- subsd %xmm9, %xmm6
- subsd %xmm10, %xmm7
-
- mulsd %xmm8, %xmm6
- mulsd %xmm8, %xmm7
- #endif
-
- #ifdef RN
- movsd 0 * SIZE(BO), %xmm8
- mulsd %xmm8, %xmm0
- movsd 1 * SIZE(BO), %xmm9
- mulsd %xmm8, %xmm2
- movsd 3 * SIZE(BO), %xmm13
- mulsd %xmm8, %xmm4
- mulsd %xmm8, %xmm6
-
- movaps %xmm9, %xmm10
- movaps %xmm9, %xmm11
- movaps %xmm9, %xmm12
-
- mulsd %xmm0, %xmm9
- mulsd %xmm2, %xmm10
- mulsd %xmm4, %xmm11
- mulsd %xmm6, %xmm12
-
- subsd %xmm9, %xmm1
- subsd %xmm10, %xmm3
- subsd %xmm11, %xmm5
- subsd %xmm12, %xmm7
-
- mulsd %xmm13, %xmm1
- mulsd %xmm13, %xmm3
- mulsd %xmm13, %xmm5
- mulsd %xmm13, %xmm7
- #endif
-
- #ifdef RT
- movsd 3 * SIZE(BO), %xmm8
- mulsd %xmm8, %xmm1
- movsd 2 * SIZE(BO), %xmm9
- mulsd %xmm8, %xmm3
- movsd 0 * SIZE(BO), %xmm13
- mulsd %xmm8, %xmm5
- mulsd %xmm8, %xmm7
-
- movaps %xmm9, %xmm10
- movaps %xmm9, %xmm11
- movaps %xmm9, %xmm12
-
- mulsd %xmm1, %xmm9
- mulsd %xmm3, %xmm10
- mulsd %xmm5, %xmm11
- mulsd %xmm7, %xmm12
-
- subsd %xmm9, %xmm0
- subsd %xmm10, %xmm2
- subsd %xmm11, %xmm4
- subsd %xmm12, %xmm6
-
- mulsd %xmm13, %xmm0
- mulsd %xmm13, %xmm2
- mulsd %xmm13, %xmm4
- mulsd %xmm13, %xmm6
- #endif
-
- #ifdef LN
- subq $4 * SIZE, CO1
- subq $4 * SIZE, CO2
- #endif
-
- movsd %xmm0, 0 * SIZE(CO1)
- movsd %xmm2, 1 * SIZE(CO1)
- movsd %xmm4, 2 * SIZE(CO1)
- movsd %xmm6, 3 * SIZE(CO1)
-
- movsd %xmm1, 0 * SIZE(CO2)
- movsd %xmm3, 1 * SIZE(CO2)
- movsd %xmm5, 2 * SIZE(CO2)
- movsd %xmm7, 3 * SIZE(CO2)
-
- #if defined(LN) || defined(LT)
- movsd %xmm0, 0 * SIZE(BO)
- movsd %xmm1, 1 * SIZE(BO)
- movsd %xmm2, 2 * SIZE(BO)
- movsd %xmm3, 3 * SIZE(BO)
- movsd %xmm4, 4 * SIZE(BO)
- movsd %xmm5, 5 * SIZE(BO)
- movsd %xmm6, 6 * SIZE(BO)
- movsd %xmm7, 7 * SIZE(BO)
- #else
- movsd %xmm0, 0 * SIZE(AO)
- movsd %xmm2, 1 * SIZE(AO)
- movsd %xmm4, 2 * SIZE(AO)
- movsd %xmm6, 3 * SIZE(AO)
- movsd %xmm1, 4 * SIZE(AO)
- movsd %xmm3, 5 * SIZE(AO)
- movsd %xmm5, 6 * SIZE(AO)
- movsd %xmm7, 7 * SIZE(AO)
- #endif
-
- #ifndef LN
- addq $4 * SIZE, CO1
- addq $4 * SIZE, CO2
- #endif
-
- #if defined(LT) || defined(RN)
- movq K, %rax
- subq KK, %rax
- leaq (,%rax, SIZE), %rax
- leaq (AO, %rax, 4), AO
- leaq (BO, %rax, 2), BO
- #endif
-
- #ifdef LN
- subq $4, KK
- #endif
-
- #ifdef LT
- addq $4, KK
- #endif
-
- #ifdef RT
- movq K, %rax
- salq $2 + BASE_SHIFT, %rax
- addq %rax, AORIG
- #endif
-
- decq I # i --
- jg .L11
- ALIGN_4
-
- .L39:
- #ifdef LN
- leaq (, K, SIZE), %rax
- leaq (B, %rax, 2), B
- #endif
- #if defined(LT) || defined(RN)
- movq BO, B
- #endif
-
- #ifdef RN
- addq $2, KK
- #endif
-
- #ifdef RT
- subq $2, KK
- #endif
-
- decq J # j --
- jg .L10
- ALIGN_4
-
- .L40:
- testq $1, N
- je .L999
- ALIGN_4
-
- #if defined(LT) || defined(RN)
- movq A, AO
- #else
- movq A, AORIG
- #endif
-
- #ifdef RT
- movq K, %rax
- salq $0 + BASE_SHIFT, %rax
- subq %rax, B
-
- subq LDC, C
- #endif
-
- movq C, CO1
- #ifndef RT
- addq LDC, C
- #endif
-
- #ifdef LN
- movq OFFSET, %rax
- addq M, %rax
- movq %rax, KK
- #endif
-
- #ifdef LT
- movq OFFSET, %rax
- movq %rax, KK
- #endif
-
- testq $1, M
- je .L50
-
- #ifdef LN
- movq K, %rax
- salq $0 + BASE_SHIFT, %rax
- subq %rax, AORIG
- #endif
-
- #if defined(LN) || defined(RT)
- movq KK, %rax
- leaq (, %rax, SIZE), %rax
- movq AORIG, AO
- leaq (AO, %rax, 1), AO
- leaq (B, %rax, 1), BO
- #else
- movq B, BO
- #endif
-
- movsd 0 * SIZE(AO), %xmm0
- xorps %xmm5, %xmm5
- movsd 1 * SIZE(AO), %xmm2
- xorps %xmm7, %xmm7
-
- movsd 0 * SIZE(BO), %xmm1
- xorps %xmm8, %xmm8
- movsd 1 * SIZE(BO), %xmm3
- xorps %xmm9, %xmm9
- movsd 2 * SIZE(AO), %xmm4
- movsd 3 * SIZE(AO), %xmm6
-
- #if defined(LT) || defined(RN)
- movq KK, %rax
- #else
- movq K, %rax
- subq KK, %rax
- #endif
- sarq $2, %rax
- je .L65
- ALIGN_4
-
- .L62:
- addsd %xmm5, %xmm8
- movsd 2 * SIZE(BO), %xmm5
- mulsd %xmm0, %xmm1
- movsd 4 * SIZE(AO), %xmm0
-
- addsd %xmm7, %xmm9
- movsd 3 * SIZE(BO), %xmm7
- mulsd %xmm2, %xmm3
- movsd 5 * SIZE(AO), %xmm2
-
- addsd %xmm1, %xmm8
- movsd 4 * SIZE(BO), %xmm1
- mulsd %xmm4, %xmm5
- movsd 6 * SIZE(AO), %xmm4
-
- addsd %xmm3, %xmm9
- movsd 5 * SIZE(BO), %xmm3
- mulsd %xmm6, %xmm7
- movsd 7 * SIZE(AO), %xmm6
-
- addq $4 * SIZE, AO
- addq $4 * SIZE, BO
-
- decq %rax
- jne .L62
-
- addsd %xmm5, %xmm8
- addsd %xmm7, %xmm9
- ALIGN_4
-
- .L65:
- #if defined(LT) || defined(RN)
- movq KK, %rax
- #else
- movq K, %rax
- subq KK, %rax
- #endif
- andq $3, %rax
- BRANCH
- je .L68
- ALIGN_4
-
- .L66:
- movsd 0 * SIZE(AO), %xmm0
- movsd 0 * SIZE(BO), %xmm1
-
- mulsd %xmm0, %xmm1
- addsd %xmm1, %xmm8
-
- addq $1 * SIZE, AO
- addq $1 * SIZE, BO
-
- decq %rax
- BRANCH
- jg .L66
- ALIGN_4
-
- .L68:
- addsd %xmm9, %xmm8
-
- #if defined(LN) || defined(RT)
- movq KK, %rax
- #ifdef LN
- subq $1, %rax
- #else
- subq $1, %rax
- #endif
- leaq (, %rax, SIZE), %rax
-
- movq AORIG, AO
- leaq (AO, %rax, 1), AO
- leaq (B, %rax, 1), BO
- #endif
-
- #if defined(LN) || defined(LT)
- movsd 0 * SIZE(BO), %xmm0
- subsd %xmm8, %xmm0
- #else
- movsd 0 * SIZE(AO), %xmm0
- subsd %xmm8, %xmm0
- #endif
-
- #if defined(LN) || defined(LT)
- movsd 0 * SIZE(AO), %xmm8
- mulsd %xmm8, %xmm0
- #endif
-
- #if defined(RN) || defined(RT)
- movsd 0 * SIZE(BO), %xmm8
- mulsd %xmm8, %xmm0
- #endif
-
- #ifdef LN
- subq $1 * SIZE, CO1
- #endif
-
- movsd %xmm0, 0 * SIZE(CO1)
-
- #if defined(LN) || defined(LT)
- movsd %xmm0, 0 * SIZE(BO)
- #else
- movsd %xmm0, 0 * SIZE(AO)
- #endif
-
- #ifndef LN
- addq $1 * SIZE, CO1
- #endif
-
- #if defined(LT) || defined(RN)
- movq K, %rax
- subq KK, %rax
- leaq (,%rax, SIZE), %rax
- leaq (AO, %rax, 1), AO
- leaq (BO, %rax, 1), BO
- #endif
-
- #ifdef LN
- subq $1, KK
- #endif
-
- #ifdef LT
- addq $1, KK
- #endif
-
- #ifdef RT
- movq K, %rax
- salq $0 + BASE_SHIFT, %rax
- addq %rax, AORIG
- #endif
- ALIGN_4
-
- .L50:
- testq $2, M
- je .L60
-
- #ifdef LN
- movq K, %rax
- salq $1 + BASE_SHIFT, %rax
- subq %rax, AORIG
- #endif
-
- #if defined(LN) || defined(RT)
- movq KK, %rax
- leaq (, %rax, SIZE), %rax
- movq AORIG, AO
- leaq (AO, %rax, 2), AO
- leaq (B, %rax, 1), BO
- #else
- movq B, BO
- #endif
-
- movsd 0 * SIZE(AO), %xmm0
- xorps %xmm2, %xmm2
- movsd 1 * SIZE(AO), %xmm1
- xorps %xmm3, %xmm3
-
- movsd 0 * SIZE(BO), %xmm4
- xorps %xmm8, %xmm8
- movsd 1 * SIZE(BO), %xmm5
- xorps %xmm10, %xmm10
-
- #if defined(LT) || defined(RN)
- movq KK, %rax
- #else
- movq K, %rax
- subq KK, %rax
- #endif
- sarq $2, %rax
- je .L55
- ALIGN_4
-
- .L52:
- addsd %xmm2, %xmm8
- movsd 2 * SIZE(AO), %xmm2
- mulsd %xmm4, %xmm0
- PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
-
- addsd %xmm3, %xmm10
- movsd 3 * SIZE(AO), %xmm3
- mulsd %xmm4, %xmm1
- movsd 2 * SIZE(BO), %xmm4
-
- addsd %xmm0, %xmm8
- movsd 4 * SIZE(AO), %xmm0
- mulsd %xmm5, %xmm2
- addq $8 * SIZE, AO
-
- addsd %xmm1, %xmm10
- movsd -3 * SIZE(AO), %xmm1
- mulsd %xmm5, %xmm3
- movsd 3 * SIZE(BO), %xmm5
-
- addsd %xmm2, %xmm8
- movsd -2 * SIZE(AO), %xmm2
- mulsd %xmm4, %xmm0
- addq $4 * SIZE, BO
-
- addsd %xmm3, %xmm10
- movsd -1 * SIZE(AO), %xmm3
- mulsd %xmm4, %xmm1
- movsd 0 * SIZE(BO), %xmm4
-
- addsd %xmm0, %xmm8
- movsd 0 * SIZE(AO), %xmm0
- mulsd %xmm5, %xmm2
- decq %rax
-
- addsd %xmm1, %xmm10
- movsd 1 * SIZE(AO), %xmm1
- mulsd %xmm5, %xmm3
- movsd 1 * SIZE(BO), %xmm5
-
- jne .L52
- ALIGN_4
-
- .L55:
- #if defined(LT) || defined(RN)
- movq KK, %rax
- #else
- movq K, %rax
- subq KK, %rax
- #endif
- addsd %xmm2, %xmm8
- addsd %xmm3, %xmm10
-
- andq $3, %rax
- BRANCH
- je .L59
- ALIGN_4
-
- .L56:
- mulsd %xmm4, %xmm0
- mulsd %xmm4, %xmm1
- movsd 1 * SIZE(BO), %xmm4
-
- addsd %xmm0, %xmm8
- movsd 2 * SIZE(AO), %xmm0
- addsd %xmm1, %xmm10
- movsd 3 * SIZE(AO), %xmm1
-
- addq $2 * SIZE, AO
- addq $1 * SIZE, BO
- decq %rax
- BRANCH
- jg .L56
- ALIGN_4
-
- .L59:
- #if defined(LN) || defined(RT)
- movq KK, %rax
- #ifdef LN
- subq $2, %rax
- #else
- subq $1, %rax
- #endif
- leaq (, %rax, SIZE), %rax
-
- movq AORIG, AO
- leaq (AO, %rax, 2), AO
- leaq (B, %rax, 1), BO
- #endif
-
- #if defined(LN) || defined(LT)
- movsd 0 * SIZE(BO), %xmm0
- movsd 1 * SIZE(BO), %xmm2
-
- subsd %xmm8, %xmm0
- subsd %xmm10, %xmm2
- #else
- movsd 0 * SIZE(AO), %xmm0
- movsd 1 * SIZE(AO), %xmm2
-
- subsd %xmm8, %xmm0
- subsd %xmm10, %xmm2
- #endif
-
- #ifdef LN
- movsd 3 * SIZE(AO), %xmm8
- movsd 2 * SIZE(AO), %xmm9
- movsd 0 * SIZE(AO), %xmm11
- mulsd %xmm8, %xmm2
- mulsd %xmm2, %xmm9
- subsd %xmm9, %xmm0
- mulsd %xmm11,%xmm0
- #endif
-
- #ifdef LT
- movsd 0 * SIZE(AO), %xmm8
- movsd 1 * SIZE(AO), %xmm9
- movsd 3 * SIZE(AO), %xmm11
- mulsd %xmm8, %xmm0
- mulsd %xmm0, %xmm9
- subsd %xmm9, %xmm2
- mulsd %xmm11,%xmm2
- #endif
-
- #if defined(RN) || defined(RT)
- movsd 0 * SIZE(BO), %xmm8
- mulsd %xmm8, %xmm0
- mulsd %xmm8, %xmm2
- #endif
-
- #ifdef LN
- subq $2 * SIZE, CO1
- #endif
-
- movsd %xmm0, 0 * SIZE(CO1)
- movsd %xmm2, 1 * SIZE(CO1)
-
- #if defined(LN) || defined(LT)
- movsd %xmm0, 0 * SIZE(BO)
- movsd %xmm2, 1 * SIZE(BO)
- #else
- movsd %xmm0, 0 * SIZE(AO)
- movsd %xmm2, 1 * SIZE(AO)
- #endif
-
- #ifndef LN
- addq $2 * SIZE, CO1
- #endif
-
- #if defined(LT) || defined(RN)
- movq K, %rax
- subq KK, %rax
- leaq (,%rax, SIZE), %rax
- leaq (AO, %rax, 2), AO
- leaq (BO, %rax, 1), BO
- #endif
-
- #ifdef LN
- subq $2, KK
- #endif
-
- #ifdef LT
- addq $2, KK
- #endif
-
- #ifdef RT
- movq K, %rax
- salq $1 + BASE_SHIFT, %rax
- addq %rax, AORIG
- #endif
- ALIGN_4
-
- .L60:
- movq M, I
- sarq $2, I
- jle .L69
- ALIGN_4
-
- .L41:
- #ifdef LN
- movq K, %rax
- salq $2 + BASE_SHIFT, %rax
- subq %rax, AORIG
- #endif
-
- #if defined(LN) || defined(RT)
- movq KK, %rax
- leaq (, %rax, SIZE), %rax
- movq AORIG, AO
- leaq (AO, %rax, 4), AO
- leaq (B, %rax, 1), BO
- #else
- movq B, BO
- #endif
-
- movsd 0 * SIZE(AO), %xmm0
- xorps %xmm9, %xmm9
- movsd 1 * SIZE(AO), %xmm1
- xorps %xmm11, %xmm11
- movsd 2 * SIZE(AO), %xmm2
- xorps %xmm13, %xmm13
- movsd 3 * SIZE(AO), %xmm3
- xorps %xmm15, %xmm15
-
- movsd 0 * SIZE(BO), %xmm4
- xorps %xmm8, %xmm8
- movsd 1 * SIZE(BO), %xmm5
- xorps %xmm10, %xmm10
- prefetcht0 3 * SIZE(CO1)
- xorps %xmm12, %xmm12
- xorps %xmm14, %xmm14
-
- #if defined(LT) || defined(RN)
- movq KK, %rax
- #else
- movq K, %rax
- subq KK, %rax
- #endif
- sarq $2, %rax
- je .L45
- ALIGN_4
-
- .L42:
- addsd %xmm9, %xmm8
- movsd 4 * SIZE(AO), %xmm9
- mulsd %xmm4, %xmm0
- PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
-
- addsd %xmm11, %xmm10
- movsd 5 * SIZE(AO), %xmm11
- mulsd %xmm4, %xmm1
-
- addsd %xmm13, %xmm12
- movsd 6 * SIZE(AO), %xmm13
- mulsd %xmm4, %xmm2
-
- addsd %xmm15, %xmm14
- movsd 7 * SIZE(AO), %xmm15
- mulsd %xmm4, %xmm3
- movsd 2 * SIZE(BO), %xmm4
-
- addsd %xmm0, %xmm8
- movsd 8 * SIZE(AO), %xmm0
- mulsd %xmm5, %xmm9
-
- addsd %xmm1, %xmm10
- movsd 9 * SIZE(AO), %xmm1
- mulsd %xmm5, %xmm11
-
- addsd %xmm2, %xmm12
- movsd 10 * SIZE(AO), %xmm2
- mulsd %xmm5, %xmm13
-
- addsd %xmm3, %xmm14
- movsd 11 * SIZE(AO), %xmm3
- mulsd %xmm5, %xmm15
- movsd 3 * SIZE(BO), %xmm5
-
- addsd %xmm9, %xmm8
- movsd 12 * SIZE(AO), %xmm9
- mulsd %xmm4, %xmm0
- PREFETCH (PREFETCHSIZE + 8) * SIZE(AO)
-
- addsd %xmm11, %xmm10
- movsd 13 * SIZE(AO), %xmm11
- mulsd %xmm4, %xmm1
-
- addsd %xmm13, %xmm12
- movsd 14 * SIZE(AO), %xmm13
- mulsd %xmm4, %xmm2
-
- addsd %xmm15, %xmm14
- movsd 15 * SIZE(AO), %xmm15
- mulsd %xmm4, %xmm3
- movsd 4 * SIZE(BO), %xmm4
- subq $-16 * SIZE, AO
-
- addsd %xmm0, %xmm8
- movsd 0 * SIZE(AO), %xmm0
- mulsd %xmm5, %xmm9
-
- addsd %xmm1, %xmm10
- movsd 1 * SIZE(AO), %xmm1
- mulsd %xmm5, %xmm11
- addq $ 4 * SIZE, BO
-
- addsd %xmm2, %xmm12
- movsd 2 * SIZE(AO), %xmm2
- mulsd %xmm5, %xmm13
- decq %rax
-
- addsd %xmm3, %xmm14
- movsd 3 * SIZE(AO), %xmm3
- mulsd %xmm5, %xmm15
- movsd 1 * SIZE(BO), %xmm5
-
- jne .L42
- ALIGN_4
-
- .L45:
- #if defined(LT) || defined(RN)
- movq KK, %rax
- #else
- movq K, %rax
- subq KK, %rax
- #endif
-
- addsd %xmm9, %xmm8
- addsd %xmm11, %xmm10
- addsd %xmm13, %xmm12
- addsd %xmm15, %xmm14
-
- andq $3, %rax
- BRANCH
- BRANCH
- je .L49
- ALIGN_4
-
- .L46:
- mulsd %xmm4, %xmm0
- mulsd %xmm4, %xmm1
- mulsd %xmm4, %xmm2
- mulsd %xmm4, %xmm3
- movsd 1 * SIZE(BO), %xmm4
-
- addsd %xmm0, %xmm8
- movsd 4 * SIZE(AO), %xmm0
- addsd %xmm1, %xmm10
- movsd 5 * SIZE(AO), %xmm1
- addsd %xmm2, %xmm12
- movsd 6 * SIZE(AO), %xmm2
- addsd %xmm3, %xmm14
- movsd 7 * SIZE(AO), %xmm3
-
- addq $4 * SIZE, AO
- addq $1 * SIZE, BO
- decq %rax
- BRANCH
- jg .L46
- ALIGN_4
-
- .L49:
- #if defined(LN) || defined(RT)
- movq KK, %rax
- #ifdef LN
- subq $4, %rax
- #else
- subq $1, %rax
- #endif
- leaq (, %rax, SIZE), %rax
-
- movq AORIG, AO
- leaq (AO, %rax, 4), AO
- leaq (B, %rax, 1), BO
- #endif
-
- #if defined(LN) || defined(LT)
- movsd 0 * SIZE(BO), %xmm0
- movsd 1 * SIZE(BO), %xmm2
- movsd 2 * SIZE(BO), %xmm4
- movsd 3 * SIZE(BO), %xmm6
-
- subsd %xmm8, %xmm0
- subsd %xmm10, %xmm2
- subsd %xmm12, %xmm4
- subsd %xmm14, %xmm6
- #else
- movsd 0 * SIZE(AO), %xmm0
- movsd 1 * SIZE(AO), %xmm2
- movsd 2 * SIZE(AO), %xmm4
- movsd 3 * SIZE(AO), %xmm6
-
- subsd %xmm8, %xmm0
- subsd %xmm10, %xmm2
- subsd %xmm12, %xmm4
- subsd %xmm14, %xmm6
- #endif
-
- #ifdef LN
- movsd 15 * SIZE(AO), %xmm8
- mulsd %xmm8, %xmm6
- movsd 14 * SIZE(AO), %xmm9
- mulsd %xmm6, %xmm9
- movsd 13 * SIZE(AO), %xmm11
- subsd %xmm9, %xmm4
- movsd 12 * SIZE(AO), %xmm13
- mulsd %xmm6, %xmm11
- movsd 10 * SIZE(AO), %xmm8
- subsd %xmm11, %xmm2
- movsd 9 * SIZE(AO), %xmm9
- mulsd %xmm6, %xmm13
- movsd 8 * SIZE(AO), %xmm11
- subsd %xmm13, %xmm0
-
- mulsd %xmm8, %xmm4
- movsd 5 * SIZE(AO), %xmm8
- mulsd %xmm4, %xmm9
- subsd %xmm9, %xmm2
- movsd 4 * SIZE(AO), %xmm9
- mulsd %xmm4, %xmm11
- subsd %xmm11, %xmm0
- movsd 0 * SIZE(AO), %xmm11
- mulsd %xmm8, %xmm2
- mulsd %xmm2, %xmm9
- subsd %xmm9, %xmm0
- mulsd %xmm11, %xmm0
- #endif
-
- #ifdef LT
- movsd 0 * SIZE(AO), %xmm8
- mulsd %xmm8, %xmm0
- movsd 1 * SIZE(AO), %xmm9
- mulsd %xmm0, %xmm9
- movsd 2 * SIZE(AO), %xmm11
- subsd %xmm9, %xmm2
- movsd 3 * SIZE(AO), %xmm13
- mulsd %xmm0, %xmm11
- movsd 5 * SIZE(AO), %xmm8
- subsd %xmm11, %xmm4
- movsd 6 * SIZE(AO), %xmm9
- mulsd %xmm0, %xmm13
- movsd 7 * SIZE(AO), %xmm11
- subsd %xmm13, %xmm6
-
- mulsd %xmm8, %xmm2
- movsd 10 * SIZE(AO), %xmm8
- mulsd %xmm2, %xmm9
- subsd %xmm9, %xmm4
- movsd 11 * SIZE(AO), %xmm9
- mulsd %xmm2, %xmm11
- subsd %xmm11, %xmm6
- mulsd %xmm8, %xmm4
- movsd 15 * SIZE(AO), %xmm8
- mulsd %xmm4, %xmm9
- subsd %xmm9, %xmm6
- mulsd %xmm8, %xmm6
- #endif
-
- #if defined(RN) || defined(RT)
- movsd 0 * SIZE(BO), %xmm8
- mulsd %xmm8, %xmm0
- mulsd %xmm8, %xmm2
- mulsd %xmm8, %xmm4
- mulsd %xmm8, %xmm6
- #endif
-
- #ifdef LN
- subq $4 * SIZE, CO1
- #endif
-
- movsd %xmm0, 0 * SIZE(CO1)
- movsd %xmm2, 1 * SIZE(CO1)
- movsd %xmm4, 2 * SIZE(CO1)
- movsd %xmm6, 3 * SIZE(CO1)
-
- #if defined(LN) || defined(LT)
- movsd %xmm0, 0 * SIZE(BO)
- movsd %xmm2, 1 * SIZE(BO)
- movsd %xmm4, 2 * SIZE(BO)
- movsd %xmm6, 3 * SIZE(BO)
- #else
- movsd %xmm0, 0 * SIZE(AO)
- movsd %xmm2, 1 * SIZE(AO)
- movsd %xmm4, 2 * SIZE(AO)
- movsd %xmm6, 3 * SIZE(AO)
- #endif
-
- #ifndef LN
- addq $4 * SIZE, CO1
- #endif
-
- #if defined(LT) || defined(RN)
- movq K, %rax
- subq KK, %rax
- leaq (,%rax, SIZE), %rax
- leaq (AO, %rax, 4), AO
- leaq (BO, %rax, 1), BO
- #endif
-
- #ifdef LN
- subq $4, KK
- #endif
-
- #ifdef LT
- addq $4, KK
- #endif
-
- #ifdef RT
- movq K, %rax
- salq $2 + BASE_SHIFT, %rax
- addq %rax, AORIG
- #endif
-
- decq I # i --
- jg .L41
- ALIGN_4
-
- .L69:
- #ifdef LN
- leaq (, K, SIZE), %rax
- leaq (B, %rax, 1), B
- #endif
-
- #if defined(LT) || defined(RN)
- movq BO, B
- #endif
-
- #ifdef RN
- addq $1, KK
- #endif
-
- #ifdef RT
- subq $1, KK
- #endif
- ALIGN_2
-
- .L999:
- movq 0(%rsp), %rbx
- movq 8(%rsp), %rbp
- movq 16(%rsp), %r12
- movq 24(%rsp), %r13
- movq 32(%rsp), %r14
- movq 40(%rsp), %r15
-
- #ifdef WINDOWS_ABI
- movq 48(%rsp), %rdi
- movq 56(%rsp), %rsi
- movups 64(%rsp), %xmm6
- movups 80(%rsp), %xmm7
- movups 96(%rsp), %xmm8
- movups 112(%rsp), %xmm9
- movups 128(%rsp), %xmm10
- movups 144(%rsp), %xmm11
- movups 160(%rsp), %xmm12
- movups 176(%rsp), %xmm13
- movups 192(%rsp), %xmm14
- movups 208(%rsp), %xmm15
- #endif
-
- addq $STACKSIZE, %rsp
- ret
-
- EPILOGUE
|