You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

trsm_kernel_LN_4x8_nehalem.S 88 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847
  1. /*********************************************************************/
  2. /* Copyright 2009, 2010 The University of Texas at Austin. */
  3. /* All rights reserved. */
  4. /* */
  5. /* Redistribution and use in source and binary forms, with or */
  6. /* without modification, are permitted provided that the following */
  7. /* conditions are met: */
  8. /* */
  9. /* 1. Redistributions of source code must retain the above */
  10. /* copyright notice, this list of conditions and the following */
  11. /* disclaimer. */
  12. /* */
  13. /* 2. Redistributions in binary form must reproduce the above */
  14. /* copyright notice, this list of conditions and the following */
  15. /* disclaimer in the documentation and/or other materials */
  16. /* provided with the distribution. */
  17. /* */
  18. /* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */
  19. /* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */
  20. /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
  21. /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
  22. /* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */
  23. /* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */
  24. /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
  25. /* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */
  26. /* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */
  27. /* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
  28. /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
  29. /* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */
  30. /* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
  31. /* POSSIBILITY OF SUCH DAMAGE. */
  32. /* */
  33. /* The views and conclusions contained in the software and */
  34. /* documentation are those of the authors and should not be */
  35. /* interpreted as representing official policies, either expressed */
  36. /* or implied, of The University of Texas at Austin. */
  37. /*********************************************************************/
  38. #define ASSEMBLER
  39. #include "common.h"
  40. #define OLD_M %rdi
  41. #define OLD_N %rsi
  42. #define OLD_K %rdx
  43. #define M %r13
  44. #define N %r14
  45. #define K %r15
  46. #define A %rcx
  47. #define B %r8
  48. #define C %r9
  49. #define LDC %r10
  50. #define I %r11
  51. #define AO %rdi
  52. #define BO %rsi
  53. #define CO1 %rbx
  54. #define CO2 %rbp
  55. #define KK %rdx
  56. #define BB %r12
  57. #ifndef WINDOWS_ABI
  58. #define STACKSIZE 64
  59. #define OLD_LDC 8 + STACKSIZE(%rsp)
  60. #define OLD_OFFSET 16 + STACKSIZE(%rsp)
  61. #define OFFSET 48(%rsp)
  62. #define J 56(%rsp)
  63. #define KKK 64(%rsp)
  64. #define AORIG 72(%rsp)
  65. #else
  66. #define STACKSIZE 256
  67. #define OLD_A 40 + STACKSIZE(%rsp)
  68. #define OLD_B 48 + STACKSIZE(%rsp)
  69. #define OLD_C 56 + STACKSIZE(%rsp)
  70. #define OLD_LDC 64 + STACKSIZE(%rsp)
  71. #define OLD_OFFSET 72 + STACKSIZE(%rsp)
  72. #define OFFSET 224(%rsp)
  73. #define J 232(%rsp)
  74. #define KKK 240(%rsp)
  75. #define AORIG 248(%rsp)
  76. #endif
  77. #define PREFETCHSIZE (16 * 1 + 4)
  78. #define PREFETCH prefetcht0
  79. PROLOGUE
  80. PROFCODE
  81. subq $STACKSIZE, %rsp
  82. movq %rbx, 0(%rsp)
  83. movq %rbp, 8(%rsp)
  84. movq %r12, 16(%rsp)
  85. movq %r13, 24(%rsp)
  86. movq %r14, 32(%rsp)
  87. movq %r15, 40(%rsp)
  88. #ifdef WINDOWS_ABI
  89. movq %rdi, 48(%rsp)
  90. movq %rsi, 56(%rsp)
  91. movups %xmm6, 64(%rsp)
  92. movups %xmm7, 80(%rsp)
  93. movups %xmm8, 96(%rsp)
  94. movups %xmm9, 112(%rsp)
  95. movups %xmm10, 128(%rsp)
  96. movups %xmm11, 144(%rsp)
  97. movups %xmm12, 160(%rsp)
  98. movups %xmm13, 176(%rsp)
  99. movups %xmm14, 192(%rsp)
  100. movups %xmm15, 208(%rsp)
  101. movq ARG1, OLD_M
  102. movq ARG2, OLD_N
  103. movq ARG3, OLD_K
  104. movq OLD_A, A
  105. movq OLD_B, B
  106. movq OLD_C, C
  107. #endif
  108. subq $-32 * SIZE, A
  109. subq $-32 * SIZE, B
  110. movq OLD_M, M
  111. movq OLD_N, N
  112. movq OLD_K, K
  113. movq OLD_LDC, LDC
  114. movq OLD_OFFSET, KK
  115. leaq (, LDC, SIZE), LDC
  116. movq KK, OFFSET
  117. negq KK
  118. #ifdef LN
  119. leaq (, M, SIZE), %rax
  120. addq %rax, C
  121. imulq K, %rax
  122. addq %rax, A
  123. #endif
  124. #ifdef RT
  125. leaq (, N, SIZE), %rax
  126. imulq K, %rax
  127. addq %rax, B
  128. movq N, %rax
  129. imulq LDC, %rax
  130. addq %rax, C
  131. #endif
  132. #ifdef RT
  133. movq N, %rax
  134. subq OFFSET, %rax
  135. movq %rax, KK
  136. #endif
  137. movq N, J
  138. sarq $3, J
  139. NOBRANCH
  140. jle .L40
  141. ALIGN_4
  142. .L10:
  143. #if defined(LT) || defined(RN)
  144. movq A, AO
  145. #else
  146. movq A, AORIG
  147. #endif
  148. #ifdef RT
  149. movq K, %rax
  150. salq $3 + BASE_SHIFT, %rax
  151. subq %rax, B
  152. leaq (, LDC, 8), %rax
  153. subq %rax, C
  154. #endif
  155. movq C, CO1
  156. leaq (C, LDC, 4), CO2
  157. #ifndef RT
  158. leaq (C, LDC, 8), C
  159. #endif
  160. #ifdef LN
  161. movq OFFSET, %rax
  162. addq M, %rax
  163. movq %rax, KK
  164. #endif
  165. #ifdef LT
  166. movq OFFSET, %rax
  167. movq %rax, KK
  168. #endif
  169. movq K, %rax
  170. salq $BASE_SHIFT + 3, %rax
  171. leaq (B, %rax), BB
  172. testq $1, M
  173. BRANCH
  174. jle .L20
  175. #ifdef LN
  176. movq K, %rax
  177. salq $BASE_SHIFT, %rax
  178. subq %rax, AORIG
  179. #endif
  180. #if defined(LN) || defined(RT)
  181. movq KK, %rax
  182. leaq (, %rax, SIZE), %rax
  183. movq AORIG, AO
  184. leaq (AO, %rax, 1), AO
  185. leaq (B, %rax, 8), BO
  186. #else
  187. movq B, BO
  188. #endif
  189. xorps %xmm2, %xmm2
  190. movsd -32 * SIZE(AO), %xmm0
  191. xorps %xmm3, %xmm3
  192. xorps %xmm8, %xmm8
  193. xorps %xmm12, %xmm12
  194. #if defined(LT) || defined(RN)
  195. movq KK, %rax
  196. #else
  197. movq K, %rax
  198. subq KK, %rax
  199. #endif
  200. sarq $2, %rax
  201. NOBRANCH
  202. jle .L35
  203. ALIGN_3
  204. .L32:
  205. pshufd $0x00, %xmm0, %xmm1
  206. addps %xmm2, %xmm8
  207. movaps -32 * SIZE(BO), %xmm2
  208. mulps %xmm1, %xmm2
  209. addps %xmm3, %xmm12
  210. movaps -28 * SIZE(BO), %xmm3
  211. mulps %xmm1, %xmm3
  212. pshufd $0x55, %xmm0, %xmm1
  213. movsd -30 * SIZE(AO), %xmm0
  214. addps %xmm2, %xmm8
  215. movaps -24 * SIZE(BO), %xmm2
  216. mulps %xmm1, %xmm2
  217. addps %xmm3, %xmm12
  218. movaps -20 * SIZE(BO), %xmm3
  219. mulps %xmm1, %xmm3
  220. pshufd $0x00, %xmm0, %xmm1
  221. addps %xmm2, %xmm8
  222. movaps -16 * SIZE(BO), %xmm2
  223. mulps %xmm1, %xmm2
  224. addps %xmm3, %xmm12
  225. movaps -12 * SIZE(BO), %xmm3
  226. mulps %xmm1, %xmm3
  227. pshufd $0x55, %xmm0, %xmm1
  228. movsd -28 * SIZE(AO), %xmm0
  229. addps %xmm2, %xmm8
  230. movaps -8 * SIZE(BO), %xmm2
  231. mulps %xmm1, %xmm2
  232. addps %xmm3, %xmm12
  233. movaps -4 * SIZE(BO), %xmm3
  234. mulps %xmm1, %xmm3
  235. subq $-32 * SIZE, BO
  236. subq $ -4 * SIZE, AO
  237. subq $1, %rax
  238. BRANCH
  239. jg .L32
  240. ALIGN_3
  241. .L35:
  242. #if defined(LT) || defined(RN)
  243. movq KK, %rax
  244. #else
  245. movq K, %rax
  246. subq KK, %rax
  247. #endif
  248. andq $3, %rax # if (k & 1)
  249. BRANCH
  250. je .L38
  251. ALIGN_3
  252. .L36:
  253. pshufd $0x00, %xmm0, %xmm1
  254. movss -31 * SIZE(AO), %xmm0
  255. addps %xmm2, %xmm8
  256. movaps -32 * SIZE(BO), %xmm2
  257. mulps %xmm1, %xmm2
  258. addps %xmm3, %xmm12
  259. movaps -28 * SIZE(BO), %xmm3
  260. mulps %xmm1, %xmm3
  261. addq $1 * SIZE, AO
  262. addq $8 * SIZE, BO
  263. subq $1, %rax
  264. BRANCH
  265. jg .L36
  266. ALIGN_3
  267. .L38:
  268. #if defined(LN) || defined(RT)
  269. movq KK, %rax
  270. #ifdef LN
  271. subq $1, %rax
  272. #else
  273. subq $8, %rax
  274. #endif
  275. leaq (, %rax, SIZE), %rax
  276. movq AORIG, AO
  277. leaq (AO, %rax, 1), AO
  278. leaq (B, %rax, 8), BO
  279. #endif
  280. addps %xmm2, %xmm8
  281. addps %xmm3, %xmm12
  282. #if defined(LN) || defined(LT)
  283. movaps -32 * SIZE(BO), %xmm0
  284. movaps -28 * SIZE(BO), %xmm4
  285. subps %xmm8, %xmm0
  286. subps %xmm12, %xmm4
  287. #else
  288. movsd -32 * SIZE(AO), %xmm0
  289. movhps -30 * SIZE(AO), %xmm0
  290. movsd -28 * SIZE(AO), %xmm4
  291. movhps -26 * SIZE(AO), %xmm4
  292. subps %xmm8, %xmm0
  293. subps %xmm12, %xmm4
  294. pshufd $0xff, %xmm0, %xmm3
  295. pshufd $0xaa, %xmm0, %xmm2
  296. pshufd $0x55, %xmm0, %xmm1
  297. pshufd $0x00, %xmm0, %xmm0
  298. pshufd $0xff, %xmm4, %xmm7
  299. pshufd $0xaa, %xmm4, %xmm6
  300. pshufd $0x55, %xmm4, %xmm5
  301. pshufd $0x00, %xmm4, %xmm4
  302. #endif
  303. #if defined(LN) || defined(LT)
  304. movaps -32 * SIZE(AO), %xmm8
  305. pshufd $0x00, %xmm8, %xmm15
  306. mulps %xmm15, %xmm0
  307. mulps %xmm15, %xmm4
  308. #endif
  309. #ifdef RN
  310. movaps -32 * SIZE(BO), %xmm8
  311. pshufd $0x00, %xmm8, %xmm15
  312. mulss %xmm15, %xmm0
  313. pshufd $0x55, %xmm8, %xmm15
  314. mulss %xmm0, %xmm15
  315. subss %xmm15, %xmm1
  316. pshufd $0xaa, %xmm8, %xmm15
  317. mulss %xmm0, %xmm15
  318. subss %xmm15, %xmm2
  319. pshufd $0xff, %xmm8, %xmm15
  320. mulss %xmm0, %xmm15
  321. subss %xmm15, %xmm3
  322. movaps -28 * SIZE(BO), %xmm8
  323. pshufd $0x00, %xmm8, %xmm15
  324. mulss %xmm0, %xmm15
  325. subss %xmm15, %xmm4
  326. pshufd $0x55, %xmm8, %xmm15
  327. mulss %xmm0, %xmm15
  328. subss %xmm15, %xmm5
  329. pshufd $0xaa, %xmm8, %xmm15
  330. mulss %xmm0, %xmm15
  331. subss %xmm15, %xmm6
  332. pshufd $0xff, %xmm8, %xmm15
  333. mulss %xmm0, %xmm15
  334. subss %xmm15, %xmm7
  335. movaps -24 * SIZE(BO), %xmm8
  336. pshufd $0x55, %xmm8, %xmm15
  337. mulss %xmm15, %xmm1
  338. pshufd $0xaa, %xmm8, %xmm15
  339. mulss %xmm1, %xmm15
  340. subss %xmm15, %xmm2
  341. pshufd $0xff, %xmm8, %xmm15
  342. mulss %xmm1, %xmm15
  343. subss %xmm15, %xmm3
  344. movaps -20 * SIZE(BO), %xmm8
  345. pshufd $0x00, %xmm8, %xmm15
  346. mulss %xmm1, %xmm15
  347. subss %xmm15, %xmm4
  348. pshufd $0x55, %xmm8, %xmm15
  349. mulss %xmm1, %xmm15
  350. subss %xmm15, %xmm5
  351. pshufd $0xaa, %xmm8, %xmm15
  352. mulss %xmm1, %xmm15
  353. subss %xmm15, %xmm6
  354. pshufd $0xff, %xmm8, %xmm15
  355. mulss %xmm1, %xmm15
  356. subss %xmm15, %xmm7
  357. movaps -16 * SIZE(BO), %xmm8
  358. pshufd $0xaa, %xmm8, %xmm15
  359. mulss %xmm15, %xmm2
  360. pshufd $0xff, %xmm8, %xmm15
  361. mulss %xmm2, %xmm15
  362. subss %xmm15, %xmm3
  363. movaps -12 * SIZE(BO), %xmm8
  364. pshufd $0x00, %xmm8, %xmm15
  365. mulss %xmm2, %xmm15
  366. subss %xmm15, %xmm4
  367. pshufd $0x55, %xmm8, %xmm15
  368. mulss %xmm2, %xmm15
  369. subss %xmm15, %xmm5
  370. pshufd $0xaa, %xmm8, %xmm15
  371. mulss %xmm2, %xmm15
  372. subss %xmm15, %xmm6
  373. pshufd $0xff, %xmm8, %xmm15
  374. mulss %xmm2, %xmm15
  375. subss %xmm15, %xmm7
  376. movaps -8 * SIZE(BO), %xmm8
  377. pshufd $0xff, %xmm8, %xmm15
  378. mulss %xmm15, %xmm3
  379. movaps -4 * SIZE(BO), %xmm8
  380. pshufd $0x00, %xmm8, %xmm15
  381. mulss %xmm3, %xmm15
  382. subss %xmm15, %xmm4
  383. pshufd $0x55, %xmm8, %xmm15
  384. mulss %xmm3, %xmm15
  385. subss %xmm15, %xmm5
  386. pshufd $0xaa, %xmm8, %xmm15
  387. mulss %xmm3, %xmm15
  388. subss %xmm15, %xmm6
  389. pshufd $0xff, %xmm8, %xmm15
  390. mulss %xmm3, %xmm15
  391. subss %xmm15, %xmm7
  392. movaps 4 * SIZE(BO), %xmm8
  393. pshufd $0x00, %xmm8, %xmm15
  394. mulss %xmm15, %xmm4
  395. pshufd $0x55, %xmm8, %xmm15
  396. mulss %xmm4, %xmm15
  397. subss %xmm15, %xmm5
  398. pshufd $0xaa, %xmm8, %xmm15
  399. mulss %xmm4, %xmm15
  400. subss %xmm15, %xmm6
  401. pshufd $0xff, %xmm8, %xmm15
  402. mulss %xmm4, %xmm15
  403. subss %xmm15, %xmm7
  404. movaps 12 * SIZE(BO), %xmm8
  405. pshufd $0x55, %xmm8, %xmm15
  406. mulss %xmm15, %xmm5
  407. pshufd $0xaa, %xmm8, %xmm15
  408. mulss %xmm5, %xmm15
  409. subss %xmm15, %xmm6
  410. pshufd $0xff, %xmm8, %xmm15
  411. mulss %xmm5, %xmm15
  412. subss %xmm15, %xmm7
  413. movaps 20 * SIZE(BO), %xmm8
  414. pshufd $0xaa, %xmm8, %xmm15
  415. mulss %xmm15, %xmm6
  416. pshufd $0xff, %xmm8, %xmm15
  417. mulss %xmm6, %xmm15
  418. subss %xmm15, %xmm7
  419. movaps 28 * SIZE(BO), %xmm8
  420. pshufd $0xff, %xmm8, %xmm15
  421. mulss %xmm15, %xmm7
  422. #endif
  423. #ifdef RT
  424. movaps 28 * SIZE(BO), %xmm8
  425. pshufd $0xff, %xmm8, %xmm15
  426. mulss %xmm15, %xmm7
  427. pshufd $0xaa, %xmm8, %xmm15
  428. mulss %xmm7, %xmm15
  429. subss %xmm15, %xmm6
  430. pshufd $0x55, %xmm8, %xmm15
  431. mulss %xmm7, %xmm15
  432. subss %xmm15, %xmm5
  433. pshufd $0x00, %xmm8, %xmm15
  434. mulss %xmm7, %xmm15
  435. subss %xmm15, %xmm4
  436. movaps 24 * SIZE(BO), %xmm8
  437. pshufd $0xff, %xmm8, %xmm15
  438. mulss %xmm7, %xmm15
  439. subss %xmm15, %xmm3
  440. pshufd $0xaa, %xmm8, %xmm15
  441. mulss %xmm7, %xmm15
  442. subss %xmm15, %xmm2
  443. pshufd $0x55, %xmm8, %xmm15
  444. mulss %xmm7, %xmm15
  445. subss %xmm15, %xmm1
  446. pshufd $0x00, %xmm8, %xmm15
  447. mulss %xmm7, %xmm15
  448. subss %xmm15, %xmm0
  449. movaps 20 * SIZE(BO), %xmm8
  450. pshufd $0xaa, %xmm8, %xmm15
  451. mulss %xmm15, %xmm6
  452. pshufd $0x55, %xmm8, %xmm15
  453. mulss %xmm6, %xmm15
  454. subss %xmm15, %xmm5
  455. pshufd $0x00, %xmm8, %xmm15
  456. mulss %xmm6, %xmm15
  457. subss %xmm15, %xmm4
  458. movaps 16 * SIZE(BO), %xmm8
  459. pshufd $0xff, %xmm8, %xmm15
  460. mulss %xmm6, %xmm15
  461. subss %xmm15, %xmm3
  462. pshufd $0xaa, %xmm8, %xmm15
  463. mulss %xmm6, %xmm15
  464. subss %xmm15, %xmm2
  465. pshufd $0x55, %xmm8, %xmm15
  466. mulss %xmm6, %xmm15
  467. subss %xmm15, %xmm1
  468. pshufd $0x00, %xmm8, %xmm15
  469. mulss %xmm6, %xmm15
  470. subss %xmm15, %xmm0
  471. movaps 12 * SIZE(BO), %xmm8
  472. pshufd $0x55, %xmm8, %xmm15
  473. mulss %xmm15, %xmm5
  474. pshufd $0x00, %xmm8, %xmm15
  475. mulss %xmm5, %xmm15
  476. subss %xmm15, %xmm4
  477. movaps 8 * SIZE(BO), %xmm8
  478. pshufd $0xff, %xmm8, %xmm15
  479. mulss %xmm5, %xmm15
  480. subss %xmm15, %xmm3
  481. pshufd $0xaa, %xmm8, %xmm15
  482. mulss %xmm5, %xmm15
  483. subss %xmm15, %xmm2
  484. pshufd $0x55, %xmm8, %xmm15
  485. mulss %xmm5, %xmm15
  486. subss %xmm15, %xmm1
  487. pshufd $0x00, %xmm8, %xmm15
  488. mulss %xmm5, %xmm15
  489. subss %xmm15, %xmm0
  490. movaps 4 * SIZE(BO), %xmm8
  491. pshufd $0x00, %xmm8, %xmm15
  492. mulss %xmm15, %xmm4
  493. movaps 0 * SIZE(BO), %xmm8
  494. pshufd $0xff, %xmm8, %xmm15
  495. mulss %xmm4, %xmm15
  496. subss %xmm15, %xmm3
  497. pshufd $0xaa, %xmm8, %xmm15
  498. mulss %xmm4, %xmm15
  499. subss %xmm15, %xmm2
  500. pshufd $0x55, %xmm8, %xmm15
  501. mulss %xmm4, %xmm15
  502. subss %xmm15, %xmm1
  503. pshufd $0x00, %xmm8, %xmm15
  504. mulss %xmm4, %xmm15
  505. subss %xmm15, %xmm0
  506. movaps -8 * SIZE(BO), %xmm8
  507. pshufd $0xff, %xmm8, %xmm15
  508. mulss %xmm15, %xmm3
  509. pshufd $0xaa, %xmm8, %xmm15
  510. mulss %xmm3, %xmm15
  511. subss %xmm15, %xmm2
  512. pshufd $0x55, %xmm8, %xmm15
  513. mulss %xmm3, %xmm15
  514. subss %xmm15, %xmm1
  515. pshufd $0x00, %xmm8, %xmm15
  516. mulss %xmm3, %xmm15
  517. subss %xmm15, %xmm0
  518. movaps -16 * SIZE(BO), %xmm8
  519. pshufd $0xaa, %xmm8, %xmm15
  520. mulss %xmm15, %xmm2
  521. pshufd $0x55, %xmm8, %xmm15
  522. mulss %xmm2, %xmm15
  523. subss %xmm15, %xmm1
  524. pshufd $0x00, %xmm8, %xmm15
  525. mulss %xmm2, %xmm15
  526. subss %xmm15, %xmm0
  527. movaps -24 * SIZE(BO), %xmm8
  528. pshufd $0x55, %xmm8, %xmm15
  529. mulss %xmm15, %xmm1
  530. pshufd $0x00, %xmm8, %xmm15
  531. mulss %xmm1, %xmm15
  532. subss %xmm15, %xmm0
  533. movaps -32 * SIZE(BO), %xmm8
  534. pshufd $0x00, %xmm8, %xmm15
  535. mulss %xmm15, %xmm0
  536. #endif
  537. #ifdef LN
  538. subq $1 * SIZE, CO1
  539. subq $1 * SIZE, CO2
  540. #endif
  541. leaq (LDC, LDC, 2), %rax
  542. #if defined(LN) || defined(LT)
  543. movaps %xmm0, -32 * SIZE(BO)
  544. movaps %xmm4, -28 * SIZE(BO)
  545. pshufd $0xff, %xmm0, %xmm3
  546. pshufd $0xaa, %xmm0, %xmm2
  547. pshufd $0x55, %xmm0, %xmm1
  548. pshufd $0x00, %xmm0, %xmm0
  549. pshufd $0xff, %xmm4, %xmm7
  550. pshufd $0xaa, %xmm4, %xmm6
  551. pshufd $0x55, %xmm4, %xmm5
  552. pshufd $0x00, %xmm4, %xmm4
  553. #else
  554. unpcklps %xmm1, %xmm0
  555. unpcklps %xmm3, %xmm2
  556. unpcklps %xmm5, %xmm4
  557. unpcklps %xmm7, %xmm6
  558. movlps %xmm0, -32 * SIZE(AO)
  559. movlps %xmm2, -30 * SIZE(AO)
  560. movlps %xmm4, -28 * SIZE(AO)
  561. movlps %xmm6, -26 * SIZE(AO)
  562. #endif
  563. movss %xmm0, (CO1)
  564. movss %xmm1, (CO1, LDC, 1)
  565. movss %xmm2, (CO1, LDC, 2)
  566. movss %xmm3, (CO1, %rax, 1)
  567. movss %xmm4, (CO2)
  568. movss %xmm5, (CO2, LDC, 1)
  569. movss %xmm6, (CO2, LDC, 2)
  570. movss %xmm7, (CO2, %rax, 1)
  571. #ifndef LN
  572. addq $1 * SIZE, CO1
  573. addq $1 * SIZE, CO2
  574. #endif
  575. #if defined(LT) || defined(RN)
  576. movq K, %rax
  577. subq KK, %rax
  578. leaq (,%rax, SIZE), %rax
  579. leaq (AO, %rax, 1), AO
  580. leaq (BO, %rax, 8), BO
  581. #endif
  582. #ifdef LN
  583. subq $1, KK
  584. #endif
  585. #ifdef LT
  586. addq $1, KK
  587. #endif
  588. #ifdef RT
  589. movq K, %rax
  590. salq $BASE_SHIFT, %rax
  591. addq %rax, AORIG
  592. #endif
  593. ALIGN_4
  594. .L20:
  595. testq $2, M
  596. BRANCH
  597. jle .L30
  598. #ifdef LN
  599. movq K, %rax
  600. salq $1 + BASE_SHIFT, %rax
  601. subq %rax, AORIG
  602. #endif
  603. #if defined(LN) || defined(RT)
  604. movq KK, %rax
  605. leaq (, %rax, SIZE), %rax
  606. movq AORIG, AO
  607. leaq (AO, %rax, 2), AO
  608. leaq (B, %rax, 8), BO
  609. #else
  610. movq B, BO
  611. #endif
  612. xorps %xmm1, %xmm1
  613. movddup -32 * SIZE(AO), %xmm0
  614. xorps %xmm2, %xmm2
  615. movaps -32 * SIZE(BO), %xmm5
  616. xorps %xmm3, %xmm3
  617. xorps %xmm4, %xmm4
  618. xorps %xmm8, %xmm8
  619. xorps %xmm9, %xmm9
  620. xorps %xmm10, %xmm10
  621. xorps %xmm11, %xmm11
  622. #if defined(LT) || defined(RN)
  623. movq KK, %rax
  624. #else
  625. movq K, %rax
  626. subq KK, %rax
  627. #endif
  628. sarq $2, %rax
  629. NOBRANCH
  630. jle .L25
  631. ALIGN_3
  632. .L22:
  633. addps %xmm1, %xmm8
  634. pshufd $0x50, %xmm5, %xmm1
  635. mulps %xmm0, %xmm1
  636. addps %xmm2, %xmm9
  637. pshufd $0xfa, %xmm5, %xmm2
  638. mulps %xmm0, %xmm2
  639. movaps -28 * SIZE(BO), %xmm5
  640. addps %xmm3, %xmm10
  641. pshufd $0x50, %xmm5, %xmm3
  642. mulps %xmm0, %xmm3
  643. addps %xmm4, %xmm11
  644. pshufd $0xfa, %xmm5, %xmm4
  645. mulps %xmm0, %xmm4
  646. movaps -24 * SIZE(BO), %xmm5
  647. movddup -30 * SIZE(AO), %xmm0
  648. addps %xmm1, %xmm8
  649. pshufd $0x50, %xmm5, %xmm1
  650. mulps %xmm0, %xmm1
  651. addps %xmm2, %xmm9
  652. pshufd $0xfa, %xmm5, %xmm2
  653. mulps %xmm0, %xmm2
  654. movaps -20 * SIZE(BO), %xmm5
  655. addps %xmm3, %xmm10
  656. pshufd $0x50, %xmm5, %xmm3
  657. mulps %xmm0, %xmm3
  658. addps %xmm4, %xmm11
  659. pshufd $0xfa, %xmm5, %xmm4
  660. mulps %xmm0, %xmm4
  661. movaps -16 * SIZE(BO), %xmm5
  662. movddup -28 * SIZE(AO), %xmm0
  663. addps %xmm1, %xmm8
  664. pshufd $0x50, %xmm5, %xmm1
  665. mulps %xmm0, %xmm1
  666. addps %xmm2, %xmm9
  667. pshufd $0xfa, %xmm5, %xmm2
  668. mulps %xmm0, %xmm2
  669. movaps -12 * SIZE(BO), %xmm5
  670. addps %xmm3, %xmm10
  671. pshufd $0x50, %xmm5, %xmm3
  672. mulps %xmm0, %xmm3
  673. addps %xmm4, %xmm11
  674. pshufd $0xfa, %xmm5, %xmm4
  675. mulps %xmm0, %xmm4
  676. movaps -8 * SIZE(BO), %xmm5
  677. movddup -26 * SIZE(AO), %xmm0
  678. addps %xmm1, %xmm8
  679. pshufd $0x50, %xmm5, %xmm1
  680. mulps %xmm0, %xmm1
  681. addps %xmm2, %xmm9
  682. pshufd $0xfa, %xmm5, %xmm2
  683. mulps %xmm0, %xmm2
  684. movaps -4 * SIZE(BO), %xmm5
  685. addps %xmm3, %xmm10
  686. pshufd $0x50, %xmm5, %xmm3
  687. mulps %xmm0, %xmm3
  688. addps %xmm4, %xmm11
  689. pshufd $0xfa, %xmm5, %xmm4
  690. mulps %xmm0, %xmm4
  691. movaps 0 * SIZE(BO), %xmm5
  692. movddup -24 * SIZE(AO), %xmm0
  693. subq $-32 * SIZE, BO
  694. subq $ -8 * SIZE, AO
  695. subq $1, %rax
  696. BRANCH
  697. jg .L22
  698. ALIGN_3
  699. .L25:
  700. #if defined(LT) || defined(RN)
  701. movq KK, %rax
  702. #else
  703. movq K, %rax
  704. subq KK, %rax
  705. #endif
  706. andq $3, %rax # if (k & 1)
  707. BRANCH
  708. je .L28
  709. ALIGN_3
  710. .L26:
  711. addps %xmm1, %xmm8
  712. pshufd $0x50, %xmm5, %xmm1
  713. mulps %xmm0, %xmm1
  714. addps %xmm2, %xmm9
  715. pshufd $0xfa, %xmm5, %xmm2
  716. mulps %xmm0, %xmm2
  717. movaps -28 * SIZE(BO), %xmm5
  718. addps %xmm3, %xmm10
  719. pshufd $0x50, %xmm5, %xmm3
  720. mulps %xmm0, %xmm3
  721. addps %xmm4, %xmm11
  722. pshufd $0xfa, %xmm5, %xmm4
  723. mulps %xmm0, %xmm4
  724. movaps -24 * SIZE(BO), %xmm5
  725. movddup -30 * SIZE(AO), %xmm0
  726. addq $2 * SIZE, AO
  727. addq $8 * SIZE, BO
  728. subq $1, %rax
  729. BRANCH
  730. jg .L26
  731. ALIGN_3
  732. .L28:
  733. #if defined(LN) || defined(RT)
  734. movq KK, %rax
  735. #ifdef LN
  736. subq $2, %rax
  737. #else
  738. subq $8, %rax
  739. #endif
  740. leaq (, %rax, SIZE), %rax
  741. movq AORIG, AO
  742. leaq (AO, %rax, 2), AO
  743. leaq (B, %rax, 8), BO
  744. #endif
  745. addps %xmm1, %xmm8
  746. addps %xmm2, %xmm9
  747. addps %xmm3, %xmm10
  748. addps %xmm4, %xmm11
  749. #if defined(LN) || defined(LT)
  750. movaps %xmm8, %xmm4
  751. shufps $0x88, %xmm9, %xmm8
  752. shufps $0xdd, %xmm9, %xmm4
  753. movaps %xmm10, %xmm5
  754. shufps $0x88, %xmm11, %xmm10
  755. shufps $0xdd, %xmm11, %xmm5
  756. movaps -32 * SIZE(BO), %xmm0
  757. movaps -28 * SIZE(BO), %xmm2
  758. movaps -24 * SIZE(BO), %xmm1
  759. movaps -20 * SIZE(BO), %xmm3
  760. subps %xmm8, %xmm0
  761. subps %xmm4, %xmm1
  762. subps %xmm10, %xmm2
  763. subps %xmm5, %xmm3
  764. #else
  765. movaps -32 * SIZE(AO), %xmm0
  766. movaps -28 * SIZE(AO), %xmm2
  767. movaps -24 * SIZE(AO), %xmm4
  768. movaps -20 * SIZE(AO), %xmm6
  769. subps %xmm8, %xmm0
  770. subps %xmm9, %xmm2
  771. subps %xmm10, %xmm4
  772. subps %xmm11, %xmm6
  773. movhlps %xmm0, %xmm1
  774. movhlps %xmm2, %xmm3
  775. movhlps %xmm4, %xmm5
  776. movhlps %xmm6, %xmm7
  777. #endif
  778. #ifdef LN
  779. movaps -32 * SIZE(AO), %xmm8
  780. pshufd $0xff, %xmm8, %xmm15
  781. mulps %xmm15, %xmm1
  782. mulps %xmm15, %xmm3
  783. pshufd $0xaa, %xmm8, %xmm15
  784. mulps %xmm1, %xmm15
  785. subps %xmm15, %xmm0
  786. pshufd $0xaa, %xmm8, %xmm15
  787. mulps %xmm3, %xmm15
  788. subps %xmm15, %xmm2
  789. pshufd $0x00, %xmm8, %xmm15
  790. mulps %xmm15, %xmm0
  791. mulps %xmm15, %xmm2
  792. #endif
  793. #ifdef LT
  794. movaps -32 * SIZE(AO), %xmm8
  795. pshufd $0x00, %xmm8, %xmm15
  796. mulps %xmm15, %xmm0
  797. mulps %xmm15, %xmm2
  798. pshufd $0x55, %xmm8, %xmm15
  799. mulps %xmm0, %xmm15
  800. subps %xmm15, %xmm1
  801. pshufd $0x55, %xmm8, %xmm15
  802. mulps %xmm2, %xmm15
  803. subps %xmm15, %xmm3
  804. pshufd $0xff, %xmm8, %xmm15
  805. mulps %xmm15, %xmm1
  806. mulps %xmm15, %xmm3
  807. #endif
  808. #ifdef RN
  809. movaps -32 * SIZE(BO), %xmm8
  810. pshufd $0x00, %xmm8, %xmm15
  811. mulps %xmm15, %xmm0
  812. pshufd $0x55, %xmm8, %xmm15
  813. mulps %xmm0, %xmm15
  814. subps %xmm15, %xmm1
  815. pshufd $0xaa, %xmm8, %xmm15
  816. mulps %xmm0, %xmm15
  817. subps %xmm15, %xmm2
  818. pshufd $0xff, %xmm8, %xmm15
  819. mulps %xmm0, %xmm15
  820. subps %xmm15, %xmm3
  821. movaps -28 * SIZE(BO), %xmm8
  822. pshufd $0x00, %xmm8, %xmm15
  823. mulps %xmm0, %xmm15
  824. subps %xmm15, %xmm4
  825. pshufd $0x55, %xmm8, %xmm15
  826. mulps %xmm0, %xmm15
  827. subps %xmm15, %xmm5
  828. pshufd $0xaa, %xmm8, %xmm15
  829. mulps %xmm0, %xmm15
  830. subps %xmm15, %xmm6
  831. pshufd $0xff, %xmm8, %xmm15
  832. mulps %xmm0, %xmm15
  833. subps %xmm15, %xmm7
  834. movaps -24 * SIZE(BO), %xmm8
  835. pshufd $0x55, %xmm8, %xmm15
  836. mulps %xmm15, %xmm1
  837. pshufd $0xaa, %xmm8, %xmm15
  838. mulps %xmm1, %xmm15
  839. subps %xmm15, %xmm2
  840. pshufd $0xff, %xmm8, %xmm15
  841. mulps %xmm1, %xmm15
  842. subps %xmm15, %xmm3
  843. movaps -20 * SIZE(BO), %xmm8
  844. pshufd $0x00, %xmm8, %xmm15
  845. mulps %xmm1, %xmm15
  846. subps %xmm15, %xmm4
  847. pshufd $0x55, %xmm8, %xmm15
  848. mulps %xmm1, %xmm15
  849. subps %xmm15, %xmm5
  850. pshufd $0xaa, %xmm8, %xmm15
  851. mulps %xmm1, %xmm15
  852. subps %xmm15, %xmm6
  853. pshufd $0xff, %xmm8, %xmm15
  854. mulps %xmm1, %xmm15
  855. subps %xmm15, %xmm7
  856. movaps -16 * SIZE(BO), %xmm8
  857. pshufd $0xaa, %xmm8, %xmm15
  858. mulps %xmm15, %xmm2
  859. pshufd $0xff, %xmm8, %xmm15
  860. mulps %xmm2, %xmm15
  861. subps %xmm15, %xmm3
  862. movaps -12 * SIZE(BO), %xmm8
  863. pshufd $0x00, %xmm8, %xmm15
  864. mulps %xmm2, %xmm15
  865. subps %xmm15, %xmm4
  866. pshufd $0x55, %xmm8, %xmm15
  867. mulps %xmm2, %xmm15
  868. subps %xmm15, %xmm5
  869. pshufd $0xaa, %xmm8, %xmm15
  870. mulps %xmm2, %xmm15
  871. subps %xmm15, %xmm6
  872. pshufd $0xff, %xmm8, %xmm15
  873. mulps %xmm2, %xmm15
  874. subps %xmm15, %xmm7
  875. movaps -8 * SIZE(BO), %xmm8
  876. pshufd $0xff, %xmm8, %xmm15
  877. mulps %xmm15, %xmm3
  878. movaps -4 * SIZE(BO), %xmm8
  879. pshufd $0x00, %xmm8, %xmm15
  880. mulps %xmm3, %xmm15
  881. subps %xmm15, %xmm4
  882. pshufd $0x55, %xmm8, %xmm15
  883. mulps %xmm3, %xmm15
  884. subps %xmm15, %xmm5
  885. pshufd $0xaa, %xmm8, %xmm15
  886. mulps %xmm3, %xmm15
  887. subps %xmm15, %xmm6
  888. pshufd $0xff, %xmm8, %xmm15
  889. mulps %xmm3, %xmm15
  890. subps %xmm15, %xmm7
  891. movaps 4 * SIZE(BO), %xmm8
  892. pshufd $0x00, %xmm8, %xmm15
  893. mulps %xmm15, %xmm4
  894. pshufd $0x55, %xmm8, %xmm15
  895. mulps %xmm4, %xmm15
  896. subps %xmm15, %xmm5
  897. pshufd $0xaa, %xmm8, %xmm15
  898. mulps %xmm4, %xmm15
  899. subps %xmm15, %xmm6
  900. pshufd $0xff, %xmm8, %xmm15
  901. mulps %xmm4, %xmm15
  902. subps %xmm15, %xmm7
  903. movaps 12 * SIZE(BO), %xmm8
  904. pshufd $0x55, %xmm8, %xmm15
  905. mulps %xmm15, %xmm5
  906. pshufd $0xaa, %xmm8, %xmm15
  907. mulps %xmm5, %xmm15
  908. subps %xmm15, %xmm6
  909. pshufd $0xff, %xmm8, %xmm15
  910. mulps %xmm5, %xmm15
  911. subps %xmm15, %xmm7
  912. movaps 20 * SIZE(BO), %xmm8
  913. pshufd $0xaa, %xmm8, %xmm15
  914. mulps %xmm15, %xmm6
  915. pshufd $0xff, %xmm8, %xmm15
  916. mulps %xmm6, %xmm15
  917. subps %xmm15, %xmm7
  918. movaps 28 * SIZE(BO), %xmm8
  919. pshufd $0xff, %xmm8, %xmm15
  920. mulps %xmm15, %xmm7
  921. #endif
  922. #ifdef RT
  923. movaps 28 * SIZE(BO), %xmm8
  924. pshufd $0xff, %xmm8, %xmm15
  925. mulps %xmm15, %xmm7
  926. pshufd $0xaa, %xmm8, %xmm15
  927. mulps %xmm7, %xmm15
  928. subps %xmm15, %xmm6
  929. pshufd $0x55, %xmm8, %xmm15
  930. mulps %xmm7, %xmm15
  931. subps %xmm15, %xmm5
  932. pshufd $0x00, %xmm8, %xmm15
  933. mulps %xmm7, %xmm15
  934. subps %xmm15, %xmm4
  935. movaps 24 * SIZE(BO), %xmm8
  936. pshufd $0xff, %xmm8, %xmm15
  937. mulps %xmm7, %xmm15
  938. subps %xmm15, %xmm3
  939. pshufd $0xaa, %xmm8, %xmm15
  940. mulps %xmm7, %xmm15
  941. subps %xmm15, %xmm2
  942. pshufd $0x55, %xmm8, %xmm15
  943. mulps %xmm7, %xmm15
  944. subps %xmm15, %xmm1
  945. pshufd $0x00, %xmm8, %xmm15
  946. mulps %xmm7, %xmm15
  947. subps %xmm15, %xmm0
  948. movaps 20 * SIZE(BO), %xmm8
  949. pshufd $0xaa, %xmm8, %xmm15
  950. mulps %xmm15, %xmm6
  951. pshufd $0x55, %xmm8, %xmm15
  952. mulps %xmm6, %xmm15
  953. subps %xmm15, %xmm5
  954. pshufd $0x00, %xmm8, %xmm15
  955. mulps %xmm6, %xmm15
  956. subps %xmm15, %xmm4
  957. movaps 16 * SIZE(BO), %xmm8
  958. pshufd $0xff, %xmm8, %xmm15
  959. mulps %xmm6, %xmm15
  960. subps %xmm15, %xmm3
  961. pshufd $0xaa, %xmm8, %xmm15
  962. mulps %xmm6, %xmm15
  963. subps %xmm15, %xmm2
  964. pshufd $0x55, %xmm8, %xmm15
  965. mulps %xmm6, %xmm15
  966. subps %xmm15, %xmm1
  967. pshufd $0x00, %xmm8, %xmm15
  968. mulps %xmm6, %xmm15
  969. subps %xmm15, %xmm0
  970. movaps 12 * SIZE(BO), %xmm8
  971. pshufd $0x55, %xmm8, %xmm15
  972. mulps %xmm15, %xmm5
  973. pshufd $0x00, %xmm8, %xmm15
  974. mulps %xmm5, %xmm15
  975. subps %xmm15, %xmm4
  976. movaps 8 * SIZE(BO), %xmm8
  977. pshufd $0xff, %xmm8, %xmm15
  978. mulps %xmm5, %xmm15
  979. subps %xmm15, %xmm3
  980. pshufd $0xaa, %xmm8, %xmm15
  981. mulps %xmm5, %xmm15
  982. subps %xmm15, %xmm2
  983. pshufd $0x55, %xmm8, %xmm15
  984. mulps %xmm5, %xmm15
  985. subps %xmm15, %xmm1
  986. pshufd $0x00, %xmm8, %xmm15
  987. mulps %xmm5, %xmm15
  988. subps %xmm15, %xmm0
  989. movaps 4 * SIZE(BO), %xmm8
  990. pshufd $0x00, %xmm8, %xmm15
  991. mulps %xmm15, %xmm4
  992. movaps 0 * SIZE(BO), %xmm8
  993. pshufd $0xff, %xmm8, %xmm15
  994. mulps %xmm4, %xmm15
  995. subps %xmm15, %xmm3
  996. pshufd $0xaa, %xmm8, %xmm15
  997. mulps %xmm4, %xmm15
  998. subps %xmm15, %xmm2
  999. pshufd $0x55, %xmm8, %xmm15
  1000. mulps %xmm4, %xmm15
  1001. subps %xmm15, %xmm1
  1002. pshufd $0x00, %xmm8, %xmm15
  1003. mulps %xmm4, %xmm15
  1004. subps %xmm15, %xmm0
  1005. movaps -8 * SIZE(BO), %xmm8
  1006. pshufd $0xff, %xmm8, %xmm15
  1007. mulps %xmm15, %xmm3
  1008. pshufd $0xaa, %xmm8, %xmm15
  1009. mulps %xmm3, %xmm15
  1010. subps %xmm15, %xmm2
  1011. pshufd $0x55, %xmm8, %xmm15
  1012. mulps %xmm3, %xmm15
  1013. subps %xmm15, %xmm1
  1014. pshufd $0x00, %xmm8, %xmm15
  1015. mulps %xmm3, %xmm15
  1016. subps %xmm15, %xmm0
  1017. movaps -16 * SIZE(BO), %xmm8
  1018. pshufd $0xaa, %xmm8, %xmm15
  1019. mulps %xmm15, %xmm2
  1020. pshufd $0x55, %xmm8, %xmm15
  1021. mulps %xmm2, %xmm15
  1022. subps %xmm15, %xmm1
  1023. pshufd $0x00, %xmm8, %xmm15
  1024. mulps %xmm2, %xmm15
  1025. subps %xmm15, %xmm0
  1026. movaps -24 * SIZE(BO), %xmm8
  1027. pshufd $0x55, %xmm8, %xmm15
  1028. mulps %xmm15, %xmm1
  1029. pshufd $0x00, %xmm8, %xmm15
  1030. mulps %xmm1, %xmm15
  1031. subps %xmm15, %xmm0
  1032. movaps -32 * SIZE(BO), %xmm8
  1033. pshufd $0x00, %xmm8, %xmm15
  1034. mulps %xmm15, %xmm0
  1035. #endif
  1036. #ifdef LN
  1037. subq $2 * SIZE, CO1
  1038. subq $2 * SIZE, CO2
  1039. #endif
  1040. leaq (LDC, LDC, 2), %rax
  1041. #if defined(LN) || defined(LT)
  1042. movaps %xmm0, -32 * SIZE(BO)
  1043. movaps %xmm2, -28 * SIZE(BO)
  1044. movaps %xmm1, -24 * SIZE(BO)
  1045. movaps %xmm3, -20 * SIZE(BO)
  1046. movaps %xmm0, %xmm4
  1047. unpcklps %xmm1, %xmm0
  1048. unpckhps %xmm1, %xmm4
  1049. movaps %xmm2, %xmm5
  1050. unpcklps %xmm3, %xmm2
  1051. unpckhps %xmm3, %xmm5
  1052. movsd %xmm0, (CO1)
  1053. movhps %xmm0, (CO1, LDC, 1)
  1054. movsd %xmm4, (CO1, LDC, 2)
  1055. movhps %xmm4, (CO1, %rax, 1)
  1056. movsd %xmm2, (CO2)
  1057. movhps %xmm2, (CO2, LDC, 1)
  1058. movsd %xmm5, (CO2, LDC, 2)
  1059. movhps %xmm5, (CO2, %rax, 1)
  1060. #else
  1061. movlhps %xmm1, %xmm0
  1062. movlhps %xmm3, %xmm2
  1063. movlhps %xmm5, %xmm4
  1064. movlhps %xmm7, %xmm6
  1065. movaps %xmm0, -32 * SIZE(AO)
  1066. movaps %xmm2, -28 * SIZE(AO)
  1067. movaps %xmm4, -24 * SIZE(AO)
  1068. movaps %xmm6, -20 * SIZE(AO)
  1069. movsd %xmm0, (CO1)
  1070. movsd %xmm1, (CO1, LDC, 1)
  1071. movsd %xmm2, (CO1, LDC, 2)
  1072. movsd %xmm3, (CO1, %rax, 1)
  1073. movsd %xmm4, (CO2)
  1074. movsd %xmm5, (CO2, LDC, 1)
  1075. movsd %xmm6, (CO2, LDC, 2)
  1076. movsd %xmm7, (CO2, %rax, 1)
  1077. #endif
  1078. #ifndef LN
  1079. addq $2 * SIZE, CO1
  1080. addq $2 * SIZE, CO2
  1081. #endif
  1082. #if defined(LT) || defined(RN)
  1083. movq K, %rax
  1084. subq KK, %rax
  1085. leaq (,%rax, SIZE), %rax
  1086. leaq (AO, %rax, 2), AO
  1087. leaq (BO, %rax, 8), BO
  1088. #endif
  1089. #ifdef LN
  1090. subq $2, KK
  1091. #endif
  1092. #ifdef LT
  1093. addq $2, KK
  1094. #endif
  1095. #ifdef RT
  1096. movq K, %rax
  1097. salq $1 + BASE_SHIFT, %rax
  1098. addq %rax, AORIG
  1099. #endif
  1100. ALIGN_4
  1101. .L30:
  1102. movq M, I
  1103. sarq $2, I
  1104. NOBRANCH
  1105. jle .L39
  1106. ALIGN_4
  1107. .L11:
  1108. #ifdef LN
  1109. movq K, %rax
  1110. salq $2 + BASE_SHIFT, %rax
  1111. subq %rax, AORIG
  1112. #endif
  1113. #if defined(LN) || defined(RT)
  1114. movq KK, %rax
  1115. leaq (, %rax, SIZE), %rax
  1116. movq AORIG, AO
  1117. leaq (AO, %rax, 4), AO
  1118. leaq (B, %rax, 8), BO
  1119. #else
  1120. movq B, BO
  1121. #endif
  1122. prefetchnta -32 * SIZE(BB)
  1123. subq $-16 * SIZE, BB
  1124. xorps %xmm1, %xmm1
  1125. movaps -32 * SIZE(AO), %xmm0
  1126. xorps %xmm2, %xmm2
  1127. xorps %xmm3, %xmm3
  1128. xorps %xmm4, %xmm4
  1129. leaq (LDC, LDC, 2), %rax
  1130. xorps %xmm8, %xmm8
  1131. prefetcht2 -4 * SIZE(CO1)
  1132. xorps %xmm9, %xmm9
  1133. prefetcht2 -4 * SIZE(CO1, LDC, 1)
  1134. xorps %xmm10, %xmm10
  1135. prefetcht2 -4 * SIZE(CO1, LDC, 2)
  1136. xorps %xmm11, %xmm11
  1137. prefetcht2 -4 * SIZE(CO1, %rax, 1)
  1138. xorps %xmm12, %xmm12
  1139. prefetcht2 -4 * SIZE(CO2)
  1140. xorps %xmm13, %xmm13
  1141. prefetcht2 -4 * SIZE(CO2, LDC, 1)
  1142. xorps %xmm14, %xmm14
  1143. prefetcht2 -4 * SIZE(CO2, LDC, 2)
  1144. xorps %xmm15, %xmm15
  1145. prefetcht2 -4 * SIZE(CO2, %rax, 1)
  1146. #if defined(LT) || defined(RN)
  1147. movq KK, %rax
  1148. #else
  1149. movq K, %rax
  1150. subq KK, %rax
  1151. #endif
  1152. sarq $2, %rax
  1153. NOBRANCH
  1154. jle .L15
  1155. ALIGN_3
  1156. .L12:
  1157. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  1158. addps %xmm1, %xmm12
  1159. movaps -32 * SIZE(BO), %xmm1
  1160. addps %xmm2, %xmm13
  1161. pshufd $0x39, %xmm1, %xmm2
  1162. mulps %xmm0, %xmm1
  1163. pshufd $0x39, %xmm2, %xmm5
  1164. mulps %xmm0, %xmm2
  1165. addps %xmm3, %xmm14
  1166. addps %xmm4, %xmm15
  1167. pshufd $0x39, %xmm5, %xmm6
  1168. mulps %xmm0, %xmm5
  1169. mulps %xmm0, %xmm6
  1170. addps %xmm1, %xmm8
  1171. movaps -28 * SIZE(BO), %xmm1
  1172. addps %xmm2, %xmm9
  1173. pshufd $0x39, %xmm1, %xmm2
  1174. mulps %xmm0, %xmm1
  1175. pshufd $0x39, %xmm2, %xmm3
  1176. mulps %xmm0, %xmm2
  1177. addps %xmm5, %xmm10
  1178. addps %xmm6, %xmm11
  1179. pshufd $0x39, %xmm3, %xmm4
  1180. mulps %xmm0, %xmm3
  1181. mulps %xmm0, %xmm4
  1182. movaps -28 * SIZE(AO), %xmm0
  1183. addps %xmm1, %xmm12
  1184. movaps -24 * SIZE(BO), %xmm1
  1185. addps %xmm2, %xmm13
  1186. pshufd $0x39, %xmm1, %xmm2
  1187. mulps %xmm0, %xmm1
  1188. pshufd $0x39, %xmm2, %xmm5
  1189. mulps %xmm0, %xmm2
  1190. addps %xmm3, %xmm14
  1191. addps %xmm4, %xmm15
  1192. pshufd $0x39, %xmm5, %xmm6
  1193. mulps %xmm0, %xmm5
  1194. mulps %xmm0, %xmm6
  1195. addps %xmm1, %xmm8
  1196. movaps -20 * SIZE(BO), %xmm1
  1197. addps %xmm2, %xmm9
  1198. pshufd $0x39, %xmm1, %xmm2
  1199. mulps %xmm0, %xmm1
  1200. pshufd $0x39, %xmm2, %xmm3
  1201. mulps %xmm0, %xmm2
  1202. addps %xmm5, %xmm10
  1203. addps %xmm6, %xmm11
  1204. pshufd $0x39, %xmm3, %xmm4
  1205. mulps %xmm0, %xmm3
  1206. mulps %xmm0, %xmm4
  1207. movaps -24 * SIZE(AO), %xmm0
  1208. addps %xmm1, %xmm12
  1209. movaps -16 * SIZE(BO), %xmm1
  1210. addps %xmm2, %xmm13
  1211. pshufd $0x39, %xmm1, %xmm2
  1212. mulps %xmm0, %xmm1
  1213. pshufd $0x39, %xmm2, %xmm5
  1214. mulps %xmm0, %xmm2
  1215. addps %xmm3, %xmm14
  1216. addps %xmm4, %xmm15
  1217. pshufd $0x39, %xmm5, %xmm6
  1218. mulps %xmm0, %xmm5
  1219. mulps %xmm0, %xmm6
  1220. addps %xmm1, %xmm8
  1221. movaps -12 * SIZE(BO), %xmm1
  1222. addps %xmm2, %xmm9
  1223. pshufd $0x39, %xmm1, %xmm2
  1224. mulps %xmm0, %xmm1
  1225. pshufd $0x39, %xmm2, %xmm3
  1226. mulps %xmm0, %xmm2
  1227. addps %xmm5, %xmm10
  1228. addps %xmm6, %xmm11
  1229. pshufd $0x39, %xmm3, %xmm4
  1230. mulps %xmm0, %xmm3
  1231. mulps %xmm0, %xmm4
  1232. movaps -20 * SIZE(AO), %xmm0
  1233. addps %xmm1, %xmm12
  1234. movaps -8 * SIZE(BO), %xmm1
  1235. addps %xmm2, %xmm13
  1236. pshufd $0x39, %xmm1, %xmm2
  1237. mulps %xmm0, %xmm1
  1238. pshufd $0x39, %xmm2, %xmm5
  1239. mulps %xmm0, %xmm2
  1240. addps %xmm3, %xmm14
  1241. addps %xmm4, %xmm15
  1242. pshufd $0x39, %xmm5, %xmm6
  1243. mulps %xmm0, %xmm5
  1244. mulps %xmm0, %xmm6
  1245. addps %xmm1, %xmm8
  1246. movaps -4 * SIZE(BO), %xmm1
  1247. addps %xmm2, %xmm9
  1248. subq $-32 * SIZE, BO
  1249. pshufd $0x39, %xmm1, %xmm2
  1250. mulps %xmm0, %xmm1
  1251. pshufd $0x39, %xmm2, %xmm3
  1252. mulps %xmm0, %xmm2
  1253. addps %xmm5, %xmm10
  1254. addps %xmm6, %xmm11
  1255. pshufd $0x39, %xmm3, %xmm4
  1256. mulps %xmm0, %xmm3
  1257. mulps %xmm0, %xmm4
  1258. movaps -16 * SIZE(AO), %xmm0
  1259. subq $-16 * SIZE, AO
  1260. subq $1, %rax
  1261. BRANCH
  1262. jg .L12
  1263. ALIGN_3
  1264. .L15:
  1265. #if defined(LT) || defined(RN)
  1266. movq KK, %rax
  1267. #else
  1268. movq K, %rax
  1269. subq KK, %rax
  1270. #endif
  1271. andq $3, %rax # if (k & 1)
  1272. BRANCH
  1273. je .L18
  1274. ALIGN_3
  1275. .L16:
  1276. addps %xmm1, %xmm12
  1277. movaps -32 * SIZE(BO), %xmm1
  1278. addps %xmm2, %xmm13
  1279. pshufd $0x39, %xmm1, %xmm2
  1280. mulps %xmm0, %xmm1
  1281. pshufd $0x39, %xmm2, %xmm5
  1282. mulps %xmm0, %xmm2
  1283. addps %xmm3, %xmm14
  1284. addps %xmm4, %xmm15
  1285. pshufd $0x39, %xmm5, %xmm6
  1286. mulps %xmm0, %xmm5
  1287. mulps %xmm0, %xmm6
  1288. addps %xmm1, %xmm8
  1289. movaps -28 * SIZE(BO), %xmm1
  1290. addps %xmm2, %xmm9
  1291. pshufd $0x39, %xmm1, %xmm2
  1292. mulps %xmm0, %xmm1
  1293. pshufd $0x39, %xmm2, %xmm3
  1294. mulps %xmm0, %xmm2
  1295. addps %xmm5, %xmm10
  1296. addps %xmm6, %xmm11
  1297. pshufd $0x39, %xmm3, %xmm4
  1298. mulps %xmm0, %xmm3
  1299. mulps %xmm0, %xmm4
  1300. movaps -28 * SIZE(AO), %xmm0
  1301. addq $4 * SIZE, AO
  1302. addq $8 * SIZE, BO
  1303. subq $1, %rax
  1304. BRANCH
  1305. jg .L16
  1306. ALIGN_3
  1307. .L18:
  1308. #if defined(LN) || defined(RT)
  1309. movq KK, %rax
  1310. #ifdef LN
  1311. subq $4, %rax
  1312. #else
  1313. subq $8, %rax
  1314. #endif
  1315. leaq (, %rax, SIZE), %rax
  1316. movq AORIG, AO
  1317. leaq (AO, %rax, 4), AO
  1318. leaq (B, %rax, 8), BO
  1319. #endif
  1320. addps %xmm1, %xmm12
  1321. addps %xmm2, %xmm13
  1322. addps %xmm3, %xmm14
  1323. addps %xmm4, %xmm15
  1324. #if defined(LN) || defined(LT)
  1325. movaps %xmm8, %xmm4
  1326. shufps $0x88, %xmm9, %xmm8
  1327. movaps %xmm10, %xmm5
  1328. shufps $0x88, %xmm11, %xmm10
  1329. shufps $0xdd, %xmm11, %xmm4
  1330. shufps $0xdd, %xmm9, %xmm5
  1331. movaps %xmm8, %xmm6
  1332. shufps $0x88, %xmm10, %xmm8
  1333. shufps $0xdd, %xmm6, %xmm10
  1334. movaps %xmm4, %xmm9
  1335. movaps %xmm5, %xmm11
  1336. shufps $0x22, %xmm5, %xmm9
  1337. shufps $0x77, %xmm4, %xmm11
  1338. movaps %xmm12, %xmm4
  1339. shufps $0x88, %xmm13, %xmm12
  1340. movaps %xmm14, %xmm5
  1341. shufps $0x88, %xmm15, %xmm14
  1342. shufps $0xdd, %xmm15, %xmm4
  1343. shufps $0xdd, %xmm13, %xmm5
  1344. movaps %xmm12, %xmm6
  1345. shufps $0x88, %xmm14, %xmm12
  1346. shufps $0xdd, %xmm6, %xmm14
  1347. movaps %xmm4, %xmm13
  1348. movaps %xmm5, %xmm15
  1349. shufps $0x22, %xmm5, %xmm13
  1350. shufps $0x77, %xmm4, %xmm15
  1351. movaps -32 * SIZE(BO), %xmm0
  1352. movaps -28 * SIZE(BO), %xmm4
  1353. movaps -24 * SIZE(BO), %xmm1
  1354. movaps -20 * SIZE(BO), %xmm5
  1355. movaps -16 * SIZE(BO), %xmm2
  1356. movaps -12 * SIZE(BO), %xmm6
  1357. movaps -8 * SIZE(BO), %xmm3
  1358. movaps -4 * SIZE(BO), %xmm7
  1359. #else
  1360. movaps %xmm9, %xmm4
  1361. shufps $0xd8, %xmm8, %xmm9
  1362. shufps $0xd8, %xmm11, %xmm8
  1363. shufps $0xd8, %xmm10, %xmm11
  1364. shufps $0xd8, %xmm4, %xmm10
  1365. movaps %xmm8, %xmm4
  1366. shufps $0xd8, %xmm10, %xmm8
  1367. shufps $0xd8, %xmm4, %xmm10
  1368. movaps %xmm9, %xmm5
  1369. shufps $0xd8, %xmm11, %xmm9
  1370. shufps $0xd8, %xmm5, %xmm11
  1371. movaps %xmm13, %xmm4
  1372. shufps $0xd8, %xmm12, %xmm13
  1373. shufps $0xd8, %xmm15, %xmm12
  1374. shufps $0xd8, %xmm14, %xmm15
  1375. shufps $0xd8, %xmm4, %xmm14
  1376. movaps %xmm12, %xmm4
  1377. shufps $0xd8, %xmm14, %xmm12
  1378. shufps $0xd8, %xmm4, %xmm14
  1379. movaps %xmm13, %xmm5
  1380. shufps $0xd8, %xmm15, %xmm13
  1381. shufps $0xd8, %xmm5, %xmm15
  1382. movaps -32 * SIZE(AO), %xmm0
  1383. movaps -28 * SIZE(AO), %xmm1
  1384. movaps -24 * SIZE(AO), %xmm2
  1385. movaps -20 * SIZE(AO), %xmm3
  1386. movaps -16 * SIZE(AO), %xmm4
  1387. movaps -12 * SIZE(AO), %xmm5
  1388. movaps -8 * SIZE(AO), %xmm6
  1389. movaps -4 * SIZE(AO), %xmm7
  1390. #endif
  1391. subps %xmm8, %xmm0
  1392. subps %xmm9, %xmm1
  1393. subps %xmm10, %xmm2
  1394. subps %xmm11, %xmm3
  1395. subps %xmm12, %xmm4
  1396. subps %xmm13, %xmm5
  1397. subps %xmm14, %xmm6
  1398. subps %xmm15, %xmm7
  1399. #ifdef LN
  1400. movaps -20 * SIZE(AO), %xmm8
  1401. pshufd $0xff, %xmm8, %xmm15
  1402. mulps %xmm15, %xmm3
  1403. mulps %xmm15, %xmm7
  1404. pshufd $0xaa, %xmm8, %xmm15
  1405. mulps %xmm3, %xmm15
  1406. subps %xmm15, %xmm2
  1407. pshufd $0xaa, %xmm8, %xmm15
  1408. mulps %xmm7, %xmm15
  1409. subps %xmm15, %xmm6
  1410. pshufd $0x55, %xmm8, %xmm15
  1411. mulps %xmm3, %xmm15
  1412. subps %xmm15, %xmm1
  1413. pshufd $0x55, %xmm8, %xmm15
  1414. mulps %xmm7, %xmm15
  1415. subps %xmm15, %xmm5
  1416. pshufd $0x00, %xmm8, %xmm15
  1417. mulps %xmm3, %xmm15
  1418. subps %xmm15, %xmm0
  1419. pshufd $0x00, %xmm8, %xmm15
  1420. mulps %xmm7, %xmm15
  1421. subps %xmm15, %xmm4
  1422. movaps -24 * SIZE(AO), %xmm8
  1423. pshufd $0xaa, %xmm8, %xmm15
  1424. mulps %xmm15, %xmm2
  1425. mulps %xmm15, %xmm6
  1426. pshufd $0x55, %xmm8, %xmm15
  1427. mulps %xmm2, %xmm15
  1428. subps %xmm15, %xmm1
  1429. pshufd $0x55, %xmm8, %xmm15
  1430. mulps %xmm6, %xmm15
  1431. subps %xmm15, %xmm5
  1432. pshufd $0x00, %xmm8, %xmm15
  1433. mulps %xmm2, %xmm15
  1434. subps %xmm15, %xmm0
  1435. pshufd $0x00, %xmm8, %xmm15
  1436. mulps %xmm6, %xmm15
  1437. subps %xmm15, %xmm4
  1438. movaps -28 * SIZE(AO), %xmm8
  1439. pshufd $0x55, %xmm8, %xmm15
  1440. mulps %xmm15, %xmm1
  1441. mulps %xmm15, %xmm5
  1442. pshufd $0x00, %xmm8, %xmm15
  1443. mulps %xmm1, %xmm15
  1444. subps %xmm15, %xmm0
  1445. pshufd $0x00, %xmm8, %xmm15
  1446. mulps %xmm5, %xmm15
  1447. subps %xmm15, %xmm4
  1448. movaps -32 * SIZE(AO), %xmm8
  1449. pshufd $0x00, %xmm8, %xmm15
  1450. mulps %xmm15, %xmm0
  1451. mulps %xmm15, %xmm4
  1452. #endif
  1453. #ifdef LT
  1454. movaps -32 * SIZE(AO), %xmm8
  1455. pshufd $0x00, %xmm8, %xmm15
  1456. mulps %xmm15, %xmm0
  1457. mulps %xmm15, %xmm4
  1458. pshufd $0x55, %xmm8, %xmm15
  1459. mulps %xmm0, %xmm15
  1460. subps %xmm15, %xmm1
  1461. pshufd $0x55, %xmm8, %xmm15
  1462. mulps %xmm4, %xmm15
  1463. subps %xmm15, %xmm5
  1464. pshufd $0xaa, %xmm8, %xmm15
  1465. mulps %xmm0, %xmm15
  1466. subps %xmm15, %xmm2
  1467. pshufd $0xaa, %xmm8, %xmm15
  1468. mulps %xmm4, %xmm15
  1469. subps %xmm15, %xmm6
  1470. pshufd $0xff, %xmm8, %xmm15
  1471. mulps %xmm0, %xmm15
  1472. subps %xmm15, %xmm3
  1473. pshufd $0xff, %xmm8, %xmm15
  1474. mulps %xmm4, %xmm15
  1475. subps %xmm15, %xmm7
  1476. movaps -28 * SIZE(AO), %xmm8
  1477. pshufd $0x55, %xmm8, %xmm15
  1478. mulps %xmm15, %xmm1
  1479. mulps %xmm15, %xmm5
  1480. pshufd $0xaa, %xmm8, %xmm15
  1481. mulps %xmm1, %xmm15
  1482. subps %xmm15, %xmm2
  1483. pshufd $0xaa, %xmm8, %xmm15
  1484. mulps %xmm5, %xmm15
  1485. subps %xmm15, %xmm6
  1486. pshufd $0xff, %xmm8, %xmm15
  1487. mulps %xmm1, %xmm15
  1488. subps %xmm15, %xmm3
  1489. pshufd $0xff, %xmm8, %xmm15
  1490. mulps %xmm5, %xmm15
  1491. subps %xmm15, %xmm7
  1492. movaps -24 * SIZE(AO), %xmm8
  1493. pshufd $0xaa, %xmm8, %xmm15
  1494. mulps %xmm15, %xmm2
  1495. mulps %xmm15, %xmm6
  1496. pshufd $0xff, %xmm8, %xmm15
  1497. mulps %xmm2, %xmm15
  1498. subps %xmm15, %xmm3
  1499. pshufd $0xff, %xmm8, %xmm15
  1500. mulps %xmm6, %xmm15
  1501. subps %xmm15, %xmm7
  1502. movaps -20 * SIZE(AO), %xmm8
  1503. pshufd $0xff, %xmm8, %xmm15
  1504. mulps %xmm15, %xmm3
  1505. mulps %xmm15, %xmm7
  1506. #endif
  1507. #ifdef RN
  1508. movaps -32 * SIZE(BO), %xmm8
  1509. pshufd $0x00, %xmm8, %xmm15
  1510. mulps %xmm15, %xmm0
  1511. pshufd $0x55, %xmm8, %xmm15
  1512. mulps %xmm0, %xmm15
  1513. subps %xmm15, %xmm1
  1514. pshufd $0xaa, %xmm8, %xmm15
  1515. mulps %xmm0, %xmm15
  1516. subps %xmm15, %xmm2
  1517. pshufd $0xff, %xmm8, %xmm15
  1518. mulps %xmm0, %xmm15
  1519. subps %xmm15, %xmm3
  1520. movaps -28 * SIZE(BO), %xmm8
  1521. pshufd $0x00, %xmm8, %xmm15
  1522. mulps %xmm0, %xmm15
  1523. subps %xmm15, %xmm4
  1524. pshufd $0x55, %xmm8, %xmm15
  1525. mulps %xmm0, %xmm15
  1526. subps %xmm15, %xmm5
  1527. pshufd $0xaa, %xmm8, %xmm15
  1528. mulps %xmm0, %xmm15
  1529. subps %xmm15, %xmm6
  1530. pshufd $0xff, %xmm8, %xmm15
  1531. mulps %xmm0, %xmm15
  1532. subps %xmm15, %xmm7
  1533. movaps -24 * SIZE(BO), %xmm8
  1534. pshufd $0x55, %xmm8, %xmm15
  1535. mulps %xmm15, %xmm1
  1536. pshufd $0xaa, %xmm8, %xmm15
  1537. mulps %xmm1, %xmm15
  1538. subps %xmm15, %xmm2
  1539. pshufd $0xff, %xmm8, %xmm15
  1540. mulps %xmm1, %xmm15
  1541. subps %xmm15, %xmm3
  1542. movaps -20 * SIZE(BO), %xmm8
  1543. pshufd $0x00, %xmm8, %xmm15
  1544. mulps %xmm1, %xmm15
  1545. subps %xmm15, %xmm4
  1546. pshufd $0x55, %xmm8, %xmm15
  1547. mulps %xmm1, %xmm15
  1548. subps %xmm15, %xmm5
  1549. pshufd $0xaa, %xmm8, %xmm15
  1550. mulps %xmm1, %xmm15
  1551. subps %xmm15, %xmm6
  1552. pshufd $0xff, %xmm8, %xmm15
  1553. mulps %xmm1, %xmm15
  1554. subps %xmm15, %xmm7
  1555. movaps -16 * SIZE(BO), %xmm8
  1556. pshufd $0xaa, %xmm8, %xmm15
  1557. mulps %xmm15, %xmm2
  1558. pshufd $0xff, %xmm8, %xmm15
  1559. mulps %xmm2, %xmm15
  1560. subps %xmm15, %xmm3
  1561. movaps -12 * SIZE(BO), %xmm8
  1562. pshufd $0x00, %xmm8, %xmm15
  1563. mulps %xmm2, %xmm15
  1564. subps %xmm15, %xmm4
  1565. pshufd $0x55, %xmm8, %xmm15
  1566. mulps %xmm2, %xmm15
  1567. subps %xmm15, %xmm5
  1568. pshufd $0xaa, %xmm8, %xmm15
  1569. mulps %xmm2, %xmm15
  1570. subps %xmm15, %xmm6
  1571. pshufd $0xff, %xmm8, %xmm15
  1572. mulps %xmm2, %xmm15
  1573. subps %xmm15, %xmm7
  1574. movaps -8 * SIZE(BO), %xmm8
  1575. pshufd $0xff, %xmm8, %xmm15
  1576. mulps %xmm15, %xmm3
  1577. movaps -4 * SIZE(BO), %xmm8
  1578. pshufd $0x00, %xmm8, %xmm15
  1579. mulps %xmm3, %xmm15
  1580. subps %xmm15, %xmm4
  1581. pshufd $0x55, %xmm8, %xmm15
  1582. mulps %xmm3, %xmm15
  1583. subps %xmm15, %xmm5
  1584. pshufd $0xaa, %xmm8, %xmm15
  1585. mulps %xmm3, %xmm15
  1586. subps %xmm15, %xmm6
  1587. pshufd $0xff, %xmm8, %xmm15
  1588. mulps %xmm3, %xmm15
  1589. subps %xmm15, %xmm7
  1590. movaps 4 * SIZE(BO), %xmm8
  1591. pshufd $0x00, %xmm8, %xmm15
  1592. mulps %xmm15, %xmm4
  1593. pshufd $0x55, %xmm8, %xmm15
  1594. mulps %xmm4, %xmm15
  1595. subps %xmm15, %xmm5
  1596. pshufd $0xaa, %xmm8, %xmm15
  1597. mulps %xmm4, %xmm15
  1598. subps %xmm15, %xmm6
  1599. pshufd $0xff, %xmm8, %xmm15
  1600. mulps %xmm4, %xmm15
  1601. subps %xmm15, %xmm7
  1602. movaps 12 * SIZE(BO), %xmm8
  1603. pshufd $0x55, %xmm8, %xmm15
  1604. mulps %xmm15, %xmm5
  1605. pshufd $0xaa, %xmm8, %xmm15
  1606. mulps %xmm5, %xmm15
  1607. subps %xmm15, %xmm6
  1608. pshufd $0xff, %xmm8, %xmm15
  1609. mulps %xmm5, %xmm15
  1610. subps %xmm15, %xmm7
  1611. movaps 20 * SIZE(BO), %xmm8
  1612. pshufd $0xaa, %xmm8, %xmm15
  1613. mulps %xmm15, %xmm6
  1614. pshufd $0xff, %xmm8, %xmm15
  1615. mulps %xmm6, %xmm15
  1616. subps %xmm15, %xmm7
  1617. movaps 28 * SIZE(BO), %xmm8
  1618. pshufd $0xff, %xmm8, %xmm15
  1619. mulps %xmm15, %xmm7
  1620. #endif
  1621. #ifdef RT
  1622. movaps 28 * SIZE(BO), %xmm8
  1623. pshufd $0xff, %xmm8, %xmm15
  1624. mulps %xmm15, %xmm7
  1625. pshufd $0xaa, %xmm8, %xmm15
  1626. mulps %xmm7, %xmm15
  1627. subps %xmm15, %xmm6
  1628. pshufd $0x55, %xmm8, %xmm15
  1629. mulps %xmm7, %xmm15
  1630. subps %xmm15, %xmm5
  1631. pshufd $0x00, %xmm8, %xmm15
  1632. mulps %xmm7, %xmm15
  1633. subps %xmm15, %xmm4
  1634. movaps 24 * SIZE(BO), %xmm8
  1635. pshufd $0xff, %xmm8, %xmm15
  1636. mulps %xmm7, %xmm15
  1637. subps %xmm15, %xmm3
  1638. pshufd $0xaa, %xmm8, %xmm15
  1639. mulps %xmm7, %xmm15
  1640. subps %xmm15, %xmm2
  1641. pshufd $0x55, %xmm8, %xmm15
  1642. mulps %xmm7, %xmm15
  1643. subps %xmm15, %xmm1
  1644. pshufd $0x00, %xmm8, %xmm15
  1645. mulps %xmm7, %xmm15
  1646. subps %xmm15, %xmm0
  1647. movaps 20 * SIZE(BO), %xmm8
  1648. pshufd $0xaa, %xmm8, %xmm15
  1649. mulps %xmm15, %xmm6
  1650. pshufd $0x55, %xmm8, %xmm15
  1651. mulps %xmm6, %xmm15
  1652. subps %xmm15, %xmm5
  1653. pshufd $0x00, %xmm8, %xmm15
  1654. mulps %xmm6, %xmm15
  1655. subps %xmm15, %xmm4
  1656. movaps 16 * SIZE(BO), %xmm8
  1657. pshufd $0xff, %xmm8, %xmm15
  1658. mulps %xmm6, %xmm15
  1659. subps %xmm15, %xmm3
  1660. pshufd $0xaa, %xmm8, %xmm15
  1661. mulps %xmm6, %xmm15
  1662. subps %xmm15, %xmm2
  1663. pshufd $0x55, %xmm8, %xmm15
  1664. mulps %xmm6, %xmm15
  1665. subps %xmm15, %xmm1
  1666. pshufd $0x00, %xmm8, %xmm15
  1667. mulps %xmm6, %xmm15
  1668. subps %xmm15, %xmm0
  1669. movaps 12 * SIZE(BO), %xmm8
  1670. pshufd $0x55, %xmm8, %xmm15
  1671. mulps %xmm15, %xmm5
  1672. pshufd $0x00, %xmm8, %xmm15
  1673. mulps %xmm5, %xmm15
  1674. subps %xmm15, %xmm4
  1675. movaps 8 * SIZE(BO), %xmm8
  1676. pshufd $0xff, %xmm8, %xmm15
  1677. mulps %xmm5, %xmm15
  1678. subps %xmm15, %xmm3
  1679. pshufd $0xaa, %xmm8, %xmm15
  1680. mulps %xmm5, %xmm15
  1681. subps %xmm15, %xmm2
  1682. pshufd $0x55, %xmm8, %xmm15
  1683. mulps %xmm5, %xmm15
  1684. subps %xmm15, %xmm1
  1685. pshufd $0x00, %xmm8, %xmm15
  1686. mulps %xmm5, %xmm15
  1687. subps %xmm15, %xmm0
  1688. movaps 4 * SIZE(BO), %xmm8
  1689. pshufd $0x00, %xmm8, %xmm15
  1690. mulps %xmm15, %xmm4
  1691. movaps 0 * SIZE(BO), %xmm8
  1692. pshufd $0xff, %xmm8, %xmm15
  1693. mulps %xmm4, %xmm15
  1694. subps %xmm15, %xmm3
  1695. pshufd $0xaa, %xmm8, %xmm15
  1696. mulps %xmm4, %xmm15
  1697. subps %xmm15, %xmm2
  1698. pshufd $0x55, %xmm8, %xmm15
  1699. mulps %xmm4, %xmm15
  1700. subps %xmm15, %xmm1
  1701. pshufd $0x00, %xmm8, %xmm15
  1702. mulps %xmm4, %xmm15
  1703. subps %xmm15, %xmm0
  1704. movaps -8 * SIZE(BO), %xmm8
  1705. pshufd $0xff, %xmm8, %xmm15
  1706. mulps %xmm15, %xmm3
  1707. pshufd $0xaa, %xmm8, %xmm15
  1708. mulps %xmm3, %xmm15
  1709. subps %xmm15, %xmm2
  1710. pshufd $0x55, %xmm8, %xmm15
  1711. mulps %xmm3, %xmm15
  1712. subps %xmm15, %xmm1
  1713. pshufd $0x00, %xmm8, %xmm15
  1714. mulps %xmm3, %xmm15
  1715. subps %xmm15, %xmm0
  1716. movaps -16 * SIZE(BO), %xmm8
  1717. pshufd $0xaa, %xmm8, %xmm15
  1718. mulps %xmm15, %xmm2
  1719. pshufd $0x55, %xmm8, %xmm15
  1720. mulps %xmm2, %xmm15
  1721. subps %xmm15, %xmm1
  1722. pshufd $0x00, %xmm8, %xmm15
  1723. mulps %xmm2, %xmm15
  1724. subps %xmm15, %xmm0
  1725. movaps -24 * SIZE(BO), %xmm8
  1726. pshufd $0x55, %xmm8, %xmm15
  1727. mulps %xmm15, %xmm1
  1728. pshufd $0x00, %xmm8, %xmm15
  1729. mulps %xmm1, %xmm15
  1730. subps %xmm15, %xmm0
  1731. movaps -32 * SIZE(BO), %xmm8
  1732. pshufd $0x00, %xmm8, %xmm15
  1733. mulps %xmm15, %xmm0
  1734. #endif
  1735. #ifdef LN
  1736. subq $4 * SIZE, CO1
  1737. subq $4 * SIZE, CO2
  1738. #endif
  1739. #if defined(LN) || defined(LT)
  1740. movaps %xmm0, -32 * SIZE(BO)
  1741. movaps %xmm4, -28 * SIZE(BO)
  1742. movaps %xmm1, -24 * SIZE(BO)
  1743. movaps %xmm5, -20 * SIZE(BO)
  1744. movaps %xmm2, -16 * SIZE(BO)
  1745. movaps %xmm6, -12 * SIZE(BO)
  1746. movaps %xmm3, -8 * SIZE(BO)
  1747. movaps %xmm7, -4 * SIZE(BO)
  1748. movaps %xmm0, %xmm8
  1749. shufps $0x88, %xmm1, %xmm0
  1750. shufps $0xdd, %xmm8, %xmm1
  1751. movaps %xmm2, %xmm9
  1752. shufps $0x88, %xmm3, %xmm2
  1753. shufps $0xdd, %xmm9, %xmm3
  1754. movaps %xmm0, %xmm8
  1755. shufps $0x88, %xmm2, %xmm0
  1756. movaps %xmm1, %xmm9
  1757. shufps $0x22, %xmm3, %xmm1
  1758. shufps $0xdd, %xmm2, %xmm8
  1759. movaps %xmm8, %xmm2
  1760. shufps $0x77, %xmm3, %xmm9
  1761. movaps %xmm9, %xmm3
  1762. movaps %xmm4, %xmm8
  1763. shufps $0x88, %xmm5, %xmm4
  1764. shufps $0xdd, %xmm8, %xmm5
  1765. movaps %xmm6, %xmm9
  1766. shufps $0x88, %xmm7, %xmm6
  1767. shufps $0xdd, %xmm9, %xmm7
  1768. movaps %xmm4, %xmm8
  1769. shufps $0x88, %xmm6, %xmm4
  1770. movaps %xmm5, %xmm9
  1771. shufps $0x22, %xmm7, %xmm5
  1772. shufps $0xdd, %xmm6, %xmm8
  1773. movaps %xmm8, %xmm6
  1774. shufps $0x77, %xmm7, %xmm9
  1775. movaps %xmm9, %xmm7
  1776. #else
  1777. movaps %xmm0, -32 * SIZE(AO)
  1778. movaps %xmm1, -28 * SIZE(AO)
  1779. movaps %xmm2, -24 * SIZE(AO)
  1780. movaps %xmm3, -20 * SIZE(AO)
  1781. movaps %xmm4, -16 * SIZE(AO)
  1782. movaps %xmm5, -12 * SIZE(AO)
  1783. movaps %xmm6, -8 * SIZE(AO)
  1784. movaps %xmm7, -4 * SIZE(AO)
  1785. #endif
  1786. leaq (LDC, LDC, 2), %rax
  1787. movsd %xmm0, 0 * SIZE(CO1)
  1788. movhps %xmm0, 2 * SIZE(CO1)
  1789. movsd %xmm1, 0 * SIZE(CO1, LDC, 1)
  1790. movhps %xmm1, 2 * SIZE(CO1, LDC, 1)
  1791. movsd %xmm2, 0 * SIZE(CO1, LDC, 2)
  1792. movhps %xmm2, 2 * SIZE(CO1, LDC, 2)
  1793. movsd %xmm3, 0 * SIZE(CO1, %rax, 1)
  1794. movhps %xmm3, 2 * SIZE(CO1, %rax, 1)
  1795. movsd %xmm4, 0 * SIZE(CO2)
  1796. movhps %xmm4, 2 * SIZE(CO2)
  1797. movsd %xmm5, 0 * SIZE(CO2, LDC, 1)
  1798. movhps %xmm5, 2 * SIZE(CO2, LDC, 1)
  1799. movsd %xmm6, 0 * SIZE(CO2, LDC, 2)
  1800. movhps %xmm6, 2 * SIZE(CO2, LDC, 2)
  1801. movsd %xmm7, 0 * SIZE(CO2, %rax, 1)
  1802. movhps %xmm7, 2 * SIZE(CO2, %rax, 1)
  1803. #ifndef LN
  1804. addq $4 * SIZE, CO1
  1805. addq $4 * SIZE, CO2
  1806. #endif
  1807. #if defined(LT) || defined(RN)
  1808. movq K, %rax
  1809. subq KK, %rax
  1810. leaq (,%rax, SIZE), %rax
  1811. leaq (AO, %rax, 4), AO
  1812. leaq (BO, %rax, 8), BO
  1813. #endif
  1814. #ifdef LN
  1815. subq $4, KK
  1816. #endif
  1817. #ifdef LT
  1818. addq $4, KK
  1819. #endif
  1820. #ifdef RT
  1821. movq K, %rax
  1822. salq $2 + BASE_SHIFT, %rax
  1823. addq %rax, AORIG
  1824. #endif
  1825. decq I
  1826. BRANCH
  1827. jg .L11
  1828. ALIGN_4
  1829. .L39:
  1830. #ifdef LN
  1831. leaq (, K, SIZE), %rax
  1832. leaq (B, %rax, 8), B
  1833. #endif
  1834. #if defined(LT) || defined(RN)
  1835. movq BO, B
  1836. #endif
  1837. #ifdef RN
  1838. addq $8, KK
  1839. #endif
  1840. #ifdef RT
  1841. subq $8, KK
  1842. #endif
  1843. subq $1, J
  1844. BRANCH
  1845. jg .L10
  1846. ALIGN_4
  1847. .L40:
  1848. testq $4, N
  1849. jle .L70
  1850. #if defined(LT) || defined(RN)
  1851. movq A, AO
  1852. #else
  1853. movq A, AORIG
  1854. #endif
  1855. #ifdef RT
  1856. movq K, %rax
  1857. salq $2 + BASE_SHIFT, %rax
  1858. subq %rax, B
  1859. leaq (, LDC, 4), %rax
  1860. subq %rax, C
  1861. #endif
  1862. movq C, CO1
  1863. leaq (C, LDC, 2), CO2
  1864. #ifndef RT
  1865. leaq (C, LDC, 4), C
  1866. #endif
  1867. #ifdef LN
  1868. movq OFFSET, %rax
  1869. addq M, %rax
  1870. movq %rax, KK
  1871. #endif
  1872. #ifdef LT
  1873. movq OFFSET, %rax
  1874. movq %rax, KK
  1875. #endif
  1876. testq $1, M
  1877. BRANCH
  1878. jle .L50
  1879. #ifdef LN
  1880. movq K, %rax
  1881. salq $BASE_SHIFT, %rax
  1882. subq %rax, AORIG
  1883. #endif
  1884. #if defined(LN) || defined(RT)
  1885. movq KK, %rax
  1886. leaq (, %rax, SIZE), %rax
  1887. movq AORIG, AO
  1888. leaq (AO, %rax, 1), AO
  1889. leaq (B, %rax, 4), BO
  1890. #else
  1891. movq B, BO
  1892. #endif
  1893. xorps %xmm2, %xmm2
  1894. movsd -32 * SIZE(AO), %xmm0
  1895. xorps %xmm8, %xmm8
  1896. xorps %xmm9, %xmm9
  1897. #if defined(LT) || defined(RN)
  1898. movq KK, %rax
  1899. #else
  1900. movq K, %rax
  1901. subq KK, %rax
  1902. #endif
  1903. sarq $2, %rax
  1904. NOBRANCH
  1905. jle .L65
  1906. ALIGN_3
  1907. .L62:
  1908. pshufd $0x00, %xmm0, %xmm1
  1909. addps %xmm2, %xmm8
  1910. movaps -32 * SIZE(BO), %xmm2
  1911. mulps %xmm1, %xmm2
  1912. pshufd $0x55, %xmm0, %xmm1
  1913. movsd -30 * SIZE(AO), %xmm0
  1914. addps %xmm2, %xmm9
  1915. movaps -28 * SIZE(BO), %xmm2
  1916. mulps %xmm1, %xmm2
  1917. pshufd $0x00, %xmm0, %xmm1
  1918. addps %xmm2, %xmm8
  1919. movaps -24 * SIZE(BO), %xmm2
  1920. mulps %xmm1, %xmm2
  1921. pshufd $0x55, %xmm0, %xmm1
  1922. movsd -28 * SIZE(AO), %xmm0
  1923. addps %xmm2, %xmm9
  1924. movaps -20 * SIZE(BO), %xmm2
  1925. mulps %xmm1, %xmm2
  1926. subq $-16 * SIZE, BO
  1927. subq $ -4 * SIZE, AO
  1928. subq $1, %rax
  1929. BRANCH
  1930. jg .L62
  1931. addps %xmm9, %xmm8
  1932. ALIGN_3
  1933. .L65:
  1934. #if defined(LT) || defined(RN)
  1935. movq KK, %rax
  1936. #else
  1937. movq K, %rax
  1938. subq KK, %rax
  1939. #endif
  1940. andq $3, %rax # if (k & 1)
  1941. BRANCH
  1942. je .L68
  1943. ALIGN_3
  1944. .L66:
  1945. pshufd $0x00, %xmm0, %xmm1
  1946. movss -31 * SIZE(AO), %xmm0
  1947. addps %xmm2, %xmm8
  1948. movaps -32 * SIZE(BO), %xmm2
  1949. mulps %xmm1, %xmm2
  1950. addq $1 * SIZE, AO
  1951. addq $4 * SIZE, BO
  1952. subq $1, %rax
  1953. BRANCH
  1954. jg .L66
  1955. ALIGN_3
  1956. .L68:
  1957. #if defined(LN) || defined(RT)
  1958. movq KK, %rax
  1959. #ifdef LN
  1960. subq $1, %rax
  1961. #else
  1962. subq $4, %rax
  1963. #endif
  1964. leaq (, %rax, SIZE), %rax
  1965. movq AORIG, AO
  1966. leaq (AO, %rax, 1), AO
  1967. leaq (B, %rax, 4), BO
  1968. #endif
  1969. addps %xmm2, %xmm8
  1970. #if defined(LN) || defined(LT)
  1971. movaps -32 * SIZE(BO), %xmm0
  1972. subps %xmm8, %xmm0
  1973. #else
  1974. movsd -32 * SIZE(AO), %xmm0
  1975. movhps -30 * SIZE(AO), %xmm0
  1976. subps %xmm8, %xmm0
  1977. pshufd $0xff, %xmm0, %xmm3
  1978. pshufd $0xaa, %xmm0, %xmm2
  1979. pshufd $0x55, %xmm0, %xmm1
  1980. pshufd $0x00, %xmm0, %xmm0
  1981. #endif
  1982. #if defined(LN) || defined(LT)
  1983. movaps -32 * SIZE(AO), %xmm8
  1984. pshufd $0x00, %xmm8, %xmm15
  1985. mulps %xmm15, %xmm0
  1986. #endif
  1987. #ifdef RN
  1988. movaps -32 * SIZE(BO), %xmm8
  1989. pshufd $0x00, %xmm8, %xmm15
  1990. mulss %xmm15, %xmm0
  1991. pshufd $0x55, %xmm8, %xmm15
  1992. mulss %xmm0, %xmm15
  1993. subss %xmm15, %xmm1
  1994. pshufd $0xaa, %xmm8, %xmm15
  1995. mulss %xmm0, %xmm15
  1996. subss %xmm15, %xmm2
  1997. pshufd $0xff, %xmm8, %xmm15
  1998. mulss %xmm0, %xmm15
  1999. subss %xmm15, %xmm3
  2000. movaps -28 * SIZE(BO), %xmm8
  2001. pshufd $0x55, %xmm8, %xmm15
  2002. mulss %xmm15, %xmm1
  2003. pshufd $0xaa, %xmm8, %xmm15
  2004. mulss %xmm1, %xmm15
  2005. subss %xmm15, %xmm2
  2006. pshufd $0xff, %xmm8, %xmm15
  2007. mulss %xmm1, %xmm15
  2008. subss %xmm15, %xmm3
  2009. movaps -24 * SIZE(BO), %xmm8
  2010. pshufd $0xaa, %xmm8, %xmm15
  2011. mulss %xmm15, %xmm2
  2012. pshufd $0xff, %xmm8, %xmm15
  2013. mulss %xmm2, %xmm15
  2014. subss %xmm15, %xmm3
  2015. movaps -20 * SIZE(BO), %xmm8
  2016. pshufd $0xff, %xmm8, %xmm15
  2017. mulss %xmm15, %xmm3
  2018. #endif
  2019. #ifdef RT
  2020. movaps -20 * SIZE(BO), %xmm8
  2021. pshufd $0xff, %xmm8, %xmm15
  2022. mulss %xmm15, %xmm3
  2023. pshufd $0xaa, %xmm8, %xmm15
  2024. mulss %xmm3, %xmm15
  2025. subss %xmm15, %xmm2
  2026. pshufd $0x55, %xmm8, %xmm15
  2027. mulss %xmm3, %xmm15
  2028. subss %xmm15, %xmm1
  2029. pshufd $0x00, %xmm8, %xmm15
  2030. mulss %xmm3, %xmm15
  2031. subss %xmm15, %xmm0
  2032. movaps -24 * SIZE(BO), %xmm8
  2033. pshufd $0xaa, %xmm8, %xmm15
  2034. mulss %xmm15, %xmm2
  2035. pshufd $0x55, %xmm8, %xmm15
  2036. mulss %xmm2, %xmm15
  2037. subss %xmm15, %xmm1
  2038. pshufd $0x00, %xmm8, %xmm15
  2039. mulss %xmm2, %xmm15
  2040. subss %xmm15, %xmm0
  2041. movaps -28 * SIZE(BO), %xmm8
  2042. pshufd $0x55, %xmm8, %xmm15
  2043. mulss %xmm15, %xmm1
  2044. pshufd $0x00, %xmm8, %xmm15
  2045. mulss %xmm1, %xmm15
  2046. subss %xmm15, %xmm0
  2047. movaps -32 * SIZE(BO), %xmm8
  2048. pshufd $0x00, %xmm8, %xmm15
  2049. mulss %xmm15, %xmm0
  2050. #endif
  2051. #ifdef LN
  2052. subq $1 * SIZE, CO1
  2053. subq $1 * SIZE, CO2
  2054. #endif
  2055. #if defined(LN) || defined(LT)
  2056. movaps %xmm0, -32 * SIZE(BO)
  2057. pshufd $0xff, %xmm0, %xmm3
  2058. pshufd $0xaa, %xmm0, %xmm2
  2059. pshufd $0x55, %xmm0, %xmm1
  2060. pshufd $0x00, %xmm0, %xmm0
  2061. #else
  2062. unpcklps %xmm1, %xmm0
  2063. unpcklps %xmm3, %xmm2
  2064. movlps %xmm0, -32 * SIZE(AO)
  2065. movlps %xmm2, -30 * SIZE(AO)
  2066. #endif
  2067. movss %xmm0, (CO1)
  2068. movss %xmm1, (CO1, LDC, 1)
  2069. movss %xmm2, (CO2)
  2070. movss %xmm3, (CO2, LDC, 1)
  2071. #ifndef LN
  2072. addq $1 * SIZE, CO1
  2073. addq $1 * SIZE, CO2
  2074. #endif
  2075. #if defined(LT) || defined(RN)
  2076. movq K, %rax
  2077. subq KK, %rax
  2078. leaq (,%rax, SIZE), %rax
  2079. leaq (AO, %rax, 1), AO
  2080. leaq (BO, %rax, 4), BO
  2081. #endif
  2082. #ifdef LN
  2083. subq $1, KK
  2084. #endif
  2085. #ifdef LT
  2086. addq $1, KK
  2087. #endif
  2088. #ifdef RT
  2089. movq K, %rax
  2090. salq $BASE_SHIFT, %rax
  2091. addq %rax, AORIG
  2092. #endif
  2093. ALIGN_4
  2094. .L50:
  2095. testq $2, M
  2096. BRANCH
  2097. jle .L60
  2098. #ifdef LN
  2099. movq K, %rax
  2100. salq $1 + BASE_SHIFT, %rax
  2101. subq %rax, AORIG
  2102. #endif
  2103. #if defined(LN) || defined(RT)
  2104. movq KK, %rax
  2105. leaq (, %rax, SIZE), %rax
  2106. movq AORIG, AO
  2107. leaq (AO, %rax, 2), AO
  2108. leaq (B, %rax, 4), BO
  2109. #else
  2110. movq B, BO
  2111. #endif
  2112. xorps %xmm1, %xmm1
  2113. movddup -32 * SIZE(AO), %xmm0
  2114. xorps %xmm2, %xmm2
  2115. movaps -32 * SIZE(BO), %xmm5
  2116. xorps %xmm8, %xmm8
  2117. xorps %xmm9, %xmm9
  2118. #if defined(LT) || defined(RN)
  2119. movq KK, %rax
  2120. #else
  2121. movq K, %rax
  2122. subq KK, %rax
  2123. #endif
  2124. sarq $2, %rax
  2125. NOBRANCH
  2126. jle .L55
  2127. ALIGN_3
  2128. .L52:
  2129. addps %xmm1, %xmm8
  2130. pshufd $0x50, %xmm5, %xmm1
  2131. mulps %xmm0, %xmm1
  2132. addps %xmm2, %xmm9
  2133. pshufd $0xfa, %xmm5, %xmm2
  2134. movaps -28 * SIZE(BO), %xmm5
  2135. mulps %xmm0, %xmm2
  2136. movddup -30 * SIZE(AO), %xmm0
  2137. addps %xmm1, %xmm8
  2138. pshufd $0x50, %xmm5, %xmm1
  2139. mulps %xmm0, %xmm1
  2140. addps %xmm2, %xmm9
  2141. pshufd $0xfa, %xmm5, %xmm2
  2142. movaps -24 * SIZE(BO), %xmm5
  2143. mulps %xmm0, %xmm2
  2144. movddup -28 * SIZE(AO), %xmm0
  2145. addps %xmm1, %xmm8
  2146. pshufd $0x50, %xmm5, %xmm1
  2147. mulps %xmm0, %xmm1
  2148. addps %xmm2, %xmm9
  2149. pshufd $0xfa, %xmm5, %xmm2
  2150. movaps -20 * SIZE(BO), %xmm5
  2151. mulps %xmm0, %xmm2
  2152. movddup -26 * SIZE(AO), %xmm0
  2153. addps %xmm1, %xmm8
  2154. pshufd $0x50, %xmm5, %xmm1
  2155. mulps %xmm0, %xmm1
  2156. addps %xmm2, %xmm9
  2157. pshufd $0xfa, %xmm5, %xmm2
  2158. movaps -16 * SIZE(BO), %xmm5
  2159. mulps %xmm0, %xmm2
  2160. movddup -24 * SIZE(AO), %xmm0
  2161. subq $-16 * SIZE, BO
  2162. subq $ -8 * SIZE, AO
  2163. subq $1, %rax
  2164. BRANCH
  2165. jg .L52
  2166. ALIGN_3
  2167. .L55:
  2168. #if defined(LT) || defined(RN)
  2169. movq KK, %rax
  2170. #else
  2171. movq K, %rax
  2172. subq KK, %rax
  2173. #endif
  2174. andq $3, %rax # if (k & 1)
  2175. BRANCH
  2176. je .L58
  2177. ALIGN_3
  2178. .L56:
  2179. addps %xmm1, %xmm8
  2180. pshufd $0x50, %xmm5, %xmm1
  2181. mulps %xmm0, %xmm1
  2182. addps %xmm2, %xmm9
  2183. pshufd $0xfa, %xmm5, %xmm2
  2184. movaps -28 * SIZE(BO), %xmm5
  2185. mulps %xmm0, %xmm2
  2186. movddup -30 * SIZE(AO), %xmm0
  2187. addq $2 * SIZE, AO
  2188. addq $4 * SIZE, BO
  2189. subq $1, %rax
  2190. BRANCH
  2191. jg .L56
  2192. ALIGN_3
  2193. .L58:
  2194. #if defined(LN) || defined(RT)
  2195. movq KK, %rax
  2196. #ifdef LN
  2197. subq $2, %rax
  2198. #else
  2199. subq $4, %rax
  2200. #endif
  2201. leaq (, %rax, SIZE), %rax
  2202. movq AORIG, AO
  2203. leaq (AO, %rax, 2), AO
  2204. leaq (B, %rax, 4), BO
  2205. #endif
  2206. addps %xmm1, %xmm8
  2207. addps %xmm2, %xmm9
  2208. #if defined(LN) || defined(LT)
  2209. movaps %xmm8, %xmm4
  2210. shufps $0x88, %xmm9, %xmm8
  2211. shufps $0xdd, %xmm9, %xmm4
  2212. movaps -32 * SIZE(BO), %xmm0
  2213. movaps -28 * SIZE(BO), %xmm1
  2214. subps %xmm8, %xmm0
  2215. subps %xmm4, %xmm1
  2216. #else
  2217. movaps -32 * SIZE(AO), %xmm0
  2218. movaps -28 * SIZE(AO), %xmm2
  2219. subps %xmm8, %xmm0
  2220. subps %xmm9, %xmm2
  2221. movhlps %xmm0, %xmm1
  2222. movhlps %xmm2, %xmm3
  2223. #endif
  2224. #ifdef LN
  2225. movaps -32 * SIZE(AO), %xmm8
  2226. pshufd $0xff, %xmm8, %xmm15
  2227. mulps %xmm15, %xmm1
  2228. pshufd $0xaa, %xmm8, %xmm15
  2229. mulps %xmm1, %xmm15
  2230. subps %xmm15, %xmm0
  2231. pshufd $0x00, %xmm8, %xmm15
  2232. mulps %xmm15, %xmm0
  2233. #endif
  2234. #ifdef LT
  2235. movaps -32 * SIZE(AO), %xmm8
  2236. pshufd $0x00, %xmm8, %xmm15
  2237. mulps %xmm15, %xmm0
  2238. pshufd $0x55, %xmm8, %xmm15
  2239. mulps %xmm0, %xmm15
  2240. subps %xmm15, %xmm1
  2241. pshufd $0xff, %xmm8, %xmm15
  2242. mulps %xmm15, %xmm1
  2243. #endif
  2244. #ifdef RN
  2245. movaps -32 * SIZE(BO), %xmm8
  2246. pshufd $0x00, %xmm8, %xmm15
  2247. mulps %xmm15, %xmm0
  2248. pshufd $0x55, %xmm8, %xmm15
  2249. mulps %xmm0, %xmm15
  2250. subps %xmm15, %xmm1
  2251. pshufd $0xaa, %xmm8, %xmm15
  2252. mulps %xmm0, %xmm15
  2253. subps %xmm15, %xmm2
  2254. pshufd $0xff, %xmm8, %xmm15
  2255. mulps %xmm0, %xmm15
  2256. subps %xmm15, %xmm3
  2257. movaps -28 * SIZE(BO), %xmm8
  2258. pshufd $0x55, %xmm8, %xmm15
  2259. mulps %xmm15, %xmm1
  2260. pshufd $0xaa, %xmm8, %xmm15
  2261. mulps %xmm1, %xmm15
  2262. subps %xmm15, %xmm2
  2263. pshufd $0xff, %xmm8, %xmm15
  2264. mulps %xmm1, %xmm15
  2265. subps %xmm15, %xmm3
  2266. movaps -24 * SIZE(BO), %xmm8
  2267. pshufd $0xaa, %xmm8, %xmm15
  2268. mulps %xmm15, %xmm2
  2269. pshufd $0xff, %xmm8, %xmm15
  2270. mulps %xmm2, %xmm15
  2271. subps %xmm15, %xmm3
  2272. movaps -20 * SIZE(BO), %xmm8
  2273. pshufd $0xff, %xmm8, %xmm15
  2274. mulps %xmm15, %xmm3
  2275. #endif
  2276. #ifdef RT
  2277. movaps -20 * SIZE(BO), %xmm8
  2278. pshufd $0xff, %xmm8, %xmm15
  2279. mulps %xmm15, %xmm3
  2280. pshufd $0xaa, %xmm8, %xmm15
  2281. mulps %xmm3, %xmm15
  2282. subps %xmm15, %xmm2
  2283. pshufd $0x55, %xmm8, %xmm15
  2284. mulps %xmm3, %xmm15
  2285. subps %xmm15, %xmm1
  2286. pshufd $0x00, %xmm8, %xmm15
  2287. mulps %xmm3, %xmm15
  2288. subps %xmm15, %xmm0
  2289. movaps -24 * SIZE(BO), %xmm8
  2290. pshufd $0xaa, %xmm8, %xmm15
  2291. mulps %xmm15, %xmm2
  2292. pshufd $0x55, %xmm8, %xmm15
  2293. mulps %xmm2, %xmm15
  2294. subps %xmm15, %xmm1
  2295. pshufd $0x00, %xmm8, %xmm15
  2296. mulps %xmm2, %xmm15
  2297. subps %xmm15, %xmm0
  2298. movaps -28 * SIZE(BO), %xmm8
  2299. pshufd $0x55, %xmm8, %xmm15
  2300. mulps %xmm15, %xmm1
  2301. pshufd $0x00, %xmm8, %xmm15
  2302. mulps %xmm1, %xmm15
  2303. subps %xmm15, %xmm0
  2304. movaps -32 * SIZE(BO), %xmm8
  2305. pshufd $0x00, %xmm8, %xmm15
  2306. mulps %xmm15, %xmm0
  2307. #endif
  2308. #ifdef LN
  2309. subq $2 * SIZE, CO1
  2310. subq $2 * SIZE, CO2
  2311. #endif
  2312. leaq (LDC, LDC, 2), %rax
  2313. #if defined(LN) || defined(LT)
  2314. movaps %xmm0, -32 * SIZE(BO)
  2315. movaps %xmm1, -28 * SIZE(BO)
  2316. movaps %xmm0, %xmm4
  2317. unpcklps %xmm1, %xmm0
  2318. unpckhps %xmm1, %xmm4
  2319. movsd %xmm0, (CO1)
  2320. movhps %xmm0, (CO1, LDC, 1)
  2321. movsd %xmm4, (CO2)
  2322. movhps %xmm4, (CO2, LDC, 1)
  2323. #else
  2324. movlhps %xmm1, %xmm0
  2325. movlhps %xmm3, %xmm2
  2326. movaps %xmm0, -32 * SIZE(AO)
  2327. movaps %xmm2, -28 * SIZE(AO)
  2328. movsd %xmm0, (CO1)
  2329. movsd %xmm1, (CO1, LDC, 1)
  2330. movsd %xmm2, (CO2)
  2331. movsd %xmm3, (CO2, LDC, 1)
  2332. #endif
  2333. #ifndef LN
  2334. addq $2 * SIZE, CO1
  2335. addq $2 * SIZE, CO2
  2336. #endif
  2337. #if defined(LT) || defined(RN)
  2338. movq K, %rax
  2339. subq KK, %rax
  2340. leaq (,%rax, SIZE), %rax
  2341. leaq (AO, %rax, 2), AO
  2342. leaq (BO, %rax, 4), BO
  2343. #endif
  2344. #ifdef LN
  2345. subq $2, KK
  2346. #endif
  2347. #ifdef LT
  2348. addq $2, KK
  2349. #endif
  2350. #ifdef RT
  2351. movq K, %rax
  2352. salq $1 + BASE_SHIFT, %rax
  2353. addq %rax, AORIG
  2354. #endif
  2355. ALIGN_4
  2356. .L60:
  2357. movq M, I
  2358. sarq $2, I
  2359. NOBRANCH
  2360. jle .L69
  2361. ALIGN_4
  2362. .L41:
  2363. #ifdef LN
  2364. movq K, %rax
  2365. salq $2 + BASE_SHIFT, %rax
  2366. subq %rax, AORIG
  2367. #endif
  2368. #if defined(LN) || defined(RT)
  2369. movq KK, %rax
  2370. leaq (, %rax, SIZE), %rax
  2371. movq AORIG, AO
  2372. leaq (AO, %rax, 4), AO
  2373. leaq (B, %rax, 4), BO
  2374. #else
  2375. movq B, BO
  2376. #endif
  2377. xorps %xmm1, %xmm1
  2378. movaps -32 * SIZE(AO), %xmm0
  2379. xorps %xmm2, %xmm2
  2380. xorps %xmm3, %xmm3
  2381. xorps %xmm4, %xmm4
  2382. xorps %xmm8, %xmm8
  2383. prefetcht2 -4 * SIZE(CO1)
  2384. xorps %xmm9, %xmm9
  2385. prefetcht2 -4 * SIZE(CO1, LDC, 1)
  2386. xorps %xmm10, %xmm10
  2387. prefetcht2 -4 * SIZE(CO2)
  2388. xorps %xmm11, %xmm11
  2389. prefetcht2 -4 * SIZE(CO2, LDC, 1)
  2390. #if defined(LT) || defined(RN)
  2391. movq KK, %rax
  2392. #else
  2393. movq K, %rax
  2394. subq KK, %rax
  2395. #endif
  2396. sarq $2, %rax
  2397. NOBRANCH
  2398. jle .L45
  2399. ALIGN_3
  2400. .L42:
  2401. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  2402. addps %xmm1, %xmm8
  2403. movaps -32 * SIZE(BO), %xmm1
  2404. addps %xmm2, %xmm9
  2405. pshufd $0x39, %xmm1, %xmm2
  2406. mulps %xmm0, %xmm1
  2407. addps %xmm3, %xmm10
  2408. pshufd $0x39, %xmm2, %xmm3
  2409. mulps %xmm0, %xmm2
  2410. addps %xmm4, %xmm11
  2411. pshufd $0x39, %xmm3, %xmm4
  2412. mulps %xmm0, %xmm3
  2413. mulps %xmm0, %xmm4
  2414. movaps -28 * SIZE(AO), %xmm0
  2415. addps %xmm1, %xmm8
  2416. movaps -28 * SIZE(BO), %xmm1
  2417. addps %xmm2, %xmm9
  2418. pshufd $0x39, %xmm1, %xmm2
  2419. mulps %xmm0, %xmm1
  2420. addps %xmm3, %xmm10
  2421. pshufd $0x39, %xmm2, %xmm3
  2422. mulps %xmm0, %xmm2
  2423. addps %xmm4, %xmm11
  2424. pshufd $0x39, %xmm3, %xmm4
  2425. mulps %xmm0, %xmm3
  2426. mulps %xmm0, %xmm4
  2427. movaps -24 * SIZE(AO), %xmm0
  2428. addps %xmm1, %xmm8
  2429. movaps -24 * SIZE(BO), %xmm1
  2430. addps %xmm2, %xmm9
  2431. pshufd $0x39, %xmm1, %xmm2
  2432. mulps %xmm0, %xmm1
  2433. addps %xmm3, %xmm10
  2434. pshufd $0x39, %xmm2, %xmm3
  2435. mulps %xmm0, %xmm2
  2436. addps %xmm4, %xmm11
  2437. pshufd $0x39, %xmm3, %xmm4
  2438. mulps %xmm0, %xmm3
  2439. mulps %xmm0, %xmm4
  2440. movaps -20 * SIZE(AO), %xmm0
  2441. addps %xmm1, %xmm8
  2442. movaps -20 * SIZE(BO), %xmm1
  2443. addps %xmm2, %xmm9
  2444. pshufd $0x39, %xmm1, %xmm2
  2445. mulps %xmm0, %xmm1
  2446. addps %xmm3, %xmm10
  2447. pshufd $0x39, %xmm2, %xmm3
  2448. mulps %xmm0, %xmm2
  2449. addps %xmm4, %xmm11
  2450. pshufd $0x39, %xmm3, %xmm4
  2451. mulps %xmm0, %xmm3
  2452. mulps %xmm0, %xmm4
  2453. movaps -16 * SIZE(AO), %xmm0
  2454. subq $-16 * SIZE, AO
  2455. subq $-16 * SIZE, BO
  2456. subq $1, %rax
  2457. BRANCH
  2458. jg .L42
  2459. ALIGN_3
  2460. .L45:
  2461. #if defined(LT) || defined(RN)
  2462. movq KK, %rax
  2463. #else
  2464. movq K, %rax
  2465. subq KK, %rax
  2466. #endif
  2467. andq $3, %rax # if (k & 1)
  2468. BRANCH
  2469. je .L48
  2470. ALIGN_3
  2471. .L46:
  2472. addps %xmm1, %xmm8
  2473. movaps -32 * SIZE(BO), %xmm1
  2474. addps %xmm2, %xmm9
  2475. pshufd $0x39, %xmm1, %xmm2
  2476. mulps %xmm0, %xmm1
  2477. addps %xmm3, %xmm10
  2478. pshufd $0x39, %xmm2, %xmm3
  2479. mulps %xmm0, %xmm2
  2480. addps %xmm4, %xmm11
  2481. pshufd $0x39, %xmm3, %xmm4
  2482. mulps %xmm0, %xmm3
  2483. mulps %xmm0, %xmm4
  2484. movaps -28 * SIZE(AO), %xmm0
  2485. addq $4 * SIZE, AO
  2486. addq $4 * SIZE, BO
  2487. subq $1, %rax
  2488. BRANCH
  2489. jg .L46
  2490. ALIGN_3
  2491. .L48:
  2492. #if defined(LN) || defined(RT)
  2493. movq KK, %rax
  2494. #ifdef LN
  2495. subq $4, %rax
  2496. #else
  2497. subq $4, %rax
  2498. #endif
  2499. leaq (, %rax, SIZE), %rax
  2500. movq AORIG, AO
  2501. leaq (AO, %rax, 4), AO
  2502. leaq (B, %rax, 4), BO
  2503. #endif
  2504. addps %xmm1, %xmm8
  2505. addps %xmm2, %xmm9
  2506. addps %xmm3, %xmm10
  2507. addps %xmm4, %xmm11
  2508. #if defined(LN) || defined(LT)
  2509. movaps %xmm8, %xmm4
  2510. shufps $0x88, %xmm9, %xmm8
  2511. movaps %xmm10, %xmm5
  2512. shufps $0x88, %xmm11, %xmm10
  2513. shufps $0xdd, %xmm11, %xmm4
  2514. shufps $0xdd, %xmm9, %xmm5
  2515. movaps %xmm8, %xmm6
  2516. shufps $0x88, %xmm10, %xmm8
  2517. shufps $0xdd, %xmm6, %xmm10
  2518. movaps %xmm4, %xmm9
  2519. movaps %xmm5, %xmm11
  2520. shufps $0x22, %xmm5, %xmm9
  2521. shufps $0x77, %xmm4, %xmm11
  2522. movaps -32 * SIZE(BO), %xmm0
  2523. movaps -28 * SIZE(BO), %xmm1
  2524. movaps -24 * SIZE(BO), %xmm2
  2525. movaps -20 * SIZE(BO), %xmm3
  2526. #else
  2527. movaps %xmm9, %xmm4
  2528. shufps $0xd8, %xmm8, %xmm9
  2529. shufps $0xd8, %xmm11, %xmm8
  2530. shufps $0xd8, %xmm10, %xmm11
  2531. shufps $0xd8, %xmm4, %xmm10
  2532. movaps %xmm8, %xmm4
  2533. shufps $0xd8, %xmm10, %xmm8
  2534. shufps $0xd8, %xmm4, %xmm10
  2535. movaps %xmm9, %xmm5
  2536. shufps $0xd8, %xmm11, %xmm9
  2537. shufps $0xd8, %xmm5, %xmm11
  2538. movaps -32 * SIZE(AO), %xmm0
  2539. movaps -28 * SIZE(AO), %xmm1
  2540. movaps -24 * SIZE(AO), %xmm2
  2541. movaps -20 * SIZE(AO), %xmm3
  2542. #endif
  2543. subps %xmm8, %xmm0
  2544. subps %xmm9, %xmm1
  2545. subps %xmm10, %xmm2
  2546. subps %xmm11, %xmm3
  2547. #ifdef LN
  2548. movaps -20 * SIZE(AO), %xmm8
  2549. pshufd $0xff, %xmm8, %xmm15
  2550. mulps %xmm15, %xmm3
  2551. pshufd $0xaa, %xmm8, %xmm15
  2552. mulps %xmm3, %xmm15
  2553. subps %xmm15, %xmm2
  2554. pshufd $0x55, %xmm8, %xmm15
  2555. mulps %xmm3, %xmm15
  2556. subps %xmm15, %xmm1
  2557. pshufd $0x00, %xmm8, %xmm15
  2558. mulps %xmm3, %xmm15
  2559. subps %xmm15, %xmm0
  2560. movaps -24 * SIZE(AO), %xmm8
  2561. pshufd $0xaa, %xmm8, %xmm15
  2562. mulps %xmm15, %xmm2
  2563. pshufd $0x55, %xmm8, %xmm15
  2564. mulps %xmm2, %xmm15
  2565. subps %xmm15, %xmm1
  2566. pshufd $0x00, %xmm8, %xmm15
  2567. mulps %xmm2, %xmm15
  2568. subps %xmm15, %xmm0
  2569. movaps -28 * SIZE(AO), %xmm8
  2570. pshufd $0x55, %xmm8, %xmm15
  2571. mulps %xmm15, %xmm1
  2572. pshufd $0x00, %xmm8, %xmm15
  2573. mulps %xmm1, %xmm15
  2574. subps %xmm15, %xmm0
  2575. movaps -32 * SIZE(AO), %xmm8
  2576. pshufd $0x00, %xmm8, %xmm15
  2577. mulps %xmm15, %xmm0
  2578. #endif
  2579. #ifdef LT
  2580. movaps -32 * SIZE(AO), %xmm8
  2581. pshufd $0x00, %xmm8, %xmm15
  2582. mulps %xmm15, %xmm0
  2583. pshufd $0x55, %xmm8, %xmm15
  2584. mulps %xmm0, %xmm15
  2585. subps %xmm15, %xmm1
  2586. pshufd $0xaa, %xmm8, %xmm15
  2587. mulps %xmm0, %xmm15
  2588. subps %xmm15, %xmm2
  2589. pshufd $0xff, %xmm8, %xmm15
  2590. mulps %xmm0, %xmm15
  2591. subps %xmm15, %xmm3
  2592. movaps -28 * SIZE(AO), %xmm8
  2593. pshufd $0x55, %xmm8, %xmm15
  2594. mulps %xmm15, %xmm1
  2595. pshufd $0xaa, %xmm8, %xmm15
  2596. mulps %xmm1, %xmm15
  2597. subps %xmm15, %xmm2
  2598. pshufd $0xff, %xmm8, %xmm15
  2599. mulps %xmm1, %xmm15
  2600. subps %xmm15, %xmm3
  2601. movaps -24 * SIZE(AO), %xmm8
  2602. pshufd $0xaa, %xmm8, %xmm15
  2603. mulps %xmm15, %xmm2
  2604. pshufd $0xff, %xmm8, %xmm15
  2605. mulps %xmm2, %xmm15
  2606. subps %xmm15, %xmm3
  2607. movaps -20 * SIZE(AO), %xmm8
  2608. pshufd $0xff, %xmm8, %xmm15
  2609. mulps %xmm15, %xmm3
  2610. #endif
  2611. #ifdef RN
  2612. movaps -32 * SIZE(BO), %xmm8
  2613. pshufd $0x00, %xmm8, %xmm15
  2614. mulps %xmm15, %xmm0
  2615. pshufd $0x55, %xmm8, %xmm15
  2616. mulps %xmm0, %xmm15
  2617. subps %xmm15, %xmm1
  2618. pshufd $0xaa, %xmm8, %xmm15
  2619. mulps %xmm0, %xmm15
  2620. subps %xmm15, %xmm2
  2621. pshufd $0xff, %xmm8, %xmm15
  2622. mulps %xmm0, %xmm15
  2623. subps %xmm15, %xmm3
  2624. movaps -28 * SIZE(BO), %xmm8
  2625. pshufd $0x55, %xmm8, %xmm15
  2626. mulps %xmm15, %xmm1
  2627. pshufd $0xaa, %xmm8, %xmm15
  2628. mulps %xmm1, %xmm15
  2629. subps %xmm15, %xmm2
  2630. pshufd $0xff, %xmm8, %xmm15
  2631. mulps %xmm1, %xmm15
  2632. subps %xmm15, %xmm3
  2633. movaps -24 * SIZE(BO), %xmm8
  2634. pshufd $0xaa, %xmm8, %xmm15
  2635. mulps %xmm15, %xmm2
  2636. pshufd $0xff, %xmm8, %xmm15
  2637. mulps %xmm2, %xmm15
  2638. subps %xmm15, %xmm3
  2639. movaps -20 * SIZE(BO), %xmm8
  2640. pshufd $0xff, %xmm8, %xmm15
  2641. mulps %xmm15, %xmm3
  2642. #endif
  2643. #ifdef RT
  2644. movaps -20 * SIZE(BO), %xmm8
  2645. pshufd $0xff, %xmm8, %xmm15
  2646. mulps %xmm15, %xmm3
  2647. pshufd $0xaa, %xmm8, %xmm15
  2648. mulps %xmm3, %xmm15
  2649. subps %xmm15, %xmm2
  2650. pshufd $0x55, %xmm8, %xmm15
  2651. mulps %xmm3, %xmm15
  2652. subps %xmm15, %xmm1
  2653. pshufd $0x00, %xmm8, %xmm15
  2654. mulps %xmm3, %xmm15
  2655. subps %xmm15, %xmm0
  2656. movaps -24 * SIZE(BO), %xmm8
  2657. pshufd $0xaa, %xmm8, %xmm15
  2658. mulps %xmm15, %xmm2
  2659. pshufd $0x55, %xmm8, %xmm15
  2660. mulps %xmm2, %xmm15
  2661. subps %xmm15, %xmm1
  2662. pshufd $0x00, %xmm8, %xmm15
  2663. mulps %xmm2, %xmm15
  2664. subps %xmm15, %xmm0
  2665. movaps -28 * SIZE(BO), %xmm8
  2666. pshufd $0x55, %xmm8, %xmm15
  2667. mulps %xmm15, %xmm1
  2668. pshufd $0x00, %xmm8, %xmm15
  2669. mulps %xmm1, %xmm15
  2670. subps %xmm15, %xmm0
  2671. movaps -32 * SIZE(BO), %xmm8
  2672. pshufd $0x00, %xmm8, %xmm15
  2673. mulps %xmm15, %xmm0
  2674. #endif
  2675. #ifdef LN
  2676. subq $4 * SIZE, CO1
  2677. subq $4 * SIZE, CO2
  2678. #endif
  2679. #if defined(LN) || defined(LT)
  2680. movaps %xmm0, -32 * SIZE(BO)
  2681. movaps %xmm1, -28 * SIZE(BO)
  2682. movaps %xmm2, -24 * SIZE(BO)
  2683. movaps %xmm3, -20 * SIZE(BO)
  2684. movaps %xmm0, %xmm8
  2685. shufps $0x88, %xmm1, %xmm0
  2686. shufps $0xdd, %xmm8, %xmm1
  2687. movaps %xmm2, %xmm9
  2688. shufps $0x88, %xmm3, %xmm2
  2689. shufps $0xdd, %xmm9, %xmm3
  2690. movaps %xmm0, %xmm8
  2691. shufps $0x88, %xmm2, %xmm0
  2692. movaps %xmm1, %xmm9
  2693. shufps $0x22, %xmm3, %xmm1
  2694. shufps $0xdd, %xmm2, %xmm8
  2695. movaps %xmm8, %xmm2
  2696. shufps $0x77, %xmm3, %xmm9
  2697. movaps %xmm9, %xmm3
  2698. #else
  2699. movaps %xmm0, -32 * SIZE(AO)
  2700. movaps %xmm1, -28 * SIZE(AO)
  2701. movaps %xmm2, -24 * SIZE(AO)
  2702. movaps %xmm3, -20 * SIZE(AO)
  2703. #endif
  2704. leaq (LDC, LDC, 2), %rax
  2705. movsd %xmm0, 0 * SIZE(CO1)
  2706. movhps %xmm0, 2 * SIZE(CO1)
  2707. movsd %xmm1, 0 * SIZE(CO1, LDC, 1)
  2708. movhps %xmm1, 2 * SIZE(CO1, LDC, 1)
  2709. movsd %xmm2, 0 * SIZE(CO2)
  2710. movhps %xmm2, 2 * SIZE(CO2)
  2711. movsd %xmm3, 0 * SIZE(CO2, LDC, 1)
  2712. movhps %xmm3, 2 * SIZE(CO2, LDC, 1)
  2713. #ifndef LN
  2714. addq $4 * SIZE, CO1
  2715. addq $4 * SIZE, CO2
  2716. #endif
  2717. #if defined(LT) || defined(RN)
  2718. movq K, %rax
  2719. subq KK, %rax
  2720. leaq (,%rax, SIZE), %rax
  2721. leaq (AO, %rax, 4), AO
  2722. leaq (BO, %rax, 4), BO
  2723. #endif
  2724. #ifdef LN
  2725. subq $4, KK
  2726. #endif
  2727. #ifdef LT
  2728. addq $4, KK
  2729. #endif
  2730. #ifdef RT
  2731. movq K, %rax
  2732. salq $2 + BASE_SHIFT, %rax
  2733. addq %rax, AORIG
  2734. #endif
  2735. decq I
  2736. BRANCH
  2737. jg .L41
  2738. ALIGN_4
  2739. .L69:
  2740. #ifdef LN
  2741. leaq (, K, SIZE), %rax
  2742. leaq (B, %rax, 4), B
  2743. #endif
  2744. #if defined(LT) || defined(RN)
  2745. movq BO, B
  2746. #endif
  2747. #ifdef RN
  2748. addq $4, KK
  2749. #endif
  2750. #ifdef RT
  2751. subq $4, KK
  2752. #endif
  2753. ALIGN_4
  2754. .L70:
  2755. testq $2, N
  2756. jle .L100
  2757. #if defined(LT) || defined(RN)
  2758. movq A, AO
  2759. #else
  2760. movq A, AORIG
  2761. #endif
  2762. #ifdef RT
  2763. movq K, %rax
  2764. salq $1 + BASE_SHIFT, %rax
  2765. subq %rax, B
  2766. leaq (, LDC, 2), %rax
  2767. subq %rax, C
  2768. #endif
  2769. movq C, CO1
  2770. leaq (C, LDC, 1), CO2
  2771. #ifndef RT
  2772. leaq (C, LDC, 2), C
  2773. #endif
  2774. #ifdef LN
  2775. movq OFFSET, %rax
  2776. addq M, %rax
  2777. movq %rax, KK
  2778. #endif
  2779. #ifdef LT
  2780. movq OFFSET, %rax
  2781. movq %rax, KK
  2782. #endif
  2783. testq $1, M
  2784. BRANCH
  2785. jle .L80
  2786. #ifdef LN
  2787. movq K, %rax
  2788. salq $BASE_SHIFT, %rax
  2789. subq %rax, AORIG
  2790. #endif
  2791. #if defined(LN) || defined(RT)
  2792. movq KK, %rax
  2793. leaq (, %rax, SIZE), %rax
  2794. movq AORIG, AO
  2795. leaq (AO, %rax, 1), AO
  2796. leaq (B, %rax, 2), BO
  2797. #else
  2798. movq B, BO
  2799. #endif
  2800. xorps %xmm2, %xmm2
  2801. movsd -32 * SIZE(AO), %xmm0
  2802. xorps %xmm8, %xmm8
  2803. xorps %xmm9, %xmm9
  2804. #if defined(LT) || defined(RN)
  2805. movq KK, %rax
  2806. #else
  2807. movq K, %rax
  2808. subq KK, %rax
  2809. #endif
  2810. sarq $2, %rax
  2811. NOBRANCH
  2812. jle .L95
  2813. ALIGN_3
  2814. .L92:
  2815. pshufd $0x00, %xmm0, %xmm1
  2816. addps %xmm2, %xmm8
  2817. movsd -32 * SIZE(BO), %xmm2
  2818. mulps %xmm1, %xmm2
  2819. pshufd $0x55, %xmm0, %xmm1
  2820. movsd -30 * SIZE(AO), %xmm0
  2821. addps %xmm2, %xmm9
  2822. movsd -30 * SIZE(BO), %xmm2
  2823. mulps %xmm1, %xmm2
  2824. pshufd $0x00, %xmm0, %xmm1
  2825. addps %xmm2, %xmm8
  2826. movsd -28 * SIZE(BO), %xmm2
  2827. mulps %xmm1, %xmm2
  2828. pshufd $0x55, %xmm0, %xmm1
  2829. movsd -28 * SIZE(AO), %xmm0
  2830. addps %xmm2, %xmm9
  2831. movsd -26 * SIZE(BO), %xmm2
  2832. mulps %xmm1, %xmm2
  2833. subq $-4 * SIZE, AO
  2834. subq $-8 * SIZE, BO
  2835. subq $1, %rax
  2836. BRANCH
  2837. jg .L92
  2838. addps %xmm9, %xmm8
  2839. ALIGN_3
  2840. .L95:
  2841. #if defined(LT) || defined(RN)
  2842. movq KK, %rax
  2843. #else
  2844. movq K, %rax
  2845. subq KK, %rax
  2846. #endif
  2847. andq $3, %rax # if (k & 1)
  2848. BRANCH
  2849. je .L98
  2850. ALIGN_3
  2851. .L96:
  2852. pshufd $0x00, %xmm0, %xmm1
  2853. movss -31 * SIZE(AO), %xmm0
  2854. addps %xmm2, %xmm8
  2855. movsd -32 * SIZE(BO), %xmm2
  2856. mulps %xmm1, %xmm2
  2857. addq $1 * SIZE, AO
  2858. addq $2 * SIZE, BO
  2859. subq $1, %rax
  2860. BRANCH
  2861. jg .L96
  2862. ALIGN_3
  2863. .L98:
  2864. #if defined(LN) || defined(RT)
  2865. movq KK, %rax
  2866. #ifdef LN
  2867. subq $1, %rax
  2868. #else
  2869. subq $2, %rax
  2870. #endif
  2871. leaq (, %rax, SIZE), %rax
  2872. movq AORIG, AO
  2873. leaq (AO, %rax, 1), AO
  2874. leaq (B, %rax, 2), BO
  2875. #endif
  2876. addps %xmm2, %xmm8
  2877. #if defined(LN) || defined(LT)
  2878. movsd -32 * SIZE(BO), %xmm0
  2879. subps %xmm8, %xmm0
  2880. #else
  2881. movsd -32 * SIZE(AO), %xmm0
  2882. subps %xmm8, %xmm0
  2883. #endif
  2884. pshufd $0x55, %xmm0, %xmm1
  2885. pshufd $0x00, %xmm0, %xmm0
  2886. #if defined(LN) || defined(LT)
  2887. movss -32 * SIZE(AO), %xmm8
  2888. mulss %xmm8, %xmm0
  2889. mulss %xmm8, %xmm1
  2890. #endif
  2891. #ifdef RN
  2892. movaps -32 * SIZE(BO), %xmm8
  2893. pshufd $0x00, %xmm8, %xmm15
  2894. mulss %xmm15, %xmm0
  2895. pshufd $0x55, %xmm8, %xmm15
  2896. mulss %xmm0, %xmm15
  2897. subss %xmm15, %xmm1
  2898. pshufd $0xff, %xmm8, %xmm15
  2899. mulss %xmm15, %xmm1
  2900. #endif
  2901. #ifdef RT
  2902. movaps -32 * SIZE(BO), %xmm8
  2903. pshufd $0xff, %xmm8, %xmm15
  2904. mulss %xmm15, %xmm1
  2905. pshufd $0xaa, %xmm8, %xmm15
  2906. mulss %xmm1, %xmm15
  2907. subss %xmm15, %xmm0
  2908. pshufd $0x00, %xmm8, %xmm15
  2909. mulss %xmm15, %xmm0
  2910. #endif
  2911. #ifdef LN
  2912. subq $1 * SIZE, CO1
  2913. subq $1 * SIZE, CO2
  2914. #endif
  2915. #if defined(LN) || defined(LT)
  2916. movss %xmm0, -32 * SIZE(BO)
  2917. movss %xmm1, -31 * SIZE(BO)
  2918. #else
  2919. movss %xmm0, -32 * SIZE(AO)
  2920. movss %xmm1, -31 * SIZE(AO)
  2921. #endif
  2922. movss %xmm0, (CO1)
  2923. movss %xmm1, (CO2)
  2924. #ifndef LN
  2925. addq $1 * SIZE, CO1
  2926. addq $1 * SIZE, CO2
  2927. #endif
  2928. #if defined(LT) || defined(RN)
  2929. movq K, %rax
  2930. subq KK, %rax
  2931. leaq (,%rax, SIZE), %rax
  2932. leaq (AO, %rax, 1), AO
  2933. leaq (BO, %rax, 2), BO
  2934. #endif
  2935. #ifdef LN
  2936. subq $1, KK
  2937. #endif
  2938. #ifdef LT
  2939. addq $1, KK
  2940. #endif
  2941. #ifdef RT
  2942. movq K, %rax
  2943. salq $BASE_SHIFT, %rax
  2944. addq %rax, AORIG
  2945. #endif
  2946. ALIGN_4
  2947. .L80:
  2948. testq $2, M
  2949. BRANCH
  2950. jle .L90
  2951. #ifdef LN
  2952. movq K, %rax
  2953. salq $1 + BASE_SHIFT, %rax
  2954. subq %rax, AORIG
  2955. #endif
  2956. #if defined(LN) || defined(RT)
  2957. movq KK, %rax
  2958. leaq (, %rax, SIZE), %rax
  2959. movq AORIG, AO
  2960. leaq (AO, %rax, 2), AO
  2961. leaq (B, %rax, 2), BO
  2962. #else
  2963. movq B, BO
  2964. #endif
  2965. xorps %xmm1, %xmm1
  2966. movddup -32 * SIZE(AO), %xmm0
  2967. xorps %xmm2, %xmm2
  2968. movsd -32 * SIZE(BO), %xmm5
  2969. xorps %xmm8, %xmm8
  2970. xorps %xmm9, %xmm9
  2971. #if defined(LT) || defined(RN)
  2972. movq KK, %rax
  2973. #else
  2974. movq K, %rax
  2975. subq KK, %rax
  2976. #endif
  2977. sarq $2, %rax
  2978. NOBRANCH
  2979. jle .L85
  2980. ALIGN_3
  2981. .L82:
  2982. addps %xmm1, %xmm8
  2983. movsd -32 * SIZE(BO), %xmm1
  2984. unpcklps %xmm1, %xmm1
  2985. mulps %xmm0, %xmm1
  2986. movddup -30 * SIZE(AO), %xmm0
  2987. addps %xmm1, %xmm8
  2988. movsd -30 * SIZE(BO), %xmm1
  2989. unpcklps %xmm1, %xmm1
  2990. mulps %xmm0, %xmm1
  2991. movddup -28 * SIZE(AO), %xmm0
  2992. addps %xmm1, %xmm8
  2993. movsd -28 * SIZE(BO), %xmm1
  2994. unpcklps %xmm1, %xmm1
  2995. mulps %xmm0, %xmm1
  2996. movddup -26 * SIZE(AO), %xmm0
  2997. addps %xmm1, %xmm8
  2998. movsd -26 * SIZE(BO), %xmm1
  2999. unpcklps %xmm1, %xmm1
  3000. mulps %xmm0, %xmm1
  3001. movddup -24 * SIZE(AO), %xmm0
  3002. subq $-8 * SIZE, BO
  3003. subq $-8 * SIZE, AO
  3004. subq $1, %rax
  3005. BRANCH
  3006. jg .L82
  3007. ALIGN_3
  3008. .L85:
  3009. #if defined(LT) || defined(RN)
  3010. movq KK, %rax
  3011. #else
  3012. movq K, %rax
  3013. subq KK, %rax
  3014. #endif
  3015. andq $3, %rax # if (k & 1)
  3016. BRANCH
  3017. je .L88
  3018. ALIGN_3
  3019. .L86:
  3020. addps %xmm1, %xmm8
  3021. movsd -32 * SIZE(BO), %xmm1
  3022. unpcklps %xmm1, %xmm1
  3023. mulps %xmm0, %xmm1
  3024. movddup -30 * SIZE(AO), %xmm0
  3025. addq $2 * SIZE, AO
  3026. addq $2 * SIZE, BO
  3027. subq $1, %rax
  3028. BRANCH
  3029. jg .L86
  3030. ALIGN_3
  3031. .L88:
  3032. #if defined(LN) || defined(RT)
  3033. movq KK, %rax
  3034. #ifdef LN
  3035. subq $2, %rax
  3036. #else
  3037. subq $2, %rax
  3038. #endif
  3039. leaq (, %rax, SIZE), %rax
  3040. movq AORIG, AO
  3041. leaq (AO, %rax, 2), AO
  3042. leaq (B, %rax, 2), BO
  3043. #endif
  3044. addps %xmm1, %xmm8
  3045. #if defined(LN) || defined(LT)
  3046. pshufd $0xd8, %xmm8, %xmm8
  3047. movaps -32 * SIZE(BO), %xmm0
  3048. #else
  3049. movaps -32 * SIZE(AO), %xmm0
  3050. #endif
  3051. subps %xmm8, %xmm0
  3052. movhlps %xmm0, %xmm1
  3053. #ifdef LN
  3054. movaps -32 * SIZE(AO), %xmm8
  3055. pshufd $0xff, %xmm8, %xmm15
  3056. mulps %xmm15, %xmm1
  3057. pshufd $0xaa, %xmm8, %xmm15
  3058. mulps %xmm1, %xmm15
  3059. subps %xmm15, %xmm0
  3060. pshufd $0x00, %xmm8, %xmm15
  3061. mulps %xmm15, %xmm0
  3062. #endif
  3063. #ifdef LT
  3064. movaps -32 * SIZE(AO), %xmm8
  3065. pshufd $0x00, %xmm8, %xmm15
  3066. mulps %xmm15, %xmm0
  3067. pshufd $0x55, %xmm8, %xmm15
  3068. mulps %xmm0, %xmm15
  3069. subps %xmm15, %xmm1
  3070. pshufd $0xff, %xmm8, %xmm15
  3071. mulps %xmm15, %xmm1
  3072. #endif
  3073. #ifdef RN
  3074. movaps -32 * SIZE(BO), %xmm8
  3075. pshufd $0x00, %xmm8, %xmm15
  3076. mulps %xmm15, %xmm0
  3077. pshufd $0x55, %xmm8, %xmm15
  3078. mulps %xmm0, %xmm15
  3079. subps %xmm15, %xmm1
  3080. pshufd $0xff, %xmm8, %xmm15
  3081. mulps %xmm15, %xmm1
  3082. #endif
  3083. #ifdef RT
  3084. movaps -32 * SIZE(BO), %xmm8
  3085. pshufd $0xff, %xmm8, %xmm15
  3086. mulps %xmm15, %xmm1
  3087. pshufd $0xaa, %xmm8, %xmm15
  3088. mulps %xmm1, %xmm15
  3089. subps %xmm15, %xmm0
  3090. pshufd $0x00, %xmm8, %xmm15
  3091. mulps %xmm15, %xmm0
  3092. #endif
  3093. #ifdef LN
  3094. subq $2 * SIZE, CO1
  3095. subq $2 * SIZE, CO2
  3096. #endif
  3097. #if defined(LN) || defined(LT)
  3098. movlps %xmm0, -32 * SIZE(BO)
  3099. movlps %xmm1, -30 * SIZE(BO)
  3100. unpcklps %xmm1, %xmm0
  3101. movlps %xmm0, (CO1)
  3102. movhps %xmm0, (CO2)
  3103. #else
  3104. movlps %xmm0, -32 * SIZE(AO)
  3105. movlps %xmm1, -30 * SIZE(AO)
  3106. movsd %xmm0, (CO1)
  3107. movsd %xmm1, (CO2)
  3108. #endif
  3109. #ifndef LN
  3110. addq $2 * SIZE, CO1
  3111. addq $2 * SIZE, CO2
  3112. #endif
  3113. #if defined(LT) || defined(RN)
  3114. movq K, %rax
  3115. subq KK, %rax
  3116. leaq (,%rax, SIZE), %rax
  3117. leaq (AO, %rax, 2), AO
  3118. leaq (BO, %rax, 2), BO
  3119. #endif
  3120. #ifdef LN
  3121. subq $2, KK
  3122. #endif
  3123. #ifdef LT
  3124. addq $2, KK
  3125. #endif
  3126. #ifdef RT
  3127. movq K, %rax
  3128. salq $1 + BASE_SHIFT, %rax
  3129. addq %rax, AORIG
  3130. #endif
  3131. ALIGN_4
  3132. .L90:
  3133. movq M, I
  3134. sarq $2, I
  3135. NOBRANCH
  3136. jle .L99
  3137. ALIGN_4
  3138. .L71:
  3139. #ifdef LN
  3140. movq K, %rax
  3141. salq $2 + BASE_SHIFT, %rax
  3142. subq %rax, AORIG
  3143. #endif
  3144. #if defined(LN) || defined(RT)
  3145. movq KK, %rax
  3146. leaq (, %rax, SIZE), %rax
  3147. movq AORIG, AO
  3148. leaq (AO, %rax, 4), AO
  3149. leaq (B, %rax, 2), BO
  3150. #else
  3151. movq B, BO
  3152. #endif
  3153. xorps %xmm1, %xmm1
  3154. movaps -32 * SIZE(AO), %xmm0
  3155. xorps %xmm2, %xmm2
  3156. movsd -32 * SIZE(BO), %xmm3
  3157. xorps %xmm8, %xmm8
  3158. prefetcht2 -4 * SIZE(CO1)
  3159. xorps %xmm9, %xmm9
  3160. prefetcht2 -4 * SIZE(CO2)
  3161. #if defined(LT) || defined(RN)
  3162. movq KK, %rax
  3163. #else
  3164. movq K, %rax
  3165. subq KK, %rax
  3166. #endif
  3167. sarq $2, %rax
  3168. NOBRANCH
  3169. jle .L75
  3170. ALIGN_3
  3171. .L72:
  3172. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  3173. addps %xmm1, %xmm8
  3174. pshufd $0x00, %xmm3, %xmm1
  3175. mulps %xmm0, %xmm1
  3176. addps %xmm2, %xmm9
  3177. pshufd $0x55, %xmm3, %xmm2
  3178. movsd -30 * SIZE(BO), %xmm3
  3179. mulps %xmm0, %xmm2
  3180. movaps -28 * SIZE(AO), %xmm0
  3181. addps %xmm1, %xmm8
  3182. pshufd $0x00, %xmm3, %xmm1
  3183. mulps %xmm0, %xmm1
  3184. addps %xmm2, %xmm9
  3185. pshufd $0x55, %xmm3, %xmm2
  3186. movsd -28 * SIZE(BO), %xmm3
  3187. mulps %xmm0, %xmm2
  3188. movaps -24 * SIZE(AO), %xmm0
  3189. addps %xmm1, %xmm8
  3190. pshufd $0x00, %xmm3, %xmm1
  3191. mulps %xmm0, %xmm1
  3192. addps %xmm2, %xmm9
  3193. pshufd $0x55, %xmm3, %xmm2
  3194. movsd -26 * SIZE(BO), %xmm3
  3195. mulps %xmm0, %xmm2
  3196. movaps -20 * SIZE(AO), %xmm0
  3197. addps %xmm1, %xmm8
  3198. pshufd $0x00, %xmm3, %xmm1
  3199. mulps %xmm0, %xmm1
  3200. addps %xmm2, %xmm9
  3201. pshufd $0x55, %xmm3, %xmm2
  3202. movsd -24 * SIZE(BO), %xmm3
  3203. mulps %xmm0, %xmm2
  3204. movaps -16 * SIZE(AO), %xmm0
  3205. subq $-16 * SIZE, AO
  3206. subq $ -8 * SIZE, BO
  3207. subq $1, %rax
  3208. BRANCH
  3209. jg .L72
  3210. ALIGN_3
  3211. .L75:
  3212. #if defined(LT) || defined(RN)
  3213. movq KK, %rax
  3214. #else
  3215. movq K, %rax
  3216. subq KK, %rax
  3217. #endif
  3218. andq $3, %rax # if (k & 1)
  3219. BRANCH
  3220. je .L78
  3221. ALIGN_3
  3222. .L76:
  3223. addps %xmm1, %xmm8
  3224. pshufd $0x00, %xmm3, %xmm1
  3225. mulps %xmm0, %xmm1
  3226. addps %xmm2, %xmm9
  3227. pshufd $0x55, %xmm3, %xmm2
  3228. movsd -30 * SIZE(BO), %xmm3
  3229. mulps %xmm0, %xmm2
  3230. movaps -28 * SIZE(AO), %xmm0
  3231. addq $4 * SIZE, AO
  3232. addq $2 * SIZE, BO
  3233. subq $1, %rax
  3234. BRANCH
  3235. jg .L76
  3236. ALIGN_3
  3237. .L78:
  3238. #if defined(LN) || defined(RT)
  3239. movq KK, %rax
  3240. #ifdef LN
  3241. subq $4, %rax
  3242. #else
  3243. subq $2, %rax
  3244. #endif
  3245. leaq (, %rax, SIZE), %rax
  3246. movq AORIG, AO
  3247. leaq (AO, %rax, 4), AO
  3248. leaq (B, %rax, 2), BO
  3249. #endif
  3250. addps %xmm1, %xmm8
  3251. addps %xmm2, %xmm9
  3252. #if defined(LN) || defined(LT)
  3253. movaps %xmm8, %xmm4
  3254. unpcklps %xmm9, %xmm8
  3255. unpckhps %xmm9, %xmm4
  3256. movaps -32 * SIZE(BO), %xmm0
  3257. movaps -28 * SIZE(BO), %xmm2
  3258. subps %xmm8, %xmm0
  3259. subps %xmm4, %xmm2
  3260. movhlps %xmm0, %xmm1
  3261. movhlps %xmm2, %xmm3
  3262. #else
  3263. movaps -32 * SIZE(AO), %xmm0
  3264. movaps -28 * SIZE(AO), %xmm2
  3265. subps %xmm8, %xmm0
  3266. subps %xmm9, %xmm2
  3267. #endif
  3268. #ifdef LN
  3269. movaps -20 * SIZE(AO), %xmm8
  3270. pshufd $0xff, %xmm8, %xmm15
  3271. mulps %xmm15, %xmm3
  3272. pshufd $0xaa, %xmm8, %xmm15
  3273. mulps %xmm3, %xmm15
  3274. subps %xmm15, %xmm2
  3275. pshufd $0x55, %xmm8, %xmm15
  3276. mulps %xmm3, %xmm15
  3277. subps %xmm15, %xmm1
  3278. pshufd $0x00, %xmm8, %xmm15
  3279. mulps %xmm3, %xmm15
  3280. subps %xmm15, %xmm0
  3281. movaps -24 * SIZE(AO), %xmm8
  3282. pshufd $0xaa, %xmm8, %xmm15
  3283. mulps %xmm15, %xmm2
  3284. pshufd $0x55, %xmm8, %xmm15
  3285. mulps %xmm2, %xmm15
  3286. subps %xmm15, %xmm1
  3287. pshufd $0x00, %xmm8, %xmm15
  3288. mulps %xmm2, %xmm15
  3289. subps %xmm15, %xmm0
  3290. movaps -28 * SIZE(AO), %xmm8
  3291. pshufd $0x55, %xmm8, %xmm15
  3292. mulps %xmm15, %xmm1
  3293. pshufd $0x00, %xmm8, %xmm15
  3294. mulps %xmm1, %xmm15
  3295. subps %xmm15, %xmm0
  3296. movaps -32 * SIZE(AO), %xmm8
  3297. pshufd $0x00, %xmm8, %xmm15
  3298. mulps %xmm15, %xmm0
  3299. #endif
  3300. #ifdef LT
  3301. movaps -32 * SIZE(AO), %xmm8
  3302. pshufd $0x00, %xmm8, %xmm15
  3303. mulps %xmm15, %xmm0
  3304. pshufd $0x55, %xmm8, %xmm15
  3305. mulps %xmm0, %xmm15
  3306. subps %xmm15, %xmm1
  3307. pshufd $0xaa, %xmm8, %xmm15
  3308. mulps %xmm0, %xmm15
  3309. subps %xmm15, %xmm2
  3310. pshufd $0xff, %xmm8, %xmm15
  3311. mulps %xmm0, %xmm15
  3312. subps %xmm15, %xmm3
  3313. movaps -28 * SIZE(AO), %xmm8
  3314. pshufd $0x55, %xmm8, %xmm15
  3315. mulps %xmm15, %xmm1
  3316. pshufd $0xaa, %xmm8, %xmm15
  3317. mulps %xmm1, %xmm15
  3318. subps %xmm15, %xmm2
  3319. pshufd $0xff, %xmm8, %xmm15
  3320. mulps %xmm1, %xmm15
  3321. subps %xmm15, %xmm3
  3322. movaps -24 * SIZE(AO), %xmm8
  3323. pshufd $0xaa, %xmm8, %xmm15
  3324. mulps %xmm15, %xmm2
  3325. pshufd $0xff, %xmm8, %xmm15
  3326. mulps %xmm2, %xmm15
  3327. subps %xmm15, %xmm3
  3328. movaps -20 * SIZE(AO), %xmm8
  3329. pshufd $0xff, %xmm8, %xmm15
  3330. mulps %xmm15, %xmm3
  3331. #endif
  3332. #ifdef RN
  3333. movaps -32 * SIZE(BO), %xmm8
  3334. pshufd $0x00, %xmm8, %xmm15
  3335. mulps %xmm15, %xmm0
  3336. pshufd $0x55, %xmm8, %xmm15
  3337. mulps %xmm0, %xmm15
  3338. subps %xmm15, %xmm2
  3339. pshufd $0xff, %xmm8, %xmm15
  3340. mulps %xmm15, %xmm2
  3341. #endif
  3342. #ifdef RT
  3343. movaps -32 * SIZE(BO), %xmm8
  3344. pshufd $0xff, %xmm8, %xmm15
  3345. mulps %xmm15, %xmm2
  3346. pshufd $0xaa, %xmm8, %xmm15
  3347. mulps %xmm2, %xmm15
  3348. subps %xmm15, %xmm0
  3349. pshufd $0x00, %xmm8, %xmm15
  3350. mulps %xmm15, %xmm0
  3351. #endif
  3352. #ifdef LN
  3353. subq $4 * SIZE, CO1
  3354. subq $4 * SIZE, CO2
  3355. #endif
  3356. #if defined(LN) || defined(LT)
  3357. movlps %xmm0, -32 * SIZE(BO)
  3358. movlps %xmm1, -30 * SIZE(BO)
  3359. movlps %xmm2, -28 * SIZE(BO)
  3360. movlps %xmm3, -26 * SIZE(BO)
  3361. unpcklps %xmm1, %xmm0
  3362. unpcklps %xmm3, %xmm2
  3363. movlps %xmm0, 0 * SIZE(CO1)
  3364. movlps %xmm2, 2 * SIZE(CO1)
  3365. movhps %xmm0, 0 * SIZE(CO2)
  3366. movhps %xmm2, 2 * SIZE(CO2)
  3367. #else
  3368. movaps %xmm0, -32 * SIZE(AO)
  3369. movaps %xmm2, -28 * SIZE(AO)
  3370. movlps %xmm0, 0 * SIZE(CO1)
  3371. movhps %xmm0, 2 * SIZE(CO1)
  3372. movlps %xmm2, 0 * SIZE(CO2)
  3373. movhps %xmm2, 2 * SIZE(CO2)
  3374. #endif
  3375. #ifndef LN
  3376. addq $4 * SIZE, CO1
  3377. addq $4 * SIZE, CO2
  3378. #endif
  3379. #if defined(LT) || defined(RN)
  3380. movq K, %rax
  3381. subq KK, %rax
  3382. leaq (,%rax, SIZE), %rax
  3383. leaq (AO, %rax, 4), AO
  3384. leaq (BO, %rax, 2), BO
  3385. #endif
  3386. #ifdef LN
  3387. subq $4, KK
  3388. #endif
  3389. #ifdef LT
  3390. addq $4, KK
  3391. #endif
  3392. #ifdef RT
  3393. movq K, %rax
  3394. salq $2 + BASE_SHIFT, %rax
  3395. addq %rax, AORIG
  3396. #endif
  3397. decq I
  3398. BRANCH
  3399. jg .L71
  3400. ALIGN_4
  3401. .L99:
  3402. #ifdef LN
  3403. leaq (, K, SIZE), %rax
  3404. leaq (B, %rax, 2), B
  3405. #endif
  3406. #if defined(LT) || defined(RN)
  3407. movq BO, B
  3408. #endif
  3409. #ifdef RN
  3410. addq $2, KK
  3411. #endif
  3412. #ifdef RT
  3413. subq $2, KK
  3414. #endif
  3415. ALIGN_4
  3416. .L100:
  3417. testq $1, N
  3418. jle .L999
  3419. #if defined(LT) || defined(RN)
  3420. movq A, AO
  3421. #else
  3422. movq A, AORIG
  3423. #endif
  3424. #ifdef RT
  3425. movq K, %rax
  3426. salq $BASE_SHIFT, %rax
  3427. subq %rax, B
  3428. subq LDC, C
  3429. #endif
  3430. movq C, CO1
  3431. #ifndef RT
  3432. addq LDC, C
  3433. #endif
  3434. #ifdef LN
  3435. movq OFFSET, %rax
  3436. addq M, %rax
  3437. movq %rax, KK
  3438. #endif
  3439. #ifdef LT
  3440. movq OFFSET, %rax
  3441. movq %rax, KK
  3442. #endif
  3443. testq $1, M
  3444. BRANCH
  3445. jle .L110
  3446. #ifdef LN
  3447. movq K, %rax
  3448. salq $BASE_SHIFT, %rax
  3449. subq %rax, AORIG
  3450. #endif
  3451. #if defined(LN) || defined(RT)
  3452. movq KK, %rax
  3453. leaq (, %rax, SIZE), %rax
  3454. movq AORIG, AO
  3455. leaq (AO, %rax, 1), AO
  3456. leaq (B, %rax, 1), BO
  3457. #else
  3458. movq B, BO
  3459. #endif
  3460. xorps %xmm2, %xmm2
  3461. movss -32 * SIZE(AO), %xmm0
  3462. xorps %xmm8, %xmm8
  3463. #if defined(LT) || defined(RN)
  3464. movq KK, %rax
  3465. #else
  3466. movq K, %rax
  3467. subq KK, %rax
  3468. #endif
  3469. sarq $2, %rax
  3470. NOBRANCH
  3471. jle .L125
  3472. ALIGN_3
  3473. .L122:
  3474. addss %xmm2, %xmm8
  3475. movss -32 * SIZE(BO), %xmm2
  3476. mulss %xmm0, %xmm2
  3477. movss -31 * SIZE(AO), %xmm0
  3478. addss %xmm2, %xmm8
  3479. movss -31 * SIZE(BO), %xmm2
  3480. mulss %xmm0, %xmm2
  3481. movss -30 * SIZE(AO), %xmm0
  3482. addss %xmm2, %xmm8
  3483. movss -30 * SIZE(BO), %xmm2
  3484. mulss %xmm0, %xmm2
  3485. movss -29 * SIZE(AO), %xmm0
  3486. addss %xmm2, %xmm8
  3487. movss -29 * SIZE(BO), %xmm2
  3488. mulss %xmm0, %xmm2
  3489. movss -28 * SIZE(AO), %xmm0
  3490. subq $-4 * SIZE, AO
  3491. subq $-4 * SIZE, BO
  3492. subq $1, %rax
  3493. BRANCH
  3494. jg .L122
  3495. ALIGN_3
  3496. .L125:
  3497. #if defined(LT) || defined(RN)
  3498. movq KK, %rax
  3499. #else
  3500. movq K, %rax
  3501. subq KK, %rax
  3502. #endif
  3503. andq $3, %rax # if (k & 1)
  3504. BRANCH
  3505. je .L128
  3506. ALIGN_3
  3507. .L126:
  3508. addss %xmm2, %xmm8
  3509. movss -32 * SIZE(BO), %xmm2
  3510. mulss %xmm0, %xmm2
  3511. movss -31 * SIZE(AO), %xmm0
  3512. addq $1 * SIZE, AO
  3513. addq $1 * SIZE, BO
  3514. subq $1, %rax
  3515. BRANCH
  3516. jg .L126
  3517. ALIGN_3
  3518. .L128:
  3519. #if defined(LN) || defined(RT)
  3520. movq KK, %rax
  3521. subq $1, %rax
  3522. leaq (, %rax, SIZE), %rax
  3523. movq AORIG, AO
  3524. leaq (AO, %rax, 1), AO
  3525. leaq (B, %rax, 1), BO
  3526. #endif
  3527. addss %xmm2, %xmm8
  3528. #if defined(LN) || defined(LT)
  3529. movss -32 * SIZE(BO), %xmm0
  3530. subss %xmm8, %xmm0
  3531. #else
  3532. movss -32 * SIZE(AO), %xmm0
  3533. subss %xmm8, %xmm0
  3534. #endif
  3535. #if defined(LN) || defined(LT)
  3536. movss -32 * SIZE(AO), %xmm8
  3537. #endif
  3538. #if defined(RN) || defined(RT)
  3539. movaps -32 * SIZE(BO), %xmm8
  3540. #endif
  3541. mulss %xmm8, %xmm0
  3542. #ifdef LN
  3543. subq $1 * SIZE, CO1
  3544. #endif
  3545. #if defined(LN) || defined(LT)
  3546. movss %xmm0, -32 * SIZE(BO)
  3547. #else
  3548. movss %xmm0, -32 * SIZE(AO)
  3549. #endif
  3550. movss %xmm0, (CO1)
  3551. #ifndef LN
  3552. addq $1 * SIZE, CO1
  3553. #endif
  3554. #if defined(LT) || defined(RN)
  3555. movq K, %rax
  3556. subq KK, %rax
  3557. leaq (,%rax, SIZE), %rax
  3558. leaq (AO, %rax, 1), AO
  3559. leaq (BO, %rax, 1), BO
  3560. #endif
  3561. #ifdef LN
  3562. subq $1, KK
  3563. #endif
  3564. #ifdef LT
  3565. addq $1, KK
  3566. #endif
  3567. #ifdef RT
  3568. movq K, %rax
  3569. salq $BASE_SHIFT, %rax
  3570. addq %rax, AORIG
  3571. #endif
  3572. ALIGN_4
  3573. .L110:
  3574. testq $2, M
  3575. BRANCH
  3576. jle .L120
  3577. #ifdef LN
  3578. movq K, %rax
  3579. salq $1 + BASE_SHIFT, %rax
  3580. subq %rax, AORIG
  3581. #endif
  3582. #if defined(LN) || defined(RT)
  3583. movq KK, %rax
  3584. leaq (, %rax, SIZE), %rax
  3585. movq AORIG, AO
  3586. leaq (AO, %rax, 2), AO
  3587. leaq (B, %rax, 1), BO
  3588. #else
  3589. movq B, BO
  3590. #endif
  3591. xorps %xmm1, %xmm1
  3592. movddup -32 * SIZE(AO), %xmm0
  3593. xorps %xmm8, %xmm8
  3594. #if defined(LT) || defined(RN)
  3595. movq KK, %rax
  3596. #else
  3597. movq K, %rax
  3598. subq KK, %rax
  3599. #endif
  3600. sarq $2, %rax
  3601. NOBRANCH
  3602. jle .L115
  3603. ALIGN_3
  3604. .L112:
  3605. addps %xmm1, %xmm8
  3606. movss -32 * SIZE(BO), %xmm1
  3607. unpcklps %xmm1, %xmm1
  3608. mulps %xmm0, %xmm1
  3609. movsd -30 * SIZE(AO), %xmm0
  3610. addps %xmm1, %xmm8
  3611. movss -31 * SIZE(BO), %xmm1
  3612. unpcklps %xmm1, %xmm1
  3613. mulps %xmm0, %xmm1
  3614. movsd -28 * SIZE(AO), %xmm0
  3615. addps %xmm1, %xmm8
  3616. movss -30 * SIZE(BO), %xmm1
  3617. unpcklps %xmm1, %xmm1
  3618. mulps %xmm0, %xmm1
  3619. movsd -26 * SIZE(AO), %xmm0
  3620. addps %xmm1, %xmm8
  3621. movss -29 * SIZE(BO), %xmm1
  3622. unpcklps %xmm1, %xmm1
  3623. mulps %xmm0, %xmm1
  3624. movsd -24 * SIZE(AO), %xmm0
  3625. subq $-4 * SIZE, BO
  3626. subq $-8 * SIZE, AO
  3627. subq $1, %rax
  3628. BRANCH
  3629. jg .L112
  3630. ALIGN_3
  3631. .L115:
  3632. #if defined(LT) || defined(RN)
  3633. movq KK, %rax
  3634. #else
  3635. movq K, %rax
  3636. subq KK, %rax
  3637. #endif
  3638. andq $3, %rax # if (k & 1)
  3639. BRANCH
  3640. je .L118
  3641. ALIGN_3
  3642. .L116:
  3643. addps %xmm1, %xmm8
  3644. movss -32 * SIZE(BO), %xmm1
  3645. unpcklps %xmm1, %xmm1
  3646. mulps %xmm0, %xmm1
  3647. movsd -30 * SIZE(AO), %xmm0
  3648. addq $2 * SIZE, AO
  3649. addq $1 * SIZE, BO
  3650. subq $1, %rax
  3651. BRANCH
  3652. jg .L116
  3653. ALIGN_3
  3654. .L118:
  3655. #if defined(LN) || defined(RT)
  3656. movq KK, %rax
  3657. #ifdef LN
  3658. subq $2, %rax
  3659. #else
  3660. subq $1, %rax
  3661. #endif
  3662. leaq (, %rax, SIZE), %rax
  3663. movq AORIG, AO
  3664. leaq (AO, %rax, 2), AO
  3665. leaq (B, %rax, 1), BO
  3666. #endif
  3667. addps %xmm1, %xmm8
  3668. #if defined(LN) || defined(LT)
  3669. movsd -32 * SIZE(BO), %xmm0
  3670. subps %xmm8, %xmm0
  3671. pshufd $0x55, %xmm0, %xmm1
  3672. #else
  3673. movsd -32 * SIZE(AO), %xmm0
  3674. subps %xmm8, %xmm0
  3675. #endif
  3676. #ifdef LN
  3677. movaps -32 * SIZE(AO), %xmm8
  3678. pshufd $0xff, %xmm8, %xmm15
  3679. mulss %xmm15, %xmm1
  3680. pshufd $0xaa, %xmm8, %xmm15
  3681. mulss %xmm1, %xmm15
  3682. subss %xmm15, %xmm0
  3683. pshufd $0x00, %xmm8, %xmm15
  3684. mulss %xmm15, %xmm0
  3685. #endif
  3686. #ifdef LT
  3687. movaps -32 * SIZE(AO), %xmm8
  3688. pshufd $0x00, %xmm8, %xmm15
  3689. mulss %xmm15, %xmm0
  3690. pshufd $0x55, %xmm8, %xmm15
  3691. mulss %xmm0, %xmm15
  3692. subss %xmm15, %xmm1
  3693. pshufd $0xff, %xmm8, %xmm15
  3694. mulss %xmm15, %xmm1
  3695. #endif
  3696. #if defined(RN) || defined(RT)
  3697. movaps -32 * SIZE(BO), %xmm8
  3698. pshufd $0x00, %xmm8, %xmm15
  3699. mulps %xmm15, %xmm0
  3700. #endif
  3701. #ifdef LN
  3702. subq $2 * SIZE, CO1
  3703. #endif
  3704. #if defined(LN) || defined(LT)
  3705. unpcklps %xmm1, %xmm0
  3706. movlps %xmm0, -32 * SIZE(BO)
  3707. movlps %xmm0, 0 * SIZE(CO1)
  3708. #else
  3709. movlps %xmm0, -32 * SIZE(AO)
  3710. movlps %xmm0, 0 * SIZE(CO1)
  3711. #endif
  3712. #ifndef LN
  3713. addq $2 * SIZE, CO1
  3714. #endif
  3715. #if defined(LT) || defined(RN)
  3716. movq K, %rax
  3717. subq KK, %rax
  3718. leaq (,%rax, SIZE), %rax
  3719. leaq (AO, %rax, 2), AO
  3720. leaq (BO, %rax, 1), BO
  3721. #endif
  3722. #ifdef LN
  3723. subq $2, KK
  3724. #endif
  3725. #ifdef LT
  3726. addq $2, KK
  3727. #endif
  3728. #ifdef RT
  3729. movq K, %rax
  3730. salq $1 + BASE_SHIFT, %rax
  3731. addq %rax, AORIG
  3732. #endif
  3733. ALIGN_4
  3734. .L120:
  3735. movq M, I
  3736. sarq $2, I
  3737. NOBRANCH
  3738. jle .L129
  3739. ALIGN_4
  3740. .L101:
  3741. #ifdef LN
  3742. movq K, %rax
  3743. salq $2 + BASE_SHIFT, %rax
  3744. subq %rax, AORIG
  3745. #endif
  3746. #if defined(LN) || defined(RT)
  3747. movq KK, %rax
  3748. leaq (, %rax, SIZE), %rax
  3749. movq AORIG, AO
  3750. leaq (AO, %rax, 4), AO
  3751. leaq (B, %rax, 1), BO
  3752. #else
  3753. movq B, BO
  3754. #endif
  3755. xorps %xmm1, %xmm1
  3756. movaps -32 * SIZE(AO), %xmm0
  3757. movsd -32 * SIZE(BO), %xmm3
  3758. xorps %xmm8, %xmm8
  3759. prefetcht2 -4 * SIZE(CO1)
  3760. #if defined(LT) || defined(RN)
  3761. movq KK, %rax
  3762. #else
  3763. movq K, %rax
  3764. subq KK, %rax
  3765. #endif
  3766. sarq $2, %rax
  3767. NOBRANCH
  3768. jle .L105
  3769. ALIGN_3
  3770. .L102:
  3771. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  3772. addps %xmm1, %xmm8
  3773. pshufd $0x00, %xmm3, %xmm1
  3774. movss -31 * SIZE(BO), %xmm3
  3775. mulps %xmm0, %xmm1
  3776. movaps -28 * SIZE(AO), %xmm0
  3777. addps %xmm1, %xmm8
  3778. pshufd $0x00, %xmm3, %xmm1
  3779. movss -30 * SIZE(BO), %xmm3
  3780. mulps %xmm0, %xmm1
  3781. movaps -24 * SIZE(AO), %xmm0
  3782. addps %xmm1, %xmm8
  3783. pshufd $0x00, %xmm3, %xmm1
  3784. movss -29 * SIZE(BO), %xmm3
  3785. mulps %xmm0, %xmm1
  3786. movaps -20 * SIZE(AO), %xmm0
  3787. addps %xmm1, %xmm8
  3788. pshufd $0x00, %xmm3, %xmm1
  3789. movss -28 * SIZE(BO), %xmm3
  3790. mulps %xmm0, %xmm1
  3791. movaps -16 * SIZE(AO), %xmm0
  3792. subq $-16 * SIZE, AO
  3793. subq $ -4 * SIZE, BO
  3794. subq $1, %rax
  3795. BRANCH
  3796. jg .L102
  3797. ALIGN_3
  3798. .L105:
  3799. #if defined(LT) || defined(RN)
  3800. movq KK, %rax
  3801. #else
  3802. movq K, %rax
  3803. subq KK, %rax
  3804. #endif
  3805. andq $3, %rax # if (k & 1)
  3806. BRANCH
  3807. je .L108
  3808. ALIGN_3
  3809. .L106:
  3810. addps %xmm1, %xmm8
  3811. pshufd $0x00, %xmm3, %xmm1
  3812. movss -31 * SIZE(BO), %xmm3
  3813. mulps %xmm0, %xmm1
  3814. movaps -28 * SIZE(AO), %xmm0
  3815. addq $4 * SIZE, AO
  3816. addq $1 * SIZE, BO
  3817. subq $1, %rax
  3818. BRANCH
  3819. jg .L106
  3820. ALIGN_3
  3821. .L108:
  3822. #if defined(LN) || defined(RT)
  3823. movq KK, %rax
  3824. #ifdef LN
  3825. subq $4, %rax
  3826. #else
  3827. subq $1, %rax
  3828. #endif
  3829. leaq (, %rax, SIZE), %rax
  3830. movq AORIG, AO
  3831. leaq (AO, %rax, 4), AO
  3832. leaq (B, %rax, 1), BO
  3833. #endif
  3834. addps %xmm1, %xmm8
  3835. #if defined(LN) || defined(LT)
  3836. movsd -32 * SIZE(BO), %xmm0
  3837. movhps -30 * SIZE(BO), %xmm0
  3838. subps %xmm8, %xmm0
  3839. pshufd $0xff, %xmm0, %xmm3
  3840. pshufd $0xaa, %xmm0, %xmm2
  3841. pshufd $0x55, %xmm0, %xmm1
  3842. #else
  3843. movaps -32 * SIZE(AO), %xmm0
  3844. subps %xmm8, %xmm0
  3845. #endif
  3846. #ifdef LN
  3847. movaps -20 * SIZE(AO), %xmm8
  3848. pshufd $0xff, %xmm8, %xmm15
  3849. mulss %xmm15, %xmm3
  3850. pshufd $0xaa, %xmm8, %xmm15
  3851. mulss %xmm3, %xmm15
  3852. subss %xmm15, %xmm2
  3853. pshufd $0x55, %xmm8, %xmm15
  3854. mulss %xmm3, %xmm15
  3855. subss %xmm15, %xmm1
  3856. pshufd $0x00, %xmm8, %xmm15
  3857. mulss %xmm3, %xmm15
  3858. subss %xmm15, %xmm0
  3859. movaps -24 * SIZE(AO), %xmm8
  3860. pshufd $0xaa, %xmm8, %xmm15
  3861. mulss %xmm15, %xmm2
  3862. pshufd $0x55, %xmm8, %xmm15
  3863. mulss %xmm2, %xmm15
  3864. subss %xmm15, %xmm1
  3865. pshufd $0x00, %xmm8, %xmm15
  3866. mulss %xmm2, %xmm15
  3867. subss %xmm15, %xmm0
  3868. movaps -28 * SIZE(AO), %xmm8
  3869. pshufd $0x55, %xmm8, %xmm15
  3870. mulss %xmm15, %xmm1
  3871. pshufd $0x00, %xmm8, %xmm15
  3872. mulss %xmm1, %xmm15
  3873. subss %xmm15, %xmm0
  3874. movaps -32 * SIZE(AO), %xmm8
  3875. pshufd $0x00, %xmm8, %xmm15
  3876. mulss %xmm15, %xmm0
  3877. #endif
  3878. #ifdef LT
  3879. movaps -32 * SIZE(AO), %xmm8
  3880. pshufd $0x00, %xmm8, %xmm15
  3881. mulss %xmm15, %xmm0
  3882. pshufd $0x55, %xmm8, %xmm15
  3883. mulss %xmm0, %xmm15
  3884. subss %xmm15, %xmm1
  3885. pshufd $0xaa, %xmm8, %xmm15
  3886. mulss %xmm0, %xmm15
  3887. subss %xmm15, %xmm2
  3888. pshufd $0xff, %xmm8, %xmm15
  3889. mulss %xmm0, %xmm15
  3890. subss %xmm15, %xmm3
  3891. movaps -28 * SIZE(AO), %xmm8
  3892. pshufd $0x55, %xmm8, %xmm15
  3893. mulss %xmm15, %xmm1
  3894. pshufd $0xaa, %xmm8, %xmm15
  3895. mulss %xmm1, %xmm15
  3896. subss %xmm15, %xmm2
  3897. pshufd $0xff, %xmm8, %xmm15
  3898. mulss %xmm1, %xmm15
  3899. subss %xmm15, %xmm3
  3900. movaps -24 * SIZE(AO), %xmm8
  3901. pshufd $0xaa, %xmm8, %xmm15
  3902. mulss %xmm15, %xmm2
  3903. pshufd $0xff, %xmm8, %xmm15
  3904. mulss %xmm2, %xmm15
  3905. subss %xmm15, %xmm3
  3906. movaps -20 * SIZE(AO), %xmm8
  3907. pshufd $0xff, %xmm8, %xmm15
  3908. mulss %xmm15, %xmm3
  3909. #endif
  3910. #if defined(RN) || defined(RT)
  3911. movaps -32 * SIZE(BO), %xmm8
  3912. pshufd $0x00, %xmm8, %xmm15
  3913. mulps %xmm15, %xmm0
  3914. #endif
  3915. #ifdef LN
  3916. subq $4 * SIZE, CO1
  3917. #endif
  3918. #if defined(LN) || defined(LT)
  3919. unpcklps %xmm1, %xmm0
  3920. unpcklps %xmm3, %xmm2
  3921. movlps %xmm0, -32 * SIZE(BO)
  3922. movlps %xmm2, -30 * SIZE(BO)
  3923. movlps %xmm0, 0 * SIZE(CO1)
  3924. movlps %xmm2, 2 * SIZE(CO1)
  3925. #else
  3926. movaps %xmm0, -32 * SIZE(AO)
  3927. movlps %xmm0, 0 * SIZE(CO1)
  3928. movhps %xmm0, 2 * SIZE(CO1)
  3929. #endif
  3930. #ifndef LN
  3931. addq $4 * SIZE, CO1
  3932. #endif
  3933. #if defined(LT) || defined(RN)
  3934. movq K, %rax
  3935. subq KK, %rax
  3936. leaq (,%rax, SIZE), %rax
  3937. leaq (AO, %rax, 4), AO
  3938. leaq (BO, %rax, 1), BO
  3939. #endif
  3940. #ifdef LN
  3941. subq $4, KK
  3942. #endif
  3943. #ifdef LT
  3944. addq $4, KK
  3945. #endif
  3946. #ifdef RT
  3947. movq K, %rax
  3948. salq $2 + BASE_SHIFT, %rax
  3949. addq %rax, AORIG
  3950. #endif
  3951. decq I
  3952. BRANCH
  3953. jg .L101
  3954. ALIGN_4
  3955. .L129:
  3956. #ifdef LN
  3957. leaq (, K, SIZE), %rax
  3958. leaq (B, %rax, 1), B
  3959. #endif
  3960. #if defined(LT) || defined(RN)
  3961. movq BO, B
  3962. #endif
  3963. #ifdef RN
  3964. addq $1, KK
  3965. #endif
  3966. #ifdef RT
  3967. subq $1, KK
  3968. #endif
  3969. ALIGN_4
  3970. .L999:
  3971. movq 0(%rsp), %rbx
  3972. movq 8(%rsp), %rbp
  3973. movq 16(%rsp), %r12
  3974. movq 24(%rsp), %r13
  3975. movq 32(%rsp), %r14
  3976. movq 40(%rsp), %r15
  3977. #ifdef WINDOWS_ABI
  3978. movq 48(%rsp), %rdi
  3979. movq 56(%rsp), %rsi
  3980. movups 64(%rsp), %xmm6
  3981. movups 80(%rsp), %xmm7
  3982. movups 96(%rsp), %xmm8
  3983. movups 112(%rsp), %xmm9
  3984. movups 128(%rsp), %xmm10
  3985. movups 144(%rsp), %xmm11
  3986. movups 160(%rsp), %xmm12
  3987. movups 176(%rsp), %xmm13
  3988. movups 192(%rsp), %xmm14
  3989. movups 208(%rsp), %xmm15
  3990. #endif
  3991. addq $STACKSIZE, %rsp
  3992. ret
  3993. EPILOGUE