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_LT_8x4_sse.S 116 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949
  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 M %rdi
  41. #define N %rsi
  42. #define K %rdx
  43. #define A %rcx
  44. #define B %r8
  45. #define C %r9
  46. #define LDC %r10
  47. #define I %r11
  48. #define J %r12
  49. #define AO %r13
  50. #define BO %r14
  51. #define CO1 %r15
  52. #define CO2 %rbp
  53. #ifndef WINDOWS_ABI
  54. #define STACKSIZE 64
  55. #define OLD_LDC 8 + STACKSIZE(%rsp)
  56. #define OLD_OFFSET 16 + STACKSIZE(%rsp)
  57. #else
  58. #define STACKSIZE 256
  59. #define OLD_A 40 + STACKSIZE(%rsp)
  60. #define OLD_B 48 + STACKSIZE(%rsp)
  61. #define OLD_C 56 + STACKSIZE(%rsp)
  62. #define OLD_LDC 64 + STACKSIZE(%rsp)
  63. #define OLD_OFFSET 72 + STACKSIZE(%rsp)
  64. #endif
  65. #define ALPHA 0(%rsp)
  66. #define OFFSET 16(%rsp)
  67. #define KK 24(%rsp)
  68. #define KKK 32(%rsp)
  69. #define AORIG 40(%rsp)
  70. #define BORIG 48(%rsp)
  71. #define BUFFER 128(%rsp)
  72. #ifdef PENTIUM4
  73. #define PREFETCH prefetcht0
  74. #define PREFETCHW prefetcht0
  75. #endif
  76. #if defined(OPTERON) || defined(BARCELONA) || defined(BULLDOZER)
  77. #define PREFETCH prefetch
  78. #define PREFETCHW prefetchw
  79. #define movsd movlps
  80. #endif
  81. #ifdef GENERIC
  82. #define PREFETCH prefetcht0
  83. #define PREFETCHW prefetcht0
  84. #endif
  85. #ifndef PREFETCH
  86. #define PREFETCH prefetcht0
  87. #endif
  88. #ifndef PREFETCHW
  89. #define PREFETCHW prefetcht0
  90. #endif
  91. PROLOGUE
  92. PROFCODE
  93. subq $STACKSIZE, %rsp
  94. EMMS
  95. movq %rbx, 0(%rsp)
  96. movq %rbp, 8(%rsp)
  97. movq %r12, 16(%rsp)
  98. movq %r13, 24(%rsp)
  99. movq %r14, 32(%rsp)
  100. movq %r15, 40(%rsp)
  101. #ifdef WINDOWS_ABI
  102. movq %rdi, 48(%rsp)
  103. movq %rsi, 56(%rsp)
  104. movups %xmm6, 64(%rsp)
  105. movups %xmm7, 80(%rsp)
  106. movups %xmm8, 96(%rsp)
  107. movups %xmm9, 112(%rsp)
  108. movups %xmm10, 128(%rsp)
  109. movups %xmm11, 144(%rsp)
  110. movups %xmm12, 160(%rsp)
  111. movups %xmm13, 176(%rsp)
  112. movups %xmm14, 192(%rsp)
  113. movups %xmm15, 208(%rsp)
  114. movq ARG1, M
  115. movq ARG2, N
  116. movq ARG3, K
  117. movq OLD_A, A
  118. movq OLD_B, B
  119. movq OLD_C, C
  120. movq OLD_LDC, LDC
  121. movsd OLD_OFFSET, %xmm4
  122. movaps %xmm3, %xmm0
  123. #else
  124. movq OLD_LDC, LDC
  125. movsd OLD_OFFSET, %xmm4
  126. #endif
  127. movq %rsp, %rbx # save old stack
  128. subq $128 + LOCAL_BUFFER_SIZE, %rsp
  129. andq $-4096, %rsp # align stack
  130. STACK_TOUCHING
  131. movsd %xmm4, OFFSET
  132. movsd %xmm4, KK
  133. leaq (, LDC, SIZE), LDC
  134. #ifdef LN
  135. leaq (, M, SIZE), %rax
  136. addq %rax, C
  137. imulq K, %rax
  138. addq %rax, A
  139. #endif
  140. #ifdef RT
  141. leaq (, N, SIZE), %rax
  142. imulq K, %rax
  143. addq %rax, B
  144. movq N, %rax
  145. imulq LDC, %rax
  146. addq %rax, C
  147. #endif
  148. #ifdef RN
  149. negq KK
  150. #endif
  151. #ifdef RT
  152. movq N, %rax
  153. subq OFFSET, %rax
  154. movq %rax, KK
  155. #endif
  156. movq N, J
  157. sarq $2, J # j = (n >> 2)
  158. jle .L50
  159. .L01:
  160. /* Copying to Sub Buffer */
  161. #ifdef LN
  162. movq OFFSET, %rax
  163. addq M, %rax
  164. movq %rax, KK
  165. #endif
  166. leaq BUFFER, BO
  167. #ifdef RT
  168. movq K, %rax
  169. salq $2 + BASE_SHIFT, %rax
  170. subq %rax, B
  171. #endif
  172. #if defined(LN) || defined(RT)
  173. movq KK, %rax
  174. movq B, BORIG
  175. salq $2 + BASE_SHIFT, %rax
  176. leaq (B, %rax, 1), B
  177. leaq (BO, %rax, 4), BO
  178. #endif
  179. #ifdef LT
  180. movq OFFSET, %rax
  181. movq %rax, KK
  182. #endif
  183. #if defined(LT) || defined(RN)
  184. movq KK, %rax
  185. #else
  186. movq K, %rax
  187. subq KK, %rax
  188. #endif
  189. sarq $2, %rax
  190. jle .L03
  191. ALIGN_4
  192. .L02:
  193. movaps 0 * SIZE(B), %xmm3
  194. movaps 4 * SIZE(B), %xmm7
  195. movaps 8 * SIZE(B), %xmm11
  196. movaps 12 * SIZE(B), %xmm15
  197. pshufd $0x00, %xmm3, %xmm0
  198. pshufd $0x55, %xmm3, %xmm1
  199. pshufd $0xaa, %xmm3, %xmm2
  200. pshufd $0xff, %xmm3, %xmm3
  201. pshufd $0x00, %xmm7, %xmm4
  202. pshufd $0x55, %xmm7, %xmm5
  203. pshufd $0xaa, %xmm7, %xmm6
  204. pshufd $0xff, %xmm7, %xmm7
  205. movaps %xmm0, 0 * SIZE(BO)
  206. movaps %xmm1, 4 * SIZE(BO)
  207. movaps %xmm2, 8 * SIZE(BO)
  208. movaps %xmm3, 12 * SIZE(BO)
  209. movaps %xmm4, 16 * SIZE(BO)
  210. movaps %xmm5, 20 * SIZE(BO)
  211. movaps %xmm6, 24 * SIZE(BO)
  212. movaps %xmm7, 28 * SIZE(BO)
  213. pshufd $0x00, %xmm11, %xmm8
  214. pshufd $0x55, %xmm11, %xmm9
  215. pshufd $0xaa, %xmm11, %xmm10
  216. pshufd $0xff, %xmm11, %xmm11
  217. pshufd $0x00, %xmm15, %xmm12
  218. pshufd $0x55, %xmm15, %xmm13
  219. pshufd $0xaa, %xmm15, %xmm14
  220. pshufd $0xff, %xmm15, %xmm15
  221. movaps %xmm8, 32 * SIZE(BO)
  222. movaps %xmm9, 36 * SIZE(BO)
  223. movaps %xmm10, 40 * SIZE(BO)
  224. movaps %xmm11, 44 * SIZE(BO)
  225. movaps %xmm12, 48 * SIZE(BO)
  226. movaps %xmm13, 52 * SIZE(BO)
  227. movaps %xmm14, 56 * SIZE(BO)
  228. movaps %xmm15, 60 * SIZE(BO)
  229. addq $16 * SIZE, B
  230. addq $64 * SIZE, BO
  231. decq %rax
  232. jne .L02
  233. ALIGN_4
  234. .L03:
  235. #if defined(LT) || defined(RN)
  236. movq KK, %rax
  237. #else
  238. movq K, %rax
  239. subq KK, %rax
  240. #endif
  241. andq $3, %rax
  242. BRANCH
  243. jle .L10
  244. ALIGN_4
  245. .L04:
  246. movaps 0 * SIZE(B), %xmm3
  247. pshufd $0x00, %xmm3, %xmm0
  248. pshufd $0x55, %xmm3, %xmm1
  249. pshufd $0xaa, %xmm3, %xmm2
  250. pshufd $0xff, %xmm3, %xmm3
  251. movaps %xmm0, 0 * SIZE(BO)
  252. movaps %xmm1, 4 * SIZE(BO)
  253. movaps %xmm2, 8 * SIZE(BO)
  254. movaps %xmm3, 12 * SIZE(BO)
  255. addq $ 4 * SIZE, B
  256. addq $16 * SIZE, BO
  257. decq %rax
  258. jne .L04
  259. ALIGN_4
  260. .L10:
  261. #if defined(LT) || defined(RN)
  262. movq A, AO
  263. #else
  264. movq A, AORIG
  265. #endif
  266. #ifdef RT
  267. leaq (, LDC, 4), %rax
  268. subq %rax, C
  269. #endif
  270. movq C, CO1 # coffset1 = c
  271. leaq (C, LDC, 1), CO2 # coffset2 = c + ldc
  272. #ifndef RT
  273. leaq (C, LDC, 4), C
  274. #endif
  275. movq M, I
  276. sarq $3, I # i = (m >> 3)
  277. jle .L20
  278. ALIGN_4
  279. .L11:
  280. #ifdef LN
  281. movq K, %rax
  282. salq $3 + BASE_SHIFT, %rax
  283. subq %rax, AORIG
  284. #endif
  285. #if defined(LN) || defined(RT)
  286. movq KK, %rax
  287. movq AORIG, AO
  288. leaq (, %rax, SIZE), %rax
  289. leaq (AO, %rax, 8), AO
  290. #endif
  291. leaq BUFFER, BO
  292. #if defined(LN) || defined(RT)
  293. movq KK, %rax
  294. salq $2 + BASE_SHIFT, %rax
  295. leaq (BO, %rax, 4), BO
  296. #endif
  297. movaps 0 * SIZE(BO), %xmm9
  298. movaps 4 * SIZE(BO), %xmm11
  299. movaps 8 * SIZE(BO), %xmm13
  300. movaps 16 * SIZE(BO), %xmm15
  301. movaps 0 * SIZE(AO), %xmm8
  302. pxor %xmm0, %xmm0
  303. movaps 4 * SIZE(AO), %xmm10
  304. pxor %xmm1, %xmm1
  305. movaps 8 * SIZE(AO), %xmm12
  306. pxor %xmm2, %xmm2
  307. movaps 12 * SIZE(AO), %xmm14
  308. pxor %xmm3, %xmm3
  309. PREFETCHW 7 * SIZE(CO1)
  310. pxor %xmm4, %xmm4
  311. PREFETCHW 7 * SIZE(CO2)
  312. pxor %xmm5, %xmm5
  313. PREFETCHW 7 * SIZE(CO1, LDC, 2)
  314. pxor %xmm6, %xmm6
  315. PREFETCHW 7 * SIZE(CO2, LDC, 2)
  316. pxor %xmm7, %xmm7
  317. #if defined(LT) || defined(RN)
  318. movq KK, %rax
  319. #else
  320. movq K, %rax
  321. subq KK, %rax
  322. #endif
  323. sarq $2, %rax
  324. je .L15
  325. ALIGN_4
  326. .L12:
  327. mulps %xmm8, %xmm9
  328. addps %xmm9, %xmm0
  329. movaps 0 * SIZE(BO), %xmm9
  330. mulps %xmm8, %xmm11
  331. addps %xmm11, %xmm1
  332. movaps 4 * SIZE(BO), %xmm11
  333. mulps %xmm8, %xmm13
  334. mulps 12 * SIZE(BO), %xmm8
  335. addps %xmm13, %xmm2
  336. movaps 8 * SIZE(BO), %xmm13
  337. addps %xmm8, %xmm3
  338. movaps 16 * SIZE(AO), %xmm8
  339. mulps %xmm10, %xmm9
  340. addps %xmm9, %xmm4
  341. movaps 32 * SIZE(BO), %xmm9
  342. mulps %xmm10, %xmm11
  343. addps %xmm11, %xmm5
  344. movaps 20 * SIZE(BO), %xmm11
  345. mulps %xmm10, %xmm13
  346. mulps 12 * SIZE(BO), %xmm10
  347. addps %xmm13, %xmm6
  348. movaps 24 * SIZE(BO), %xmm13
  349. addps %xmm10, %xmm7
  350. movaps 20 * SIZE(AO), %xmm10
  351. mulps %xmm12, %xmm15
  352. addps %xmm15, %xmm0
  353. movaps 16 * SIZE(BO), %xmm15
  354. mulps %xmm12, %xmm11
  355. addps %xmm11, %xmm1
  356. movaps 20 * SIZE(BO), %xmm11
  357. mulps %xmm12, %xmm13
  358. mulps 28 * SIZE(BO), %xmm12
  359. addps %xmm13, %xmm2
  360. movaps 24 * SIZE(BO), %xmm13
  361. addps %xmm12, %xmm3
  362. movaps 24 * SIZE(AO), %xmm12
  363. mulps %xmm14, %xmm15
  364. addps %xmm15, %xmm4
  365. movaps 48 * SIZE(BO), %xmm15
  366. mulps %xmm14, %xmm11
  367. addps %xmm11, %xmm5
  368. movaps 36 * SIZE(BO), %xmm11
  369. mulps %xmm14, %xmm13
  370. mulps 28 * SIZE(BO), %xmm14
  371. addps %xmm13, %xmm6
  372. movaps 40 * SIZE(BO), %xmm13
  373. addps %xmm14, %xmm7
  374. movaps 28 * SIZE(AO), %xmm14
  375. mulps %xmm8, %xmm9
  376. addps %xmm9, %xmm0
  377. movaps 32 * SIZE(BO), %xmm9
  378. mulps %xmm8, %xmm11
  379. addps %xmm11, %xmm1
  380. movaps 36 * SIZE(BO), %xmm11
  381. mulps %xmm8, %xmm13
  382. mulps 44 * SIZE(BO), %xmm8
  383. addps %xmm13, %xmm2
  384. movaps 40 * SIZE(BO), %xmm13
  385. addps %xmm8, %xmm3
  386. movaps 32 * SIZE(AO), %xmm8
  387. mulps %xmm10, %xmm9
  388. addps %xmm9, %xmm4
  389. movaps 64 * SIZE(BO), %xmm9
  390. mulps %xmm10, %xmm11
  391. addps %xmm11, %xmm5
  392. movaps 52 * SIZE(BO), %xmm11
  393. mulps %xmm10, %xmm13
  394. mulps 44 * SIZE(BO), %xmm10
  395. addps %xmm13, %xmm6
  396. movaps 56 * SIZE(BO), %xmm13
  397. addps %xmm10, %xmm7
  398. movaps 36 * SIZE(AO), %xmm10
  399. mulps %xmm12, %xmm15
  400. addps %xmm15, %xmm0
  401. movaps 48 * SIZE(BO), %xmm15
  402. mulps %xmm12, %xmm11
  403. addps %xmm11, %xmm1
  404. movaps 52 * SIZE(BO), %xmm11
  405. mulps %xmm12, %xmm13
  406. mulps 60 * SIZE(BO), %xmm12
  407. addps %xmm13, %xmm2
  408. movaps 56 * SIZE(BO), %xmm13
  409. addps %xmm12, %xmm3
  410. movaps 40 * SIZE(AO), %xmm12
  411. mulps %xmm14, %xmm15
  412. addps %xmm15, %xmm4
  413. movaps 80 * SIZE(BO), %xmm15
  414. mulps %xmm14, %xmm11
  415. addps %xmm11, %xmm5
  416. movaps 68 * SIZE(BO), %xmm11
  417. mulps %xmm14, %xmm13
  418. mulps 60 * SIZE(BO), %xmm14
  419. addps %xmm13, %xmm6
  420. movaps 72 * SIZE(BO), %xmm13
  421. addps %xmm14, %xmm7
  422. movaps 44 * SIZE(AO), %xmm14
  423. addq $32 * SIZE, AO
  424. addq $64 * SIZE, BO
  425. decq %rax
  426. jg .L12
  427. ALIGN_4
  428. .L15:
  429. #if defined(LT) || defined(RN)
  430. movq KK, %rax
  431. #else
  432. movq K, %rax
  433. subq KK, %rax
  434. #endif
  435. andq $3, %rax # if (k & 1)
  436. BRANCH
  437. je .L18
  438. ALIGN_4
  439. .L16:
  440. mulps %xmm8, %xmm9
  441. addps %xmm9, %xmm0
  442. movaps 4 * SIZE(BO), %xmm9
  443. mulps %xmm8, %xmm9
  444. addps %xmm9, %xmm1
  445. movaps 8 * SIZE(BO), %xmm9
  446. mulps %xmm8, %xmm9
  447. mulps 12 * SIZE(BO), %xmm8
  448. addps %xmm9, %xmm2
  449. movaps 0 * SIZE(BO), %xmm9
  450. addps %xmm8, %xmm3
  451. movaps 8 * SIZE(AO), %xmm8
  452. mulps %xmm10, %xmm9
  453. addps %xmm9, %xmm4
  454. movaps 4 * SIZE(BO), %xmm9
  455. mulps %xmm10, %xmm9
  456. addps %xmm9, %xmm5
  457. movaps 8 * SIZE(BO), %xmm9
  458. mulps %xmm10, %xmm9
  459. mulps 12 * SIZE(BO), %xmm10
  460. addps %xmm9, %xmm6
  461. movaps 16 * SIZE(BO), %xmm9
  462. addps %xmm10, %xmm7
  463. movaps 12 * SIZE(AO), %xmm10
  464. addq $8 * SIZE, AO
  465. addq $16 * SIZE, BO
  466. decq %rax
  467. jg .L16
  468. ALIGN_4
  469. .L18:
  470. #if defined(LN) || defined(RT)
  471. movq KK, %rax
  472. #ifdef LN
  473. subq $8, %rax
  474. #else
  475. subq $4, %rax
  476. #endif
  477. movq AORIG, AO
  478. movq BORIG, B
  479. leaq BUFFER, BO
  480. salq $2 + BASE_SHIFT, %rax
  481. leaq (AO, %rax, 2), AO
  482. leaq (B, %rax, 1), B
  483. leaq (BO, %rax, 4), BO
  484. #endif
  485. #if defined(LN) || defined(LT)
  486. movaps %xmm0, %xmm8
  487. unpcklps %xmm2, %xmm0
  488. unpckhps %xmm2, %xmm8
  489. movaps %xmm1, %xmm14
  490. unpcklps %xmm3, %xmm1
  491. unpckhps %xmm3, %xmm14
  492. movaps %xmm0, %xmm2
  493. unpcklps %xmm1, %xmm0
  494. unpckhps %xmm1, %xmm2
  495. movaps %xmm8, %xmm3
  496. unpcklps %xmm14, %xmm8
  497. unpckhps %xmm14, %xmm3
  498. movaps %xmm4, %xmm9
  499. unpcklps %xmm6, %xmm4
  500. unpckhps %xmm6, %xmm9
  501. movaps %xmm5, %xmm14
  502. unpcklps %xmm7, %xmm5
  503. unpckhps %xmm7, %xmm14
  504. movaps %xmm4, %xmm6
  505. unpcklps %xmm5, %xmm4
  506. unpckhps %xmm5, %xmm6
  507. movaps %xmm9, %xmm7
  508. unpcklps %xmm14, %xmm9
  509. unpckhps %xmm14, %xmm7
  510. movaps 0 * SIZE(B), %xmm1
  511. movaps 4 * SIZE(B), %xmm5
  512. movaps 8 * SIZE(B), %xmm10
  513. movaps 12 * SIZE(B), %xmm11
  514. movaps 16 * SIZE(B), %xmm12
  515. movaps 20 * SIZE(B), %xmm13
  516. movaps 24 * SIZE(B), %xmm14
  517. movaps 28 * SIZE(B), %xmm15
  518. subps %xmm0, %xmm1
  519. subps %xmm2, %xmm5
  520. subps %xmm8, %xmm10
  521. subps %xmm3, %xmm11
  522. subps %xmm4, %xmm12
  523. subps %xmm6, %xmm13
  524. subps %xmm9, %xmm14
  525. subps %xmm7, %xmm15
  526. #else
  527. movaps 0 * SIZE(AO), %xmm8
  528. movaps 4 * SIZE(AO), %xmm9
  529. movaps 8 * SIZE(AO), %xmm10
  530. movaps 12 * SIZE(AO), %xmm11
  531. movaps 16 * SIZE(AO), %xmm12
  532. movaps 20 * SIZE(AO), %xmm13
  533. movaps 24 * SIZE(AO), %xmm14
  534. movaps 28 * SIZE(AO), %xmm15
  535. subps %xmm0, %xmm8
  536. subps %xmm4, %xmm9
  537. subps %xmm1, %xmm10
  538. subps %xmm5, %xmm11
  539. subps %xmm2, %xmm12
  540. subps %xmm6, %xmm13
  541. subps %xmm3, %xmm14
  542. subps %xmm7, %xmm15
  543. #endif
  544. #ifdef LN
  545. movaps 60 * SIZE(AO), %xmm6
  546. pshufd $0xff, %xmm6, %xmm8
  547. mulps %xmm8, %xmm15
  548. pshufd $0xaa, %xmm6, %xmm8
  549. mulps %xmm15, %xmm8
  550. subps %xmm8, %xmm14
  551. pshufd $0x55, %xmm6, %xmm8
  552. mulps %xmm15, %xmm8
  553. subps %xmm8, %xmm13
  554. pshufd $0x00, %xmm6, %xmm8
  555. mulps %xmm15, %xmm8
  556. subps %xmm8, %xmm12
  557. movaps 56 * SIZE(AO), %xmm6
  558. pshufd $0xff, %xmm6, %xmm8
  559. mulps %xmm15, %xmm8
  560. subps %xmm8, %xmm11
  561. pshufd $0xaa, %xmm6, %xmm8
  562. mulps %xmm15, %xmm8
  563. subps %xmm8, %xmm10
  564. pshufd $0x55, %xmm6, %xmm8
  565. mulps %xmm15, %xmm8
  566. subps %xmm8, %xmm5
  567. pshufd $0x00, %xmm6, %xmm8
  568. mulps %xmm15, %xmm8
  569. subps %xmm8, %xmm1
  570. movaps 52 * SIZE(AO), %xmm6
  571. pshufd $0xaa, %xmm6, %xmm8
  572. mulps %xmm8, %xmm14
  573. pshufd $0x55, %xmm6, %xmm8
  574. mulps %xmm14, %xmm8
  575. subps %xmm8, %xmm13
  576. pshufd $0x00, %xmm6, %xmm8
  577. mulps %xmm14, %xmm8
  578. subps %xmm8, %xmm12
  579. movaps 48 * SIZE(AO), %xmm6
  580. pshufd $0xff, %xmm6, %xmm8
  581. mulps %xmm14, %xmm8
  582. subps %xmm8, %xmm11
  583. pshufd $0xaa, %xmm6, %xmm8
  584. mulps %xmm14, %xmm8
  585. subps %xmm8, %xmm10
  586. pshufd $0x55, %xmm6, %xmm8
  587. mulps %xmm14, %xmm8
  588. subps %xmm8, %xmm5
  589. pshufd $0x00, %xmm6, %xmm8
  590. mulps %xmm14, %xmm8
  591. subps %xmm8, %xmm1
  592. movaps 44 * SIZE(AO), %xmm6
  593. pshufd $0x55, %xmm6, %xmm8
  594. mulps %xmm8, %xmm13
  595. pshufd $0x00, %xmm6, %xmm8
  596. mulps %xmm13, %xmm8
  597. subps %xmm8, %xmm12
  598. movaps 40 * SIZE(AO), %xmm6
  599. pshufd $0xff, %xmm6, %xmm8
  600. mulps %xmm13, %xmm8
  601. subps %xmm8, %xmm11
  602. pshufd $0xaa, %xmm6, %xmm8
  603. mulps %xmm13, %xmm8
  604. subps %xmm8, %xmm10
  605. pshufd $0x55, %xmm6, %xmm8
  606. mulps %xmm13, %xmm8
  607. subps %xmm8, %xmm5
  608. pshufd $0x00, %xmm6, %xmm8
  609. mulps %xmm13, %xmm8
  610. subps %xmm8, %xmm1
  611. movaps 36 * SIZE(AO), %xmm6
  612. pshufd $0x00, %xmm6, %xmm8
  613. mulps %xmm8, %xmm12
  614. movaps 32 * SIZE(AO), %xmm6
  615. pshufd $0xff, %xmm6, %xmm8
  616. mulps %xmm12, %xmm8
  617. subps %xmm8, %xmm11
  618. pshufd $0xaa, %xmm6, %xmm8
  619. mulps %xmm12, %xmm8
  620. subps %xmm8, %xmm10
  621. pshufd $0x55, %xmm6, %xmm8
  622. mulps %xmm12, %xmm8
  623. subps %xmm8, %xmm5
  624. pshufd $0x00, %xmm6, %xmm8
  625. mulps %xmm12, %xmm8
  626. subps %xmm8, %xmm1
  627. movaps 24 * SIZE(AO), %xmm6
  628. pshufd $0xff, %xmm6, %xmm8
  629. mulps %xmm8, %xmm11
  630. pshufd $0xaa, %xmm6, %xmm8
  631. mulps %xmm11, %xmm8
  632. subps %xmm8, %xmm10
  633. pshufd $0x55, %xmm6, %xmm8
  634. mulps %xmm11, %xmm8
  635. subps %xmm8, %xmm5
  636. pshufd $0x00, %xmm6, %xmm8
  637. mulps %xmm11, %xmm8
  638. subps %xmm8, %xmm1
  639. movaps 16 * SIZE(AO), %xmm6
  640. pshufd $0xaa, %xmm6, %xmm8
  641. mulps %xmm8, %xmm10
  642. pshufd $0x55, %xmm6, %xmm8
  643. mulps %xmm10, %xmm8
  644. subps %xmm8, %xmm5
  645. pshufd $0x00, %xmm6, %xmm8
  646. mulps %xmm10, %xmm8
  647. subps %xmm8, %xmm1
  648. movaps 8 * SIZE(AO), %xmm6
  649. pshufd $0x55, %xmm6, %xmm8
  650. mulps %xmm8, %xmm5
  651. pshufd $0x00, %xmm6, %xmm8
  652. mulps %xmm5, %xmm8
  653. subps %xmm8, %xmm1
  654. movaps 0 * SIZE(AO), %xmm6
  655. pshufd $0x00, %xmm6, %xmm8
  656. mulps %xmm8, %xmm1
  657. #endif
  658. #ifdef LT
  659. movaps 0 * SIZE(AO), %xmm6
  660. pshufd $0x00, %xmm6, %xmm8
  661. mulps %xmm8, %xmm1
  662. pshufd $0x55, %xmm6, %xmm8
  663. mulps %xmm1, %xmm8
  664. subps %xmm8, %xmm5
  665. pshufd $0xaa, %xmm6, %xmm8
  666. mulps %xmm1, %xmm8
  667. subps %xmm8, %xmm10
  668. pshufd $0xff, %xmm6, %xmm8
  669. mulps %xmm1, %xmm8
  670. subps %xmm8, %xmm11
  671. movaps 4 * SIZE(AO), %xmm7
  672. pshufd $0x00, %xmm7, %xmm8
  673. mulps %xmm1, %xmm8
  674. subps %xmm8, %xmm12
  675. pshufd $0x55, %xmm7, %xmm8
  676. mulps %xmm1, %xmm8
  677. subps %xmm8, %xmm13
  678. pshufd $0xaa, %xmm7, %xmm8
  679. mulps %xmm1, %xmm8
  680. subps %xmm8, %xmm14
  681. pshufd $0xff, %xmm7, %xmm8
  682. mulps %xmm1, %xmm8
  683. subps %xmm8, %xmm15
  684. movaps 8 * SIZE(AO), %xmm6
  685. pshufd $0x55, %xmm6, %xmm8
  686. mulps %xmm8, %xmm5
  687. pshufd $0xaa, %xmm6, %xmm8
  688. mulps %xmm5, %xmm8
  689. subps %xmm8, %xmm10
  690. pshufd $0xff, %xmm6, %xmm8
  691. mulps %xmm5, %xmm8
  692. subps %xmm8, %xmm11
  693. movaps 12 * SIZE(AO), %xmm7
  694. pshufd $0x00, %xmm7, %xmm8
  695. mulps %xmm5, %xmm8
  696. subps %xmm8, %xmm12
  697. pshufd $0x55, %xmm7, %xmm8
  698. mulps %xmm5, %xmm8
  699. subps %xmm8, %xmm13
  700. pshufd $0xaa, %xmm7, %xmm8
  701. mulps %xmm5, %xmm8
  702. subps %xmm8, %xmm14
  703. pshufd $0xff, %xmm7, %xmm8
  704. mulps %xmm5, %xmm8
  705. subps %xmm8, %xmm15
  706. movaps 16 * SIZE(AO), %xmm6
  707. pshufd $0xaa, %xmm6, %xmm8
  708. mulps %xmm8, %xmm10
  709. pshufd $0xff, %xmm6, %xmm8
  710. mulps %xmm10, %xmm8
  711. subps %xmm8, %xmm11
  712. movaps 20 * SIZE(AO), %xmm7
  713. pshufd $0x00, %xmm7, %xmm8
  714. mulps %xmm10, %xmm8
  715. subps %xmm8, %xmm12
  716. pshufd $0x55, %xmm7, %xmm8
  717. mulps %xmm10, %xmm8
  718. subps %xmm8, %xmm13
  719. pshufd $0xaa, %xmm7, %xmm8
  720. mulps %xmm10, %xmm8
  721. subps %xmm8, %xmm14
  722. pshufd $0xff, %xmm7, %xmm8
  723. mulps %xmm10, %xmm8
  724. subps %xmm8, %xmm15
  725. movaps 24 * SIZE(AO), %xmm6
  726. pshufd $0xff, %xmm6, %xmm8
  727. mulps %xmm8, %xmm11
  728. movaps 28 * SIZE(AO), %xmm7
  729. pshufd $0x00, %xmm7, %xmm8
  730. mulps %xmm11, %xmm8
  731. subps %xmm8, %xmm12
  732. pshufd $0x55, %xmm7, %xmm8
  733. mulps %xmm11, %xmm8
  734. subps %xmm8, %xmm13
  735. pshufd $0xaa, %xmm7, %xmm8
  736. mulps %xmm11, %xmm8
  737. subps %xmm8, %xmm14
  738. pshufd $0xff, %xmm7, %xmm8
  739. mulps %xmm11, %xmm8
  740. subps %xmm8, %xmm15
  741. movaps 36 * SIZE(AO), %xmm6
  742. pshufd $0x00, %xmm6, %xmm8
  743. mulps %xmm8, %xmm12
  744. pshufd $0x55, %xmm6, %xmm8
  745. mulps %xmm12, %xmm8
  746. subps %xmm8, %xmm13
  747. pshufd $0xaa, %xmm6, %xmm8
  748. mulps %xmm12, %xmm8
  749. subps %xmm8, %xmm14
  750. pshufd $0xff, %xmm6, %xmm8
  751. mulps %xmm12, %xmm8
  752. subps %xmm8, %xmm15
  753. movaps 44 * SIZE(AO), %xmm7
  754. pshufd $0x55, %xmm7, %xmm8
  755. mulps %xmm8, %xmm13
  756. pshufd $0xaa, %xmm7, %xmm8
  757. mulps %xmm13, %xmm8
  758. subps %xmm8, %xmm14
  759. pshufd $0xff, %xmm7, %xmm8
  760. mulps %xmm13, %xmm8
  761. subps %xmm8, %xmm15
  762. movaps 52 * SIZE(AO), %xmm6
  763. pshufd $0xaa, %xmm6, %xmm8
  764. mulps %xmm8, %xmm14
  765. pshufd $0xff, %xmm6, %xmm8
  766. mulps %xmm14, %xmm8
  767. subps %xmm8, %xmm15
  768. movaps 60 * SIZE(AO), %xmm7
  769. pshufd $0xff, %xmm7, %xmm8
  770. mulps %xmm8, %xmm15
  771. #endif
  772. #ifdef RN
  773. movaps 0 * SIZE(B), %xmm0
  774. pshufd $0x00, %xmm0, %xmm2
  775. mulps %xmm2, %xmm8
  776. mulps %xmm2, %xmm9
  777. pshufd $0x55, %xmm0, %xmm2
  778. mulps %xmm8, %xmm2
  779. subps %xmm2, %xmm10
  780. pshufd $0x55, %xmm0, %xmm2
  781. mulps %xmm9, %xmm2
  782. subps %xmm2, %xmm11
  783. pshufd $0xaa, %xmm0, %xmm2
  784. mulps %xmm8, %xmm2
  785. subps %xmm2, %xmm12
  786. pshufd $0xaa, %xmm0, %xmm2
  787. mulps %xmm9, %xmm2
  788. subps %xmm2, %xmm13
  789. pshufd $0xff, %xmm0, %xmm2
  790. mulps %xmm8, %xmm2
  791. subps %xmm2, %xmm14
  792. pshufd $0xff, %xmm0, %xmm2
  793. mulps %xmm9, %xmm2
  794. subps %xmm2, %xmm15
  795. movaps 4 * SIZE(B), %xmm0
  796. pshufd $0x55, %xmm0, %xmm2
  797. mulps %xmm2, %xmm10
  798. mulps %xmm2, %xmm11
  799. pshufd $0xaa, %xmm0, %xmm2
  800. mulps %xmm10, %xmm2
  801. subps %xmm2, %xmm12
  802. pshufd $0xaa, %xmm0, %xmm2
  803. mulps %xmm11, %xmm2
  804. subps %xmm2, %xmm13
  805. pshufd $0xff, %xmm0, %xmm2
  806. mulps %xmm10, %xmm2
  807. subps %xmm2, %xmm14
  808. pshufd $0xff, %xmm0, %xmm2
  809. mulps %xmm11, %xmm2
  810. subps %xmm2, %xmm15
  811. movaps 8 * SIZE(B), %xmm0
  812. pshufd $0xaa, %xmm0, %xmm2
  813. mulps %xmm2, %xmm12
  814. mulps %xmm2, %xmm13
  815. pshufd $0xff, %xmm0, %xmm2
  816. mulps %xmm12, %xmm2
  817. subps %xmm2, %xmm14
  818. pshufd $0xff, %xmm0, %xmm2
  819. mulps %xmm13, %xmm2
  820. subps %xmm2, %xmm15
  821. movaps 12 * SIZE(B), %xmm0
  822. pshufd $0xff, %xmm0, %xmm2
  823. mulps %xmm2, %xmm14
  824. mulps %xmm2, %xmm15
  825. #endif
  826. #ifdef RT
  827. movaps 12 * SIZE(B), %xmm0
  828. pshufd $0xff, %xmm0, %xmm2
  829. mulps %xmm2, %xmm14
  830. mulps %xmm2, %xmm15
  831. pshufd $0xaa, %xmm0, %xmm2
  832. mulps %xmm14, %xmm2
  833. subps %xmm2, %xmm12
  834. pshufd $0xaa, %xmm0, %xmm2
  835. mulps %xmm15, %xmm2
  836. subps %xmm2, %xmm13
  837. pshufd $0x55, %xmm0, %xmm2
  838. mulps %xmm14, %xmm2
  839. subps %xmm2, %xmm10
  840. pshufd $0x55, %xmm0, %xmm2
  841. mulps %xmm15, %xmm2
  842. subps %xmm2, %xmm11
  843. pshufd $0x00, %xmm0, %xmm2
  844. mulps %xmm14, %xmm2
  845. subps %xmm2, %xmm8
  846. pshufd $0x00, %xmm0, %xmm2
  847. mulps %xmm15, %xmm2
  848. subps %xmm2, %xmm9
  849. movaps 8 * SIZE(B), %xmm0
  850. pshufd $0xaa, %xmm0, %xmm2
  851. mulps %xmm2, %xmm12
  852. mulps %xmm2, %xmm13
  853. pshufd $0x55, %xmm0, %xmm2
  854. mulps %xmm12, %xmm2
  855. subps %xmm2, %xmm10
  856. pshufd $0x55, %xmm0, %xmm2
  857. mulps %xmm13, %xmm2
  858. subps %xmm2, %xmm11
  859. pshufd $0x00, %xmm0, %xmm2
  860. mulps %xmm12, %xmm2
  861. subps %xmm2, %xmm8
  862. pshufd $0x00, %xmm0, %xmm2
  863. mulps %xmm13, %xmm2
  864. subps %xmm2, %xmm9
  865. movaps 4 * SIZE(B), %xmm0
  866. pshufd $0x55, %xmm0, %xmm2
  867. mulps %xmm2, %xmm10
  868. mulps %xmm2, %xmm11
  869. pshufd $0x00, %xmm0, %xmm2
  870. mulps %xmm10, %xmm2
  871. subps %xmm2, %xmm8
  872. pshufd $0x00, %xmm0, %xmm2
  873. mulps %xmm11, %xmm2
  874. subps %xmm2, %xmm9
  875. movaps 0 * SIZE(B), %xmm0
  876. pshufd $0x00, %xmm0, %xmm2
  877. mulps %xmm2, %xmm8
  878. mulps %xmm2, %xmm9
  879. #endif
  880. #ifdef LN
  881. subq $8 * SIZE, CO1
  882. subq $8 * SIZE, CO2
  883. #endif
  884. #if defined(LN) || defined(LT)
  885. movaps %xmm1, 0 * SIZE(B)
  886. movaps %xmm5, 4 * SIZE(B)
  887. movaps %xmm10, 8 * SIZE(B)
  888. movaps %xmm11, 12 * SIZE(B)
  889. movaps %xmm12, 16 * SIZE(B)
  890. movaps %xmm13, 20 * SIZE(B)
  891. movaps %xmm14, 24 * SIZE(B)
  892. movaps %xmm15, 28 * SIZE(B)
  893. pshufd $0x00, %xmm1, %xmm2
  894. pshufd $0x55, %xmm1, %xmm3
  895. pshufd $0xaa, %xmm1, %xmm4
  896. pshufd $0xff, %xmm1, %xmm6
  897. movaps %xmm2, 0 * SIZE(BO)
  898. movaps %xmm3, 4 * SIZE(BO)
  899. movaps %xmm4, 8 * SIZE(BO)
  900. movaps %xmm6, 12 * SIZE(BO)
  901. pshufd $0x00, %xmm5, %xmm2
  902. pshufd $0x55, %xmm5, %xmm3
  903. pshufd $0xaa, %xmm5, %xmm4
  904. pshufd $0xff, %xmm5, %xmm6
  905. movaps %xmm2, 16 * SIZE(BO)
  906. movaps %xmm3, 20 * SIZE(BO)
  907. movaps %xmm4, 24 * SIZE(BO)
  908. movaps %xmm6, 28 * SIZE(BO)
  909. pshufd $0x00, %xmm10, %xmm2
  910. pshufd $0x55, %xmm10, %xmm3
  911. pshufd $0xaa, %xmm10, %xmm4
  912. pshufd $0xff, %xmm10, %xmm6
  913. movaps %xmm2, 32 * SIZE(BO)
  914. movaps %xmm3, 36 * SIZE(BO)
  915. movaps %xmm4, 40 * SIZE(BO)
  916. movaps %xmm6, 44 * SIZE(BO)
  917. pshufd $0x00, %xmm11, %xmm2
  918. pshufd $0x55, %xmm11, %xmm3
  919. pshufd $0xaa, %xmm11, %xmm4
  920. pshufd $0xff, %xmm11, %xmm6
  921. movaps %xmm2, 48 * SIZE(BO)
  922. movaps %xmm3, 52 * SIZE(BO)
  923. movaps %xmm4, 56 * SIZE(BO)
  924. movaps %xmm6, 60 * SIZE(BO)
  925. pshufd $0x00, %xmm12, %xmm2
  926. pshufd $0x55, %xmm12, %xmm3
  927. pshufd $0xaa, %xmm12, %xmm4
  928. pshufd $0xff, %xmm12, %xmm6
  929. movaps %xmm2, 64 * SIZE(BO)
  930. movaps %xmm3, 68 * SIZE(BO)
  931. movaps %xmm4, 72 * SIZE(BO)
  932. movaps %xmm6, 76 * SIZE(BO)
  933. pshufd $0x00, %xmm13, %xmm2
  934. pshufd $0x55, %xmm13, %xmm3
  935. pshufd $0xaa, %xmm13, %xmm4
  936. pshufd $0xff, %xmm13, %xmm6
  937. movaps %xmm2, 80 * SIZE(BO)
  938. movaps %xmm3, 84 * SIZE(BO)
  939. movaps %xmm4, 88 * SIZE(BO)
  940. movaps %xmm6, 92 * SIZE(BO)
  941. pshufd $0x00, %xmm14, %xmm2
  942. pshufd $0x55, %xmm14, %xmm3
  943. pshufd $0xaa, %xmm14, %xmm4
  944. pshufd $0xff, %xmm14, %xmm6
  945. movaps %xmm2, 96 * SIZE(BO)
  946. movaps %xmm3, 100 * SIZE(BO)
  947. movaps %xmm4, 104 * SIZE(BO)
  948. movaps %xmm6, 108 * SIZE(BO)
  949. pshufd $0x00, %xmm15, %xmm2
  950. pshufd $0x55, %xmm15, %xmm3
  951. pshufd $0xaa, %xmm15, %xmm4
  952. pshufd $0xff, %xmm15, %xmm6
  953. movaps %xmm2, 112 * SIZE(BO)
  954. movaps %xmm3, 116 * SIZE(BO)
  955. movaps %xmm4, 120 * SIZE(BO)
  956. movaps %xmm6, 124 * SIZE(BO)
  957. #else
  958. movaps %xmm8, 0 * SIZE(AO)
  959. movaps %xmm9, 4 * SIZE(AO)
  960. movaps %xmm10, 8 * SIZE(AO)
  961. movaps %xmm11, 12 * SIZE(AO)
  962. movaps %xmm12, 16 * SIZE(AO)
  963. movaps %xmm13, 20 * SIZE(AO)
  964. movaps %xmm14, 24 * SIZE(AO)
  965. movaps %xmm15, 28 * SIZE(AO)
  966. #endif
  967. #if defined(LN) || defined(LT)
  968. movaps %xmm1, %xmm0
  969. unpcklps %xmm10, %xmm1
  970. unpckhps %xmm10, %xmm0
  971. movaps %xmm5, %xmm7
  972. unpcklps %xmm11, %xmm5
  973. unpckhps %xmm11, %xmm7
  974. movaps %xmm1, %xmm10
  975. unpcklps %xmm5, %xmm1
  976. unpckhps %xmm5, %xmm10
  977. movaps %xmm0, %xmm11
  978. unpcklps %xmm7, %xmm0
  979. unpckhps %xmm7, %xmm11
  980. movaps %xmm12, %xmm2
  981. unpcklps %xmm14, %xmm12
  982. unpckhps %xmm14, %xmm2
  983. movaps %xmm13, %xmm7
  984. unpcklps %xmm15, %xmm13
  985. unpckhps %xmm15, %xmm7
  986. movaps %xmm12, %xmm14
  987. unpcklps %xmm13, %xmm12
  988. unpckhps %xmm13, %xmm14
  989. movaps %xmm2, %xmm15
  990. unpcklps %xmm7, %xmm2
  991. unpckhps %xmm7, %xmm15
  992. movlps %xmm1, 0 * SIZE(CO1)
  993. movhps %xmm1, 2 * SIZE(CO1)
  994. movlps %xmm12, 4 * SIZE(CO1)
  995. movhps %xmm12, 6 * SIZE(CO1)
  996. movlps %xmm10, 0 * SIZE(CO2)
  997. movhps %xmm10, 2 * SIZE(CO2)
  998. movlps %xmm14, 4 * SIZE(CO2)
  999. movhps %xmm14, 6 * SIZE(CO2)
  1000. movlps %xmm0, 0 * SIZE(CO1, LDC, 2)
  1001. movhps %xmm0, 2 * SIZE(CO1, LDC, 2)
  1002. movlps %xmm2, 4 * SIZE(CO1, LDC, 2)
  1003. movhps %xmm2, 6 * SIZE(CO1, LDC, 2)
  1004. movlps %xmm11, 0 * SIZE(CO2, LDC, 2)
  1005. movhps %xmm11, 2 * SIZE(CO2, LDC, 2)
  1006. movlps %xmm15, 4 * SIZE(CO2, LDC, 2)
  1007. movhps %xmm15, 6 * SIZE(CO2, LDC, 2)
  1008. #else
  1009. movlps %xmm8, 0 * SIZE(CO1)
  1010. movhps %xmm8, 2 * SIZE(CO1)
  1011. movlps %xmm9, 4 * SIZE(CO1)
  1012. movhps %xmm9, 6 * SIZE(CO1)
  1013. movlps %xmm10, 0 * SIZE(CO2)
  1014. movhps %xmm10, 2 * SIZE(CO2)
  1015. movlps %xmm11, 4 * SIZE(CO2)
  1016. movhps %xmm11, 6 * SIZE(CO2)
  1017. movlps %xmm12, 0 * SIZE(CO1, LDC, 2)
  1018. movhps %xmm12, 2 * SIZE(CO1, LDC, 2)
  1019. movlps %xmm13, 4 * SIZE(CO1, LDC, 2)
  1020. movhps %xmm13, 6 * SIZE(CO1, LDC, 2)
  1021. movlps %xmm14, 0 * SIZE(CO2, LDC, 2)
  1022. movhps %xmm14, 2 * SIZE(CO2, LDC, 2)
  1023. movlps %xmm15, 4 * SIZE(CO2, LDC, 2)
  1024. movhps %xmm15, 6 * SIZE(CO2, LDC, 2)
  1025. #endif
  1026. #ifndef LN
  1027. addq $8 * SIZE, CO1
  1028. addq $8 * SIZE, CO2
  1029. #endif
  1030. #if defined(LT) || defined(RN)
  1031. movq K, %rax
  1032. subq KK, %rax
  1033. leaq (,%rax, SIZE), %rax
  1034. leaq (AO, %rax, 8), AO
  1035. #ifdef LT
  1036. addq $32 * SIZE, B
  1037. #endif
  1038. #endif
  1039. #ifdef LN
  1040. subq $8, KK
  1041. movq BORIG, B
  1042. #endif
  1043. #ifdef LT
  1044. addq $8, KK
  1045. #endif
  1046. #ifdef RT
  1047. movq K, %rax
  1048. movq BORIG, B
  1049. salq $3 + BASE_SHIFT, %rax
  1050. addq %rax, AORIG
  1051. #endif
  1052. decq I # i --
  1053. jg .L11
  1054. ALIGN_4
  1055. .L20:
  1056. testq $4, M
  1057. je .L30
  1058. #ifdef LN
  1059. movq K, %rax
  1060. salq $2 + BASE_SHIFT, %rax
  1061. subq %rax, AORIG
  1062. #endif
  1063. #if defined(LN) || defined(RT)
  1064. movq KK, %rax
  1065. movq AORIG, AO
  1066. leaq (, %rax, SIZE), %rax
  1067. leaq (AO, %rax, 4), AO
  1068. #endif
  1069. leaq BUFFER, BO
  1070. #if defined(LN) || defined(RT)
  1071. movq KK, %rax
  1072. salq $2 + BASE_SHIFT, %rax
  1073. leaq (BO, %rax, 4), BO
  1074. #endif
  1075. movaps 0 * SIZE(AO), %xmm8
  1076. movaps 16 * SIZE(AO), %xmm10
  1077. movaps 0 * SIZE(BO), %xmm9
  1078. movaps 16 * SIZE(BO), %xmm11
  1079. movaps 32 * SIZE(BO), %xmm13
  1080. movaps 48 * SIZE(BO), %xmm15
  1081. pxor %xmm0, %xmm0
  1082. pxor %xmm1, %xmm1
  1083. pxor %xmm2, %xmm2
  1084. pxor %xmm3, %xmm3
  1085. #if defined(LT) || defined(RN)
  1086. movq KK, %rax
  1087. #else
  1088. movq K, %rax
  1089. subq KK, %rax
  1090. #endif
  1091. sarq $3, %rax
  1092. je .L25
  1093. ALIGN_4
  1094. .L22:
  1095. mulps %xmm8, %xmm9
  1096. addps %xmm9, %xmm0
  1097. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  1098. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  1099. #endif
  1100. movaps 4 * SIZE(BO), %xmm9
  1101. mulps %xmm8, %xmm9
  1102. addps %xmm9, %xmm1
  1103. movaps 8 * SIZE(BO), %xmm9
  1104. mulps %xmm8, %xmm9
  1105. mulps 12 * SIZE(BO), %xmm8
  1106. addps %xmm9, %xmm2
  1107. movaps 64 * SIZE(BO), %xmm9
  1108. addps %xmm8, %xmm3
  1109. movaps 4 * SIZE(AO), %xmm8
  1110. mulps %xmm8, %xmm11
  1111. addps %xmm11, %xmm0
  1112. movaps 20 * SIZE(BO), %xmm11
  1113. mulps %xmm8, %xmm11
  1114. addps %xmm11, %xmm1
  1115. movaps 24 * SIZE(BO), %xmm11
  1116. mulps %xmm8, %xmm11
  1117. mulps 28 * SIZE(BO), %xmm8
  1118. addps %xmm11, %xmm2
  1119. movaps 80 * SIZE(BO), %xmm11
  1120. addps %xmm8, %xmm3
  1121. movaps 8 * SIZE(AO), %xmm8
  1122. mulps %xmm8, %xmm13
  1123. addps %xmm13, %xmm0
  1124. movaps 36 * SIZE(BO), %xmm13
  1125. mulps %xmm8, %xmm13
  1126. addps %xmm13, %xmm1
  1127. movaps 40 * SIZE(BO), %xmm13
  1128. mulps %xmm8, %xmm13
  1129. mulps 44 * SIZE(BO), %xmm8
  1130. addps %xmm13, %xmm2
  1131. movaps 96 * SIZE(BO), %xmm13
  1132. addps %xmm8, %xmm3
  1133. movaps 12 * SIZE(AO), %xmm8
  1134. mulps %xmm8, %xmm15
  1135. addps %xmm15, %xmm0
  1136. movaps 52 * SIZE(BO), %xmm15
  1137. mulps %xmm8, %xmm15
  1138. addps %xmm15, %xmm1
  1139. movaps 56 * SIZE(BO), %xmm15
  1140. mulps %xmm8, %xmm15
  1141. mulps 60 * SIZE(BO), %xmm8
  1142. addps %xmm15, %xmm2
  1143. movaps 112 * SIZE(BO), %xmm15
  1144. addps %xmm8, %xmm3
  1145. movaps 32 * SIZE(AO), %xmm8
  1146. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  1147. PREFETCH (PREFETCHSIZE + 16) * SIZE(AO)
  1148. #endif
  1149. mulps %xmm10, %xmm9
  1150. addps %xmm9, %xmm0
  1151. movaps 68 * SIZE(BO), %xmm9
  1152. mulps %xmm10, %xmm9
  1153. addps %xmm9, %xmm1
  1154. movaps 72 * SIZE(BO), %xmm9
  1155. mulps %xmm10, %xmm9
  1156. mulps 76 * SIZE(BO), %xmm10
  1157. addps %xmm9, %xmm2
  1158. movaps 128 * SIZE(BO), %xmm9
  1159. addps %xmm10, %xmm3
  1160. movaps 20 * SIZE(AO), %xmm10
  1161. mulps %xmm10, %xmm11
  1162. addps %xmm11, %xmm0
  1163. movaps 84 * SIZE(BO), %xmm11
  1164. mulps %xmm10, %xmm11
  1165. addps %xmm11, %xmm1
  1166. movaps 88 * SIZE(BO), %xmm11
  1167. mulps %xmm10, %xmm11
  1168. mulps 92 * SIZE(BO), %xmm10
  1169. addps %xmm11, %xmm2
  1170. movaps 144 * SIZE(BO), %xmm11
  1171. addps %xmm10, %xmm3
  1172. movaps 24 * SIZE(AO), %xmm10
  1173. mulps %xmm10, %xmm13
  1174. addps %xmm13, %xmm0
  1175. movaps 100 * SIZE(BO), %xmm13
  1176. mulps %xmm10, %xmm13
  1177. addps %xmm13, %xmm1
  1178. movaps 104 * SIZE(BO), %xmm13
  1179. mulps %xmm10, %xmm13
  1180. mulps 108 * SIZE(BO), %xmm10
  1181. addps %xmm13, %xmm2
  1182. movaps 160 * SIZE(BO), %xmm13
  1183. addps %xmm10, %xmm3
  1184. movaps 28 * SIZE(AO), %xmm10
  1185. mulps %xmm10, %xmm15
  1186. addps %xmm15, %xmm0
  1187. movaps 116 * SIZE(BO), %xmm15
  1188. mulps %xmm10, %xmm15
  1189. addps %xmm15, %xmm1
  1190. movaps 120 * SIZE(BO), %xmm15
  1191. mulps %xmm10, %xmm15
  1192. mulps 124 * SIZE(BO), %xmm10
  1193. addps %xmm15, %xmm2
  1194. movaps 176 * SIZE(BO), %xmm15
  1195. addps %xmm10, %xmm3
  1196. movaps 48 * SIZE(AO), %xmm10
  1197. addq $ 32 * SIZE, AO
  1198. addq $128 * SIZE, BO
  1199. decq %rax
  1200. jne .L22
  1201. ALIGN_4
  1202. .L25:
  1203. #if defined(LT) || defined(RN)
  1204. movq KK, %rax
  1205. #else
  1206. movq K, %rax
  1207. subq KK, %rax
  1208. #endif
  1209. andq $7, %rax # if (k & 1)
  1210. BRANCH
  1211. je .L28
  1212. ALIGN_4
  1213. .L26:
  1214. mulps %xmm8, %xmm9
  1215. addps %xmm9, %xmm0
  1216. movaps 4 * SIZE(BO), %xmm9
  1217. mulps %xmm8, %xmm9
  1218. addps %xmm9, %xmm1
  1219. movaps 8 * SIZE(BO), %xmm9
  1220. mulps %xmm8, %xmm9
  1221. mulps 12 * SIZE(BO), %xmm8
  1222. addps %xmm9, %xmm2
  1223. movaps 16 * SIZE(BO), %xmm9
  1224. addps %xmm8, %xmm3
  1225. movaps 4 * SIZE(AO), %xmm8
  1226. addq $ 4 * SIZE, AO # aoffset += 4
  1227. addq $16 * SIZE, BO # boffset1 += 8
  1228. decq %rax
  1229. jg .L26
  1230. ALIGN_4
  1231. .L28:
  1232. #if defined(LN) || defined(RT)
  1233. movq KK, %rax
  1234. #ifdef LN
  1235. subq $4, %rax
  1236. #else
  1237. subq $4, %rax
  1238. #endif
  1239. movq AORIG, AO
  1240. movq BORIG, B
  1241. leaq BUFFER, BO
  1242. salq $2 + BASE_SHIFT, %rax
  1243. leaq (AO, %rax, 1), AO
  1244. leaq (B, %rax, 1), B
  1245. leaq (BO, %rax, 4), BO
  1246. #endif
  1247. #if defined(LN) || defined(LT)
  1248. movaps %xmm0, %xmm8
  1249. unpcklps %xmm2, %xmm0
  1250. unpckhps %xmm2, %xmm8
  1251. movaps %xmm1, %xmm14
  1252. unpcklps %xmm3, %xmm1
  1253. unpckhps %xmm3, %xmm14
  1254. movaps %xmm0, %xmm2
  1255. unpcklps %xmm1, %xmm0
  1256. unpckhps %xmm1, %xmm2
  1257. movaps %xmm8, %xmm3
  1258. unpcklps %xmm14, %xmm8
  1259. unpckhps %xmm14, %xmm3
  1260. movaps 0 * SIZE(B), %xmm1
  1261. movaps 4 * SIZE(B), %xmm5
  1262. movaps 8 * SIZE(B), %xmm10
  1263. movaps 12 * SIZE(B), %xmm11
  1264. subps %xmm0, %xmm1
  1265. subps %xmm2, %xmm5
  1266. subps %xmm8, %xmm10
  1267. subps %xmm3, %xmm11
  1268. #else
  1269. movaps 0 * SIZE(AO), %xmm8
  1270. movaps 4 * SIZE(AO), %xmm10
  1271. movaps 8 * SIZE(AO), %xmm12
  1272. movaps 12 * SIZE(AO), %xmm14
  1273. subps %xmm0, %xmm8
  1274. subps %xmm1, %xmm10
  1275. subps %xmm2, %xmm12
  1276. subps %xmm3, %xmm14
  1277. #endif
  1278. #ifdef LN
  1279. movaps 12 * SIZE(AO), %xmm6
  1280. pshufd $0xff, %xmm6, %xmm8
  1281. mulps %xmm8, %xmm11
  1282. pshufd $0xaa, %xmm6, %xmm8
  1283. mulps %xmm11, %xmm8
  1284. subps %xmm8, %xmm10
  1285. pshufd $0x55, %xmm6, %xmm8
  1286. mulps %xmm11, %xmm8
  1287. subps %xmm8, %xmm5
  1288. pshufd $0x00, %xmm6, %xmm8
  1289. mulps %xmm11, %xmm8
  1290. subps %xmm8, %xmm1
  1291. movaps 8 * SIZE(AO), %xmm6
  1292. pshufd $0xaa, %xmm6, %xmm8
  1293. mulps %xmm8, %xmm10
  1294. pshufd $0x55, %xmm6, %xmm8
  1295. mulps %xmm10, %xmm8
  1296. subps %xmm8, %xmm5
  1297. pshufd $0x00, %xmm6, %xmm8
  1298. mulps %xmm10, %xmm8
  1299. subps %xmm8, %xmm1
  1300. movaps 4 * SIZE(AO), %xmm6
  1301. pshufd $0x55, %xmm6, %xmm8
  1302. mulps %xmm8, %xmm5
  1303. pshufd $0x00, %xmm6, %xmm8
  1304. mulps %xmm5, %xmm8
  1305. subps %xmm8, %xmm1
  1306. movaps 0 * SIZE(AO), %xmm6
  1307. pshufd $0x00, %xmm6, %xmm8
  1308. mulps %xmm8, %xmm1
  1309. #endif
  1310. #ifdef LT
  1311. movaps 0 * SIZE(AO), %xmm6
  1312. pshufd $0x00, %xmm6, %xmm8
  1313. mulps %xmm8, %xmm1
  1314. pshufd $0x55, %xmm6, %xmm8
  1315. mulps %xmm1, %xmm8
  1316. subps %xmm8, %xmm5
  1317. pshufd $0xaa, %xmm6, %xmm8
  1318. mulps %xmm1, %xmm8
  1319. subps %xmm8, %xmm10
  1320. pshufd $0xff, %xmm6, %xmm8
  1321. mulps %xmm1, %xmm8
  1322. subps %xmm8, %xmm11
  1323. movaps 4 * SIZE(AO), %xmm6
  1324. pshufd $0x55, %xmm6, %xmm8
  1325. mulps %xmm8, %xmm5
  1326. pshufd $0xaa, %xmm6, %xmm8
  1327. mulps %xmm5, %xmm8
  1328. subps %xmm8, %xmm10
  1329. pshufd $0xff, %xmm6, %xmm8
  1330. mulps %xmm5, %xmm8
  1331. subps %xmm8, %xmm11
  1332. movaps 8 * SIZE(AO), %xmm6
  1333. pshufd $0xaa, %xmm6, %xmm8
  1334. mulps %xmm8, %xmm10
  1335. pshufd $0xff, %xmm6, %xmm8
  1336. mulps %xmm10, %xmm8
  1337. subps %xmm8, %xmm11
  1338. movaps 12 * SIZE(AO), %xmm6
  1339. pshufd $0xff, %xmm6, %xmm8
  1340. mulps %xmm8, %xmm11
  1341. #endif
  1342. #ifdef RN
  1343. movaps 0 * SIZE(B), %xmm0
  1344. pshufd $0x00, %xmm0, %xmm2
  1345. mulps %xmm2, %xmm8
  1346. pshufd $0x55, %xmm0, %xmm2
  1347. mulps %xmm8, %xmm2
  1348. subps %xmm2, %xmm10
  1349. pshufd $0xaa, %xmm0, %xmm2
  1350. mulps %xmm8, %xmm2
  1351. subps %xmm2, %xmm12
  1352. pshufd $0xff, %xmm0, %xmm2
  1353. mulps %xmm8, %xmm2
  1354. subps %xmm2, %xmm14
  1355. movaps 4 * SIZE(B), %xmm0
  1356. pshufd $0x55, %xmm0, %xmm2
  1357. mulps %xmm2, %xmm10
  1358. pshufd $0xaa, %xmm0, %xmm2
  1359. mulps %xmm10, %xmm2
  1360. subps %xmm2, %xmm12
  1361. pshufd $0xff, %xmm0, %xmm2
  1362. mulps %xmm10, %xmm2
  1363. subps %xmm2, %xmm14
  1364. movaps 8 * SIZE(B), %xmm0
  1365. pshufd $0xaa, %xmm0, %xmm2
  1366. mulps %xmm2, %xmm12
  1367. pshufd $0xff, %xmm0, %xmm2
  1368. mulps %xmm12, %xmm2
  1369. subps %xmm2, %xmm14
  1370. movaps 12 * SIZE(B), %xmm0
  1371. pshufd $0xff, %xmm0, %xmm2
  1372. mulps %xmm2, %xmm14
  1373. #endif
  1374. #ifdef RT
  1375. movaps 12 * SIZE(B), %xmm0
  1376. pshufd $0xff, %xmm0, %xmm2
  1377. mulps %xmm2, %xmm14
  1378. pshufd $0xaa, %xmm0, %xmm2
  1379. mulps %xmm14, %xmm2
  1380. subps %xmm2, %xmm12
  1381. pshufd $0x55, %xmm0, %xmm2
  1382. mulps %xmm14, %xmm2
  1383. subps %xmm2, %xmm10
  1384. pshufd $0x00, %xmm0, %xmm2
  1385. mulps %xmm14, %xmm2
  1386. subps %xmm2, %xmm8
  1387. movaps 8 * SIZE(B), %xmm0
  1388. pshufd $0xaa, %xmm0, %xmm2
  1389. mulps %xmm2, %xmm12
  1390. pshufd $0x55, %xmm0, %xmm2
  1391. mulps %xmm12, %xmm2
  1392. subps %xmm2, %xmm10
  1393. pshufd $0x00, %xmm0, %xmm2
  1394. mulps %xmm12, %xmm2
  1395. subps %xmm2, %xmm8
  1396. movaps 4 * SIZE(B), %xmm0
  1397. pshufd $0x55, %xmm0, %xmm2
  1398. mulps %xmm2, %xmm10
  1399. pshufd $0x00, %xmm0, %xmm2
  1400. mulps %xmm10, %xmm2
  1401. subps %xmm2, %xmm8
  1402. movaps 0 * SIZE(B), %xmm0
  1403. pshufd $0x00, %xmm0, %xmm2
  1404. mulps %xmm2, %xmm8
  1405. #endif
  1406. #ifdef LN
  1407. subq $4 * SIZE, CO1
  1408. subq $4 * SIZE, CO2
  1409. #endif
  1410. #if defined(LN) || defined(LT)
  1411. movaps %xmm1, 0 * SIZE(B)
  1412. movaps %xmm5, 4 * SIZE(B)
  1413. movaps %xmm10, 8 * SIZE(B)
  1414. movaps %xmm11, 12 * SIZE(B)
  1415. pshufd $0x00, %xmm1, %xmm2
  1416. pshufd $0x55, %xmm1, %xmm3
  1417. pshufd $0xaa, %xmm1, %xmm4
  1418. pshufd $0xff, %xmm1, %xmm6
  1419. movaps %xmm2, 0 * SIZE(BO)
  1420. movaps %xmm3, 4 * SIZE(BO)
  1421. movaps %xmm4, 8 * SIZE(BO)
  1422. movaps %xmm6, 12 * SIZE(BO)
  1423. pshufd $0x00, %xmm5, %xmm2
  1424. pshufd $0x55, %xmm5, %xmm3
  1425. pshufd $0xaa, %xmm5, %xmm4
  1426. pshufd $0xff, %xmm5, %xmm6
  1427. movaps %xmm2, 16 * SIZE(BO)
  1428. movaps %xmm3, 20 * SIZE(BO)
  1429. movaps %xmm4, 24 * SIZE(BO)
  1430. movaps %xmm6, 28 * SIZE(BO)
  1431. pshufd $0x00, %xmm10, %xmm2
  1432. pshufd $0x55, %xmm10, %xmm3
  1433. pshufd $0xaa, %xmm10, %xmm4
  1434. pshufd $0xff, %xmm10, %xmm6
  1435. movaps %xmm2, 32 * SIZE(BO)
  1436. movaps %xmm3, 36 * SIZE(BO)
  1437. movaps %xmm4, 40 * SIZE(BO)
  1438. movaps %xmm6, 44 * SIZE(BO)
  1439. pshufd $0x00, %xmm11, %xmm2
  1440. pshufd $0x55, %xmm11, %xmm3
  1441. pshufd $0xaa, %xmm11, %xmm4
  1442. pshufd $0xff, %xmm11, %xmm6
  1443. movaps %xmm2, 48 * SIZE(BO)
  1444. movaps %xmm3, 52 * SIZE(BO)
  1445. movaps %xmm4, 56 * SIZE(BO)
  1446. movaps %xmm6, 60 * SIZE(BO)
  1447. #else
  1448. movaps %xmm8, 0 * SIZE(AO)
  1449. movaps %xmm10, 4 * SIZE(AO)
  1450. movaps %xmm12, 8 * SIZE(AO)
  1451. movaps %xmm14, 12 * SIZE(AO)
  1452. #endif
  1453. #if defined(LN) || defined(LT)
  1454. movaps %xmm1, %xmm0
  1455. unpcklps %xmm10, %xmm1
  1456. unpckhps %xmm10, %xmm0
  1457. movaps %xmm5, %xmm7
  1458. unpcklps %xmm11, %xmm5
  1459. unpckhps %xmm11, %xmm7
  1460. movaps %xmm1, %xmm10
  1461. unpcklps %xmm5, %xmm1
  1462. unpckhps %xmm5, %xmm10
  1463. movaps %xmm0, %xmm11
  1464. unpcklps %xmm7, %xmm0
  1465. unpckhps %xmm7, %xmm11
  1466. movlps %xmm1, 0 * SIZE(CO1)
  1467. movhps %xmm1, 2 * SIZE(CO1)
  1468. movlps %xmm10, 0 * SIZE(CO2)
  1469. movhps %xmm10, 2 * SIZE(CO2)
  1470. movlps %xmm0, 0 * SIZE(CO1, LDC, 2)
  1471. movhps %xmm0, 2 * SIZE(CO1, LDC, 2)
  1472. movlps %xmm11, 0 * SIZE(CO2, LDC, 2)
  1473. movhps %xmm11, 2 * SIZE(CO2, LDC, 2)
  1474. #else
  1475. movlps %xmm8, 0 * SIZE(CO1)
  1476. movhps %xmm8, 2 * SIZE(CO1)
  1477. movlps %xmm10, 0 * SIZE(CO2)
  1478. movhps %xmm10, 2 * SIZE(CO2)
  1479. movlps %xmm12, 0 * SIZE(CO1, LDC, 2)
  1480. movhps %xmm12, 2 * SIZE(CO1, LDC, 2)
  1481. movlps %xmm14, 0 * SIZE(CO2, LDC, 2)
  1482. movhps %xmm14, 2 * SIZE(CO2, LDC, 2)
  1483. #endif
  1484. #ifndef LN
  1485. addq $4 * SIZE, CO1
  1486. addq $4 * SIZE, CO2
  1487. #endif
  1488. #if defined(LT) || defined(RN)
  1489. movq K, %rax
  1490. subq KK, %rax
  1491. leaq (,%rax, SIZE), %rax
  1492. leaq (AO, %rax, 4), AO
  1493. #ifdef LT
  1494. addq $16 * SIZE, B
  1495. #endif
  1496. #endif
  1497. #ifdef LN
  1498. subq $4, KK
  1499. movq BORIG, B
  1500. #endif
  1501. #ifdef LT
  1502. addq $4, KK
  1503. #endif
  1504. #ifdef RT
  1505. movq K, %rax
  1506. movq BORIG, B
  1507. salq $2 + BASE_SHIFT, %rax
  1508. addq %rax, AORIG
  1509. #endif
  1510. ALIGN_4
  1511. .L30:
  1512. testq $2, M
  1513. je .L40
  1514. #ifdef LN
  1515. movq K, %rax
  1516. salq $1 + BASE_SHIFT, %rax
  1517. subq %rax, AORIG
  1518. #endif
  1519. #if defined(LN) || defined(RT)
  1520. movq KK, %rax
  1521. movq AORIG, AO
  1522. leaq (, %rax, SIZE), %rax
  1523. leaq (AO, %rax, 2), AO
  1524. #endif
  1525. leaq BUFFER, BO
  1526. #if defined(LN) || defined(RT)
  1527. movq KK, %rax
  1528. salq $2 + BASE_SHIFT, %rax
  1529. leaq (BO, %rax, 4), BO
  1530. #endif
  1531. movaps 0 * SIZE(AO), %xmm8
  1532. movaps 8 * SIZE(AO), %xmm10
  1533. movaps 0 * SIZE(BO), %xmm9
  1534. movaps 16 * SIZE(BO), %xmm11
  1535. movaps 32 * SIZE(BO), %xmm13
  1536. movaps 48 * SIZE(BO), %xmm15
  1537. pxor %xmm0, %xmm0
  1538. pxor %xmm1, %xmm1
  1539. pxor %xmm2, %xmm2
  1540. pxor %xmm3, %xmm3
  1541. #if defined(LT) || defined(RN)
  1542. movq KK, %rax
  1543. #else
  1544. movq K, %rax
  1545. subq KK, %rax
  1546. #endif
  1547. sarq $3, %rax
  1548. je .L35
  1549. ALIGN_4
  1550. .L32:
  1551. mulps %xmm8, %xmm9
  1552. addps %xmm9, %xmm0
  1553. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  1554. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  1555. #endif
  1556. movaps 4 * SIZE(BO), %xmm9
  1557. mulps %xmm8, %xmm9
  1558. addps %xmm9, %xmm1
  1559. movaps 8 * SIZE(BO), %xmm9
  1560. mulps %xmm8, %xmm9
  1561. addps %xmm9, %xmm2
  1562. movaps 12 * SIZE(BO), %xmm9
  1563. mulps %xmm8, %xmm9
  1564. movsd 2 * SIZE(AO), %xmm8
  1565. addps %xmm9, %xmm3
  1566. movaps 64 * SIZE(BO), %xmm9
  1567. mulps %xmm8, %xmm11
  1568. addps %xmm11, %xmm0
  1569. movaps 20 * SIZE(BO), %xmm11
  1570. mulps %xmm8, %xmm11
  1571. addps %xmm11, %xmm1
  1572. movaps 24 * SIZE(BO), %xmm11
  1573. mulps %xmm8, %xmm11
  1574. addps %xmm11, %xmm2
  1575. movaps 28 * SIZE(BO), %xmm11
  1576. mulps %xmm8, %xmm11
  1577. movsd 4 * SIZE(AO), %xmm8
  1578. addps %xmm11, %xmm3
  1579. movaps 80 * SIZE(BO), %xmm11
  1580. mulps %xmm8, %xmm13
  1581. addps %xmm13, %xmm0
  1582. movaps 36 * SIZE(BO), %xmm13
  1583. mulps %xmm8, %xmm13
  1584. addps %xmm13, %xmm1
  1585. movaps 40 * SIZE(BO), %xmm13
  1586. mulps %xmm8, %xmm13
  1587. addps %xmm13, %xmm2
  1588. movaps 44 * SIZE(BO), %xmm13
  1589. mulps %xmm8, %xmm13
  1590. movsd 6 * SIZE(AO), %xmm8
  1591. addps %xmm13, %xmm3
  1592. movaps 96 * SIZE(BO), %xmm13
  1593. mulps %xmm8, %xmm15
  1594. addps %xmm15, %xmm0
  1595. movaps 52 * SIZE(BO), %xmm15
  1596. mulps %xmm8, %xmm15
  1597. addps %xmm15, %xmm1
  1598. movaps 56 * SIZE(BO), %xmm15
  1599. mulps %xmm8, %xmm15
  1600. addps %xmm15, %xmm2
  1601. movaps 60 * SIZE(BO), %xmm15
  1602. mulps %xmm8, %xmm15
  1603. movsd 16 * SIZE(AO), %xmm8
  1604. addps %xmm15, %xmm3
  1605. movaps 112 * SIZE(BO), %xmm15
  1606. mulps %xmm10, %xmm9
  1607. addps %xmm9, %xmm0
  1608. movaps 68 * SIZE(BO), %xmm9
  1609. mulps %xmm10, %xmm9
  1610. addps %xmm9, %xmm1
  1611. movaps 72 * SIZE(BO), %xmm9
  1612. mulps %xmm10, %xmm9
  1613. addps %xmm9, %xmm2
  1614. movaps 76 * SIZE(BO), %xmm9
  1615. mulps %xmm10, %xmm9
  1616. movsd 10 * SIZE(AO), %xmm10
  1617. addps %xmm9, %xmm3
  1618. movaps 128 * SIZE(BO), %xmm9
  1619. mulps %xmm10, %xmm11
  1620. addps %xmm11, %xmm0
  1621. movaps 84 * SIZE(BO), %xmm11
  1622. mulps %xmm10, %xmm11
  1623. addps %xmm11, %xmm1
  1624. movaps 88 * SIZE(BO), %xmm11
  1625. mulps %xmm10, %xmm11
  1626. addps %xmm11, %xmm2
  1627. movaps 92 * SIZE(BO), %xmm11
  1628. mulps %xmm10, %xmm11
  1629. movsd 12 * SIZE(AO), %xmm10
  1630. addps %xmm11, %xmm3
  1631. movaps 144 * SIZE(BO), %xmm11
  1632. mulps %xmm10, %xmm13
  1633. addps %xmm13, %xmm0
  1634. movaps 100 * SIZE(BO), %xmm13
  1635. mulps %xmm10, %xmm13
  1636. addps %xmm13, %xmm1
  1637. movaps 104 * SIZE(BO), %xmm13
  1638. mulps %xmm10, %xmm13
  1639. addps %xmm13, %xmm2
  1640. movaps 108 * SIZE(BO), %xmm13
  1641. mulps %xmm10, %xmm13
  1642. movsd 14 * SIZE(AO), %xmm10
  1643. addps %xmm13, %xmm3
  1644. movaps 160 * SIZE(BO), %xmm13
  1645. mulps %xmm10, %xmm15
  1646. addps %xmm15, %xmm0
  1647. movaps 116 * SIZE(BO), %xmm15
  1648. mulps %xmm10, %xmm15
  1649. addps %xmm15, %xmm1
  1650. movaps 120 * SIZE(BO), %xmm15
  1651. mulps %xmm10, %xmm15
  1652. addps %xmm15, %xmm2
  1653. movaps 124 * SIZE(BO), %xmm15
  1654. mulps %xmm10, %xmm15
  1655. movsd 24 * SIZE(AO), %xmm10
  1656. addps %xmm15, %xmm3
  1657. movaps 176 * SIZE(BO), %xmm15
  1658. addq $ 16 * SIZE, AO
  1659. addq $128 * SIZE, BO
  1660. decq %rax
  1661. jne .L32
  1662. ALIGN_4
  1663. .L35:
  1664. #if defined(LT) || defined(RN)
  1665. movq KK, %rax
  1666. #else
  1667. movq K, %rax
  1668. subq KK, %rax
  1669. #endif
  1670. andq $7, %rax # if (k & 1)
  1671. BRANCH
  1672. je .L38
  1673. ALIGN_4
  1674. .L36:
  1675. mulps %xmm8, %xmm9
  1676. addps %xmm9, %xmm0
  1677. movaps 4 * SIZE(BO), %xmm9
  1678. mulps %xmm8, %xmm9
  1679. addps %xmm9, %xmm1
  1680. movaps 8 * SIZE(BO), %xmm9
  1681. mulps %xmm8, %xmm9
  1682. addps %xmm9, %xmm2
  1683. movaps 12 * SIZE(BO), %xmm9
  1684. mulps %xmm8, %xmm9
  1685. movsd 2 * SIZE(AO), %xmm8
  1686. addps %xmm9, %xmm3
  1687. movaps 16 * SIZE(BO), %xmm9
  1688. addq $ 2 * SIZE, AO # aoffset += 4
  1689. addq $16 * SIZE, BO # boffset1 += 8
  1690. decq %rax
  1691. jg .L36
  1692. ALIGN_4
  1693. .L38:
  1694. #if defined(LN) || defined(RT)
  1695. movq KK, %rax
  1696. #ifdef LN
  1697. subq $2, %rax
  1698. #else
  1699. subq $4, %rax
  1700. #endif
  1701. movq AORIG, AO
  1702. movq BORIG, B
  1703. leaq BUFFER, BO
  1704. salq $1 + BASE_SHIFT, %rax
  1705. leaq (AO, %rax, 1), AO
  1706. leaq (B, %rax, 2), B
  1707. leaq (BO, %rax, 8), BO
  1708. #endif
  1709. #if defined(LN) || defined(LT)
  1710. unpcklps %xmm2, %xmm0
  1711. unpcklps %xmm3, %xmm1
  1712. movaps %xmm0, %xmm2
  1713. unpcklps %xmm1, %xmm0
  1714. unpckhps %xmm1, %xmm2
  1715. movapd 0 * SIZE(B), %xmm1
  1716. movapd 4 * SIZE(B), %xmm5
  1717. subps %xmm0, %xmm1
  1718. subps %xmm2, %xmm5
  1719. #else
  1720. #ifdef movsd
  1721. xorps %xmm8, %xmm8
  1722. #endif
  1723. movsd 0 * SIZE(AO), %xmm8
  1724. #ifdef movsd
  1725. xorps %xmm10, %xmm10
  1726. #endif
  1727. movsd 2 * SIZE(AO), %xmm10
  1728. #ifdef movsd
  1729. xorps %xmm12, %xmm12
  1730. #endif
  1731. movsd 4 * SIZE(AO), %xmm12
  1732. #ifdef movsd
  1733. xorps %xmm14, %xmm14
  1734. #endif
  1735. movsd 6 * SIZE(AO), %xmm14
  1736. subps %xmm0, %xmm8
  1737. subps %xmm1, %xmm10
  1738. subps %xmm2, %xmm12
  1739. subps %xmm3, %xmm14
  1740. #endif
  1741. #ifdef LN
  1742. movaps 0 * SIZE(AO), %xmm6
  1743. pshufd $0xff, %xmm6, %xmm8
  1744. mulps %xmm8, %xmm5
  1745. pshufd $0xaa, %xmm6, %xmm8
  1746. mulps %xmm5, %xmm8
  1747. subps %xmm8, %xmm1
  1748. pshufd $0x00, %xmm6, %xmm8
  1749. mulps %xmm8, %xmm1
  1750. #endif
  1751. #ifdef LT
  1752. movaps 0 * SIZE(AO), %xmm6
  1753. pshufd $0x00, %xmm6, %xmm8
  1754. mulps %xmm8, %xmm1
  1755. pshufd $0x55, %xmm6, %xmm8
  1756. mulps %xmm1, %xmm8
  1757. subps %xmm8, %xmm5
  1758. pshufd $0xff, %xmm6, %xmm8
  1759. mulps %xmm8, %xmm5
  1760. #endif
  1761. #ifdef RN
  1762. movaps 0 * SIZE(B), %xmm0
  1763. pshufd $0x00, %xmm0, %xmm2
  1764. mulps %xmm2, %xmm8
  1765. pshufd $0x55, %xmm0, %xmm2
  1766. mulps %xmm8, %xmm2
  1767. subps %xmm2, %xmm10
  1768. pshufd $0xaa, %xmm0, %xmm2
  1769. mulps %xmm8, %xmm2
  1770. subps %xmm2, %xmm12
  1771. pshufd $0xff, %xmm0, %xmm2
  1772. mulps %xmm8, %xmm2
  1773. subps %xmm2, %xmm14
  1774. movaps 4 * SIZE(B), %xmm0
  1775. pshufd $0x55, %xmm0, %xmm2
  1776. mulps %xmm2, %xmm10
  1777. pshufd $0xaa, %xmm0, %xmm2
  1778. mulps %xmm10, %xmm2
  1779. subps %xmm2, %xmm12
  1780. pshufd $0xff, %xmm0, %xmm2
  1781. mulps %xmm10, %xmm2
  1782. subps %xmm2, %xmm14
  1783. movaps 8 * SIZE(B), %xmm0
  1784. pshufd $0xaa, %xmm0, %xmm2
  1785. mulps %xmm2, %xmm12
  1786. pshufd $0xff, %xmm0, %xmm2
  1787. mulps %xmm12, %xmm2
  1788. subps %xmm2, %xmm14
  1789. movaps 12 * SIZE(B), %xmm0
  1790. pshufd $0xff, %xmm0, %xmm2
  1791. mulps %xmm2, %xmm14
  1792. #endif
  1793. #ifdef RT
  1794. movaps 12 * SIZE(B), %xmm0
  1795. pshufd $0xff, %xmm0, %xmm2
  1796. mulps %xmm2, %xmm14
  1797. pshufd $0xaa, %xmm0, %xmm2
  1798. mulps %xmm14, %xmm2
  1799. subps %xmm2, %xmm12
  1800. pshufd $0x55, %xmm0, %xmm2
  1801. mulps %xmm14, %xmm2
  1802. subps %xmm2, %xmm10
  1803. pshufd $0x00, %xmm0, %xmm2
  1804. mulps %xmm14, %xmm2
  1805. subps %xmm2, %xmm8
  1806. movaps 8 * SIZE(B), %xmm0
  1807. pshufd $0xaa, %xmm0, %xmm2
  1808. mulps %xmm2, %xmm12
  1809. pshufd $0x55, %xmm0, %xmm2
  1810. mulps %xmm12, %xmm2
  1811. subps %xmm2, %xmm10
  1812. pshufd $0x00, %xmm0, %xmm2
  1813. mulps %xmm12, %xmm2
  1814. subps %xmm2, %xmm8
  1815. movaps 4 * SIZE(B), %xmm0
  1816. pshufd $0x55, %xmm0, %xmm2
  1817. mulps %xmm2, %xmm10
  1818. pshufd $0x00, %xmm0, %xmm2
  1819. mulps %xmm10, %xmm2
  1820. subps %xmm2, %xmm8
  1821. movaps 0 * SIZE(B), %xmm0
  1822. pshufd $0x00, %xmm0, %xmm2
  1823. mulps %xmm2, %xmm8
  1824. #endif
  1825. #ifdef LN
  1826. subq $2 * SIZE, CO1
  1827. subq $2 * SIZE, CO2
  1828. #endif
  1829. #if defined(LN) || defined(LT)
  1830. movaps %xmm1, 0 * SIZE(B)
  1831. movaps %xmm5, 4 * SIZE(B)
  1832. pshufd $0x00, %xmm1, %xmm2
  1833. pshufd $0x55, %xmm1, %xmm3
  1834. pshufd $0xaa, %xmm1, %xmm4
  1835. pshufd $0xff, %xmm1, %xmm6
  1836. movaps %xmm2, 0 * SIZE(BO)
  1837. movaps %xmm3, 4 * SIZE(BO)
  1838. movaps %xmm4, 8 * SIZE(BO)
  1839. movaps %xmm6, 12 * SIZE(BO)
  1840. pshufd $0x00, %xmm5, %xmm2
  1841. pshufd $0x55, %xmm5, %xmm3
  1842. pshufd $0xaa, %xmm5, %xmm4
  1843. pshufd $0xff, %xmm5, %xmm6
  1844. movaps %xmm2, 16 * SIZE(BO)
  1845. movaps %xmm3, 20 * SIZE(BO)
  1846. movaps %xmm4, 24 * SIZE(BO)
  1847. movaps %xmm6, 28 * SIZE(BO)
  1848. #else
  1849. movlps %xmm8, 0 * SIZE(AO)
  1850. movlps %xmm10, 2 * SIZE(AO)
  1851. movlps %xmm12, 4 * SIZE(AO)
  1852. movlps %xmm14, 6 * SIZE(AO)
  1853. #endif
  1854. #if defined(LN) || defined(LT)
  1855. movaps %xmm1, %xmm0
  1856. unpcklps %xmm10, %xmm1
  1857. unpckhps %xmm10, %xmm0
  1858. movaps %xmm5, %xmm7
  1859. unpcklps %xmm11, %xmm5
  1860. unpckhps %xmm11, %xmm7
  1861. movaps %xmm1, %xmm10
  1862. unpcklps %xmm5, %xmm1
  1863. unpckhps %xmm5, %xmm10
  1864. movaps %xmm0, %xmm11
  1865. unpcklps %xmm7, %xmm0
  1866. unpckhps %xmm7, %xmm11
  1867. movlps %xmm1, 0 * SIZE(CO1)
  1868. movlps %xmm10, 0 * SIZE(CO2)
  1869. movlps %xmm0, 0 * SIZE(CO1, LDC, 2)
  1870. movlps %xmm11, 0 * SIZE(CO2, LDC, 2)
  1871. #else
  1872. movlps %xmm8, 0 * SIZE(CO1)
  1873. movlps %xmm10, 0 * SIZE(CO2)
  1874. movlps %xmm12, 0 * SIZE(CO1, LDC, 2)
  1875. movlps %xmm14, 0 * SIZE(CO2, LDC, 2)
  1876. #endif
  1877. #ifndef LN
  1878. addq $2 * SIZE, CO1
  1879. addq $2 * SIZE, CO2
  1880. #endif
  1881. #if defined(LT) || defined(RN)
  1882. movq K, %rax
  1883. subq KK, %rax
  1884. leaq (,%rax, SIZE), %rax
  1885. leaq (AO, %rax, 2), AO
  1886. #ifdef LT
  1887. addq $8 * SIZE, B
  1888. #endif
  1889. #endif
  1890. #ifdef LN
  1891. subq $2, KK
  1892. movq BORIG, B
  1893. #endif
  1894. #ifdef LT
  1895. addq $2, KK
  1896. #endif
  1897. #ifdef RT
  1898. movq K, %rax
  1899. movq BORIG, B
  1900. salq $1 + BASE_SHIFT, %rax
  1901. addq %rax, AORIG
  1902. #endif
  1903. ALIGN_4
  1904. .L40:
  1905. testq $1, M
  1906. je .L49
  1907. #ifdef LN
  1908. movq K, %rax
  1909. salq $BASE_SHIFT, %rax
  1910. subq %rax, AORIG
  1911. #endif
  1912. #if defined(LN) || defined(RT)
  1913. movq KK, %rax
  1914. movq AORIG, AO
  1915. leaq (AO, %rax, SIZE), AO
  1916. #endif
  1917. leaq BUFFER, BO
  1918. #if defined(LN) || defined(RT)
  1919. movq KK, %rax
  1920. salq $2 + BASE_SHIFT, %rax
  1921. leaq (BO, %rax, 4), BO
  1922. #endif
  1923. movss 0 * SIZE(AO), %xmm8
  1924. movss 4 * SIZE(AO), %xmm10
  1925. movss 0 * SIZE(BO), %xmm9
  1926. movss 16 * SIZE(BO), %xmm11
  1927. movss 32 * SIZE(BO), %xmm13
  1928. movss 48 * SIZE(BO), %xmm15
  1929. pxor %xmm0, %xmm0
  1930. pxor %xmm1, %xmm1
  1931. pxor %xmm2, %xmm2
  1932. pxor %xmm3, %xmm3
  1933. #if defined(LT) || defined(RN)
  1934. movq KK, %rax
  1935. #else
  1936. movq K, %rax
  1937. subq KK, %rax
  1938. #endif
  1939. sarq $3, %rax
  1940. je .L45
  1941. ALIGN_4
  1942. .L42:
  1943. mulss %xmm8, %xmm9
  1944. addss %xmm9, %xmm0
  1945. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  1946. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  1947. #endif
  1948. movss 4 * SIZE(BO), %xmm9
  1949. mulss %xmm8, %xmm9
  1950. addss %xmm9, %xmm1
  1951. movss 8 * SIZE(BO), %xmm9
  1952. mulss %xmm8, %xmm9
  1953. addss %xmm9, %xmm2
  1954. movss 12 * SIZE(BO), %xmm9
  1955. mulss %xmm8, %xmm9
  1956. movss 1 * SIZE(AO), %xmm8
  1957. addss %xmm9, %xmm3
  1958. movss 64 * SIZE(BO), %xmm9
  1959. mulss %xmm8, %xmm11
  1960. addss %xmm11, %xmm0
  1961. movss 20 * SIZE(BO), %xmm11
  1962. mulss %xmm8, %xmm11
  1963. addss %xmm11, %xmm1
  1964. movss 24 * SIZE(BO), %xmm11
  1965. mulss %xmm8, %xmm11
  1966. addss %xmm11, %xmm2
  1967. movss 28 * SIZE(BO), %xmm11
  1968. mulss %xmm8, %xmm11
  1969. movss 2 * SIZE(AO), %xmm8
  1970. addss %xmm11, %xmm3
  1971. movss 80 * SIZE(BO), %xmm11
  1972. mulss %xmm8, %xmm13
  1973. addss %xmm13, %xmm0
  1974. movss 36 * SIZE(BO), %xmm13
  1975. mulss %xmm8, %xmm13
  1976. addss %xmm13, %xmm1
  1977. movss 40 * SIZE(BO), %xmm13
  1978. mulss %xmm8, %xmm13
  1979. addss %xmm13, %xmm2
  1980. movss 44 * SIZE(BO), %xmm13
  1981. mulss %xmm8, %xmm13
  1982. movss 3 * SIZE(AO), %xmm8
  1983. addss %xmm13, %xmm3
  1984. movss 96 * SIZE(BO), %xmm13
  1985. mulss %xmm8, %xmm15
  1986. addss %xmm15, %xmm0
  1987. movss 52 * SIZE(BO), %xmm15
  1988. mulss %xmm8, %xmm15
  1989. addss %xmm15, %xmm1
  1990. movss 56 * SIZE(BO), %xmm15
  1991. mulss %xmm8, %xmm15
  1992. addss %xmm15, %xmm2
  1993. movss 60 * SIZE(BO), %xmm15
  1994. mulss %xmm8, %xmm15
  1995. movss 8 * SIZE(AO), %xmm8
  1996. addss %xmm15, %xmm3
  1997. movss 112 * SIZE(BO), %xmm15
  1998. mulss %xmm10, %xmm9
  1999. addss %xmm9, %xmm0
  2000. movss 68 * SIZE(BO), %xmm9
  2001. mulss %xmm10, %xmm9
  2002. addss %xmm9, %xmm1
  2003. movss 72 * SIZE(BO), %xmm9
  2004. mulss %xmm10, %xmm9
  2005. addss %xmm9, %xmm2
  2006. movss 76 * SIZE(BO), %xmm9
  2007. mulss %xmm10, %xmm9
  2008. movss 5 * SIZE(AO), %xmm10
  2009. addss %xmm9, %xmm3
  2010. movss 128 * SIZE(BO), %xmm9
  2011. mulss %xmm10, %xmm11
  2012. addss %xmm11, %xmm0
  2013. movss 84 * SIZE(BO), %xmm11
  2014. mulss %xmm10, %xmm11
  2015. addss %xmm11, %xmm1
  2016. movss 88 * SIZE(BO), %xmm11
  2017. mulss %xmm10, %xmm11
  2018. addss %xmm11, %xmm2
  2019. movss 92 * SIZE(BO), %xmm11
  2020. mulss %xmm10, %xmm11
  2021. movss 6 * SIZE(AO), %xmm10
  2022. addss %xmm11, %xmm3
  2023. movss 144 * SIZE(BO), %xmm11
  2024. mulss %xmm10, %xmm13
  2025. addss %xmm13, %xmm0
  2026. movss 100 * SIZE(BO), %xmm13
  2027. mulss %xmm10, %xmm13
  2028. addss %xmm13, %xmm1
  2029. movss 104 * SIZE(BO), %xmm13
  2030. mulss %xmm10, %xmm13
  2031. addss %xmm13, %xmm2
  2032. movss 108 * SIZE(BO), %xmm13
  2033. mulss %xmm10, %xmm13
  2034. movss 7 * SIZE(AO), %xmm10
  2035. addss %xmm13, %xmm3
  2036. movss 160 * SIZE(BO), %xmm13
  2037. mulss %xmm10, %xmm15
  2038. addss %xmm15, %xmm0
  2039. movss 116 * SIZE(BO), %xmm15
  2040. mulss %xmm10, %xmm15
  2041. addss %xmm15, %xmm1
  2042. movss 120 * SIZE(BO), %xmm15
  2043. mulss %xmm10, %xmm15
  2044. addss %xmm15, %xmm2
  2045. movss 124 * SIZE(BO), %xmm15
  2046. mulss %xmm10, %xmm15
  2047. movss 12 * SIZE(AO), %xmm10
  2048. addss %xmm15, %xmm3
  2049. movss 176 * SIZE(BO), %xmm15
  2050. addq $ 8 * SIZE, AO
  2051. addq $128 * SIZE, BO
  2052. decq %rax
  2053. jne .L42
  2054. ALIGN_4
  2055. .L45:
  2056. #if defined(LT) || defined(RN)
  2057. movq KK, %rax
  2058. #else
  2059. movq K, %rax
  2060. subq KK, %rax
  2061. #endif
  2062. andq $7, %rax # if (k & 1)
  2063. BRANCH
  2064. je .L48
  2065. ALIGN_4
  2066. .L46:
  2067. mulps %xmm8, %xmm9
  2068. addps %xmm9, %xmm0
  2069. movss 4 * SIZE(BO), %xmm9
  2070. mulps %xmm8, %xmm9
  2071. addps %xmm9, %xmm1
  2072. movss 8 * SIZE(BO), %xmm9
  2073. mulps %xmm8, %xmm9
  2074. addps %xmm9, %xmm2
  2075. movss 12 * SIZE(BO), %xmm9
  2076. mulps %xmm8, %xmm9
  2077. movss 1 * SIZE(AO), %xmm8
  2078. addps %xmm9, %xmm3
  2079. movss 16 * SIZE(BO), %xmm9
  2080. addq $ 1 * SIZE, AO # aoffset += 4
  2081. addq $16 * SIZE, BO # boffset1 += 8
  2082. decq %rax
  2083. jg .L46
  2084. ALIGN_4
  2085. .L48:
  2086. #if defined(LN) || defined(RT)
  2087. movq KK, %rax
  2088. #ifdef LN
  2089. subq $1, %rax
  2090. #else
  2091. subq $4, %rax
  2092. #endif
  2093. movq AORIG, AO
  2094. movq BORIG, B
  2095. leaq BUFFER, BO
  2096. salq $BASE_SHIFT, %rax
  2097. leaq (AO, %rax, 1), AO
  2098. leaq (B, %rax, 4), B
  2099. leaq (BO, %rax, 8), BO
  2100. leaq (BO, %rax, 8), BO
  2101. #endif
  2102. #if defined(LN) || defined(LT)
  2103. unpcklps %xmm2, %xmm0
  2104. unpcklps %xmm3, %xmm1
  2105. unpcklps %xmm1, %xmm0
  2106. movapd 0 * SIZE(B), %xmm1
  2107. subps %xmm0, %xmm1
  2108. #else
  2109. movss 0 * SIZE(AO), %xmm8
  2110. movss 1 * SIZE(AO), %xmm10
  2111. movss 2 * SIZE(AO), %xmm12
  2112. movss 3 * SIZE(AO), %xmm14
  2113. subss %xmm0, %xmm8
  2114. subss %xmm1, %xmm10
  2115. subss %xmm2, %xmm12
  2116. subss %xmm3, %xmm14
  2117. #endif
  2118. #if defined(LN) || defined(LT)
  2119. movss 0 * SIZE(AO), %xmm6
  2120. pshufd $0x00, %xmm6, %xmm8
  2121. mulps %xmm8, %xmm1
  2122. #endif
  2123. #ifdef RN
  2124. movaps 0 * SIZE(B), %xmm0
  2125. pshufd $0x00, %xmm0, %xmm2
  2126. mulss %xmm2, %xmm8
  2127. pshufd $0x55, %xmm0, %xmm2
  2128. mulss %xmm8, %xmm2
  2129. subss %xmm2, %xmm10
  2130. pshufd $0xaa, %xmm0, %xmm2
  2131. mulss %xmm8, %xmm2
  2132. subss %xmm2, %xmm12
  2133. pshufd $0xff, %xmm0, %xmm2
  2134. mulss %xmm8, %xmm2
  2135. subss %xmm2, %xmm14
  2136. movaps 4 * SIZE(B), %xmm0
  2137. pshufd $0x55, %xmm0, %xmm2
  2138. mulss %xmm2, %xmm10
  2139. pshufd $0xaa, %xmm0, %xmm2
  2140. mulss %xmm10, %xmm2
  2141. subss %xmm2, %xmm12
  2142. pshufd $0xff, %xmm0, %xmm2
  2143. mulss %xmm10, %xmm2
  2144. subss %xmm2, %xmm14
  2145. movaps 8 * SIZE(B), %xmm0
  2146. pshufd $0xaa, %xmm0, %xmm2
  2147. mulss %xmm2, %xmm12
  2148. pshufd $0xff, %xmm0, %xmm2
  2149. mulss %xmm12, %xmm2
  2150. subss %xmm2, %xmm14
  2151. movaps 12 * SIZE(B), %xmm0
  2152. pshufd $0xff, %xmm0, %xmm2
  2153. mulss %xmm2, %xmm14
  2154. #endif
  2155. #ifdef RT
  2156. movaps 12 * SIZE(B), %xmm0
  2157. pshufd $0xff, %xmm0, %xmm2
  2158. mulss %xmm2, %xmm14
  2159. pshufd $0xaa, %xmm0, %xmm2
  2160. mulss %xmm14, %xmm2
  2161. subss %xmm2, %xmm12
  2162. pshufd $0x55, %xmm0, %xmm2
  2163. mulss %xmm14, %xmm2
  2164. subss %xmm2, %xmm10
  2165. pshufd $0x00, %xmm0, %xmm2
  2166. mulss %xmm14, %xmm2
  2167. subss %xmm2, %xmm8
  2168. movaps 8 * SIZE(B), %xmm0
  2169. pshufd $0xaa, %xmm0, %xmm2
  2170. mulss %xmm2, %xmm12
  2171. pshufd $0x55, %xmm0, %xmm2
  2172. mulss %xmm12, %xmm2
  2173. subss %xmm2, %xmm10
  2174. pshufd $0x00, %xmm0, %xmm2
  2175. mulss %xmm12, %xmm2
  2176. subss %xmm2, %xmm8
  2177. movaps 4 * SIZE(B), %xmm0
  2178. pshufd $0x55, %xmm0, %xmm2
  2179. mulss %xmm2, %xmm10
  2180. pshufd $0x00, %xmm0, %xmm2
  2181. mulss %xmm10, %xmm2
  2182. subss %xmm2, %xmm8
  2183. movaps 0 * SIZE(B), %xmm0
  2184. pshufd $0x00, %xmm0, %xmm2
  2185. mulss %xmm2, %xmm8
  2186. #endif
  2187. #ifdef LN
  2188. subq $1 * SIZE, CO1
  2189. subq $1 * SIZE, CO2
  2190. #endif
  2191. #if defined(LN) || defined(LT)
  2192. movaps %xmm1, 0 * SIZE(B)
  2193. pshufd $0x00, %xmm1, %xmm2
  2194. pshufd $0x55, %xmm1, %xmm3
  2195. pshufd $0xaa, %xmm1, %xmm4
  2196. pshufd $0xff, %xmm1, %xmm6
  2197. movaps %xmm2, 0 * SIZE(BO)
  2198. movaps %xmm3, 4 * SIZE(BO)
  2199. movaps %xmm4, 8 * SIZE(BO)
  2200. movaps %xmm6, 12 * SIZE(BO)
  2201. #else
  2202. movss %xmm8, 0 * SIZE(AO)
  2203. movss %xmm10, 1 * SIZE(AO)
  2204. movss %xmm12, 2 * SIZE(AO)
  2205. movss %xmm14, 3 * SIZE(AO)
  2206. #endif
  2207. #if defined(LN) || defined(LT)
  2208. movaps %xmm1, %xmm0
  2209. unpcklps %xmm10, %xmm1
  2210. unpckhps %xmm10, %xmm0
  2211. movaps %xmm5, %xmm7
  2212. unpcklps %xmm11, %xmm5
  2213. unpckhps %xmm11, %xmm7
  2214. movaps %xmm1, %xmm10
  2215. unpcklps %xmm5, %xmm1
  2216. unpckhps %xmm5, %xmm10
  2217. movaps %xmm0, %xmm11
  2218. unpcklps %xmm7, %xmm0
  2219. unpckhps %xmm7, %xmm11
  2220. movss %xmm1, 0 * SIZE(CO1)
  2221. movss %xmm10, 0 * SIZE(CO2)
  2222. movss %xmm0, 0 * SIZE(CO1, LDC, 2)
  2223. movss %xmm11, 0 * SIZE(CO2, LDC, 2)
  2224. #else
  2225. movss %xmm8, 0 * SIZE(CO1)
  2226. movss %xmm10, 0 * SIZE(CO2)
  2227. movss %xmm12, 0 * SIZE(CO1, LDC, 2)
  2228. movss %xmm14, 0 * SIZE(CO2, LDC, 2)
  2229. #endif
  2230. #ifndef LN
  2231. addq $1 * SIZE, CO1
  2232. addq $1 * SIZE, CO2
  2233. #endif
  2234. #if defined(LT) || defined(RN)
  2235. movq K, %rax
  2236. subq KK, %rax
  2237. leaq (,%rax, SIZE), %rax
  2238. leaq (AO, %rax, 1), AO
  2239. #ifdef LT
  2240. addq $4 * SIZE, B
  2241. #endif
  2242. #endif
  2243. #ifdef LN
  2244. subq $1, KK
  2245. movq BORIG, B
  2246. #endif
  2247. #ifdef LT
  2248. addq $1, KK
  2249. #endif
  2250. #ifdef RT
  2251. movq K, %rax
  2252. movq BORIG, B
  2253. salq $BASE_SHIFT, %rax
  2254. addq %rax, AORIG
  2255. #endif
  2256. ALIGN_4
  2257. .L49:
  2258. #ifdef LN
  2259. leaq (, K, SIZE), %rax
  2260. leaq (B, %rax, 4), B
  2261. #endif
  2262. #if defined(LT) || defined(RN)
  2263. movq K, %rax
  2264. subq KK, %rax
  2265. leaq (,%rax, SIZE), %rax
  2266. leaq (B, %rax, 4), B
  2267. #endif
  2268. #ifdef RN
  2269. addq $4, KK
  2270. #endif
  2271. #ifdef RT
  2272. subq $4, KK
  2273. #endif
  2274. decq J # j --
  2275. jg .L01
  2276. .L50:
  2277. testq $2, N
  2278. je .L100
  2279. #ifdef LN
  2280. movq OFFSET, %rax
  2281. addq M, %rax
  2282. movq %rax, KK
  2283. #endif
  2284. leaq BUFFER, BO
  2285. #ifdef RT
  2286. movq K, %rax
  2287. salq $1 + BASE_SHIFT, %rax
  2288. subq %rax, B
  2289. #endif
  2290. #if defined(LN) || defined(RT)
  2291. movq KK, %rax
  2292. movq B, BORIG
  2293. salq $1 + BASE_SHIFT, %rax
  2294. leaq (B, %rax, 1), B
  2295. leaq (BO, %rax, 4), BO
  2296. #endif
  2297. #ifdef LT
  2298. movq OFFSET, %rax
  2299. movq %rax, KK
  2300. #endif
  2301. #if defined(LT) || defined(RN)
  2302. movq KK, %rax
  2303. #else
  2304. movq K, %rax
  2305. subq KK, %rax
  2306. #endif
  2307. sarq $2, %rax
  2308. jle .L53
  2309. ALIGN_4
  2310. .L52:
  2311. movaps 0 * SIZE(B), %xmm3
  2312. movaps 4 * SIZE(B), %xmm7
  2313. pshufd $0x00, %xmm3, %xmm0
  2314. pshufd $0x55, %xmm3, %xmm1
  2315. pshufd $0xaa, %xmm3, %xmm2
  2316. pshufd $0xff, %xmm3, %xmm3
  2317. pshufd $0x00, %xmm7, %xmm4
  2318. pshufd $0x55, %xmm7, %xmm5
  2319. pshufd $0xaa, %xmm7, %xmm6
  2320. pshufd $0xff, %xmm7, %xmm7
  2321. movaps %xmm0, 0 * SIZE(BO)
  2322. movaps %xmm1, 4 * SIZE(BO)
  2323. movaps %xmm2, 8 * SIZE(BO)
  2324. movaps %xmm3, 12 * SIZE(BO)
  2325. movaps %xmm4, 16 * SIZE(BO)
  2326. movaps %xmm5, 20 * SIZE(BO)
  2327. movaps %xmm6, 24 * SIZE(BO)
  2328. movaps %xmm7, 28 * SIZE(BO)
  2329. addq $ 8 * SIZE, B
  2330. addq $32 * SIZE, BO
  2331. decq %rax
  2332. jne .L52
  2333. ALIGN_4
  2334. .L53:
  2335. #if defined(LT) || defined(RN)
  2336. movq KK, %rax
  2337. #else
  2338. movq K, %rax
  2339. subq KK, %rax
  2340. #endif
  2341. andq $3, %rax
  2342. BRANCH
  2343. jle .L60
  2344. ALIGN_4
  2345. .L54:
  2346. movsd 0 * SIZE(B), %xmm3
  2347. pshufd $0x00, %xmm3, %xmm0
  2348. pshufd $0x55, %xmm3, %xmm1
  2349. movaps %xmm0, 0 * SIZE(BO)
  2350. movaps %xmm1, 4 * SIZE(BO)
  2351. addq $2 * SIZE, B
  2352. addq $8 * SIZE, BO
  2353. decq %rax
  2354. jne .L54
  2355. ALIGN_4
  2356. .L60:
  2357. #if defined(LT) || defined(RN)
  2358. movq A, AO
  2359. #else
  2360. movq A, AORIG
  2361. #endif
  2362. #ifdef RT
  2363. leaq (, LDC, 2), %rax
  2364. subq %rax, C
  2365. #endif
  2366. movq C, CO1 # coffset1 = c
  2367. #ifndef RT
  2368. leaq (C, LDC, 2), C
  2369. #endif
  2370. movq M, I
  2371. sarq $3, I # i = (m >> 3)
  2372. jle .L70
  2373. ALIGN_4
  2374. .L61:
  2375. #ifdef LN
  2376. movq K, %rax
  2377. salq $3 + BASE_SHIFT, %rax
  2378. subq %rax, AORIG
  2379. #endif
  2380. #if defined(LN) || defined(RT)
  2381. movq KK, %rax
  2382. movq AORIG, AO
  2383. leaq (, %rax, SIZE), %rax
  2384. leaq (AO, %rax, 8), AO
  2385. #endif
  2386. leaq BUFFER, BO
  2387. #if defined(LN) || defined(RT)
  2388. movq KK, %rax
  2389. salq $1 + BASE_SHIFT, %rax
  2390. leaq (BO, %rax, 4), BO
  2391. #endif
  2392. movaps 0 * SIZE(AO), %xmm8
  2393. movaps 16 * SIZE(AO), %xmm10
  2394. movaps 32 * SIZE(AO), %xmm12
  2395. movaps 48 * SIZE(AO), %xmm14
  2396. movaps 0 * SIZE(BO), %xmm9
  2397. movaps 16 * SIZE(BO), %xmm11
  2398. movaps 32 * SIZE(BO), %xmm13
  2399. movaps 48 * SIZE(BO), %xmm15
  2400. pxor %xmm0, %xmm0
  2401. pxor %xmm1, %xmm1
  2402. PREFETCHW 4 * SIZE(CO1)
  2403. pxor %xmm4, %xmm4
  2404. PREFETCHW 4 * SIZE(CO2)
  2405. pxor %xmm5, %xmm5
  2406. #if defined(LT) || defined(RN)
  2407. movq KK, %rax
  2408. #else
  2409. movq K, %rax
  2410. subq KK, %rax
  2411. #endif
  2412. sarq $3, %rax
  2413. je .L65
  2414. ALIGN_4
  2415. .L62:
  2416. mulps %xmm8, %xmm9
  2417. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  2418. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  2419. #endif
  2420. mulps 4 * SIZE(BO), %xmm8
  2421. addps %xmm9, %xmm0
  2422. movaps 0 * SIZE(BO), %xmm9
  2423. addps %xmm8, %xmm1
  2424. movaps 4 * SIZE(AO), %xmm8
  2425. mulps %xmm8, %xmm9
  2426. mulps 4 * SIZE(BO), %xmm8
  2427. addps %xmm9, %xmm4
  2428. movaps 8 * SIZE(BO), %xmm9
  2429. addps %xmm8, %xmm5
  2430. movaps 8 * SIZE(AO), %xmm8
  2431. mulps %xmm8, %xmm9
  2432. mulps 12 * SIZE(BO), %xmm8
  2433. addps %xmm9, %xmm0
  2434. movaps 8 * SIZE(BO), %xmm9
  2435. addps %xmm8, %xmm1
  2436. movaps 12 * SIZE(AO), %xmm8
  2437. mulps %xmm8, %xmm9
  2438. mulps 12 * SIZE(BO), %xmm8
  2439. addps %xmm9, %xmm4
  2440. movaps 64 * SIZE(BO), %xmm9
  2441. addps %xmm8, %xmm5
  2442. movaps 64 * SIZE(AO), %xmm8
  2443. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  2444. PREFETCH (PREFETCHSIZE + 16) * SIZE(AO)
  2445. #endif
  2446. mulps %xmm10, %xmm11
  2447. mulps 20 * SIZE(BO), %xmm10
  2448. addps %xmm11, %xmm0
  2449. movaps 16 * SIZE(BO), %xmm11
  2450. addps %xmm10, %xmm1
  2451. movaps 20 * SIZE(AO), %xmm10
  2452. mulps %xmm10, %xmm11
  2453. mulps 20 * SIZE(BO), %xmm10
  2454. addps %xmm11, %xmm4
  2455. movaps 24 * SIZE(BO), %xmm11
  2456. addps %xmm10, %xmm5
  2457. movaps 24 * SIZE(AO), %xmm10
  2458. mulps %xmm10, %xmm11
  2459. mulps 28 * SIZE(BO), %xmm10
  2460. addps %xmm11, %xmm0
  2461. movaps 24 * SIZE(BO), %xmm11
  2462. addps %xmm10, %xmm1
  2463. movaps 28 * SIZE(AO), %xmm10
  2464. mulps %xmm10, %xmm11
  2465. mulps 28 * SIZE(BO), %xmm10
  2466. addps %xmm11, %xmm4
  2467. movaps 80 * SIZE(BO), %xmm11
  2468. addps %xmm10, %xmm5
  2469. movaps 80 * SIZE(AO), %xmm10
  2470. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  2471. PREFETCH (PREFETCHSIZE + 32) * SIZE(AO)
  2472. #endif
  2473. mulps %xmm12, %xmm13
  2474. mulps 36 * SIZE(BO), %xmm12
  2475. addps %xmm13, %xmm0
  2476. movaps 32 * SIZE(BO), %xmm13
  2477. addps %xmm12, %xmm1
  2478. movaps 36 * SIZE(AO), %xmm12
  2479. mulps %xmm12, %xmm13
  2480. mulps 36 * SIZE(BO), %xmm12
  2481. addps %xmm13, %xmm4
  2482. movaps 40 * SIZE(BO), %xmm13
  2483. addps %xmm12, %xmm5
  2484. movaps 40 * SIZE(AO), %xmm12
  2485. mulps %xmm12, %xmm13
  2486. mulps 44 * SIZE(BO), %xmm12
  2487. addps %xmm13, %xmm0
  2488. movaps 40 * SIZE(BO), %xmm13
  2489. addps %xmm12, %xmm1
  2490. movaps 44 * SIZE(AO), %xmm12
  2491. mulps %xmm12, %xmm13
  2492. mulps 44 * SIZE(BO), %xmm12
  2493. addps %xmm13, %xmm4
  2494. addps %xmm12, %xmm5
  2495. movaps 96 * SIZE(BO), %xmm13
  2496. movaps 96 * SIZE(AO), %xmm12
  2497. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  2498. PREFETCH (PREFETCHSIZE + 48) * SIZE(AO)
  2499. #endif
  2500. mulps %xmm14, %xmm15
  2501. mulps 52 * SIZE(BO), %xmm14
  2502. addps %xmm15, %xmm0
  2503. movaps 48 * SIZE(BO), %xmm15
  2504. addps %xmm14, %xmm1
  2505. movaps 52 * SIZE(AO), %xmm14
  2506. mulps %xmm14, %xmm15
  2507. mulps 52 * SIZE(BO), %xmm14
  2508. addps %xmm15, %xmm4
  2509. movaps 56 * SIZE(BO), %xmm15
  2510. addps %xmm14, %xmm5
  2511. movaps 56 * SIZE(AO), %xmm14
  2512. mulps %xmm14, %xmm15
  2513. mulps 60 * SIZE(BO), %xmm14
  2514. addps %xmm15, %xmm0
  2515. movaps 56 * SIZE(BO), %xmm15
  2516. addps %xmm14, %xmm1
  2517. movaps 60 * SIZE(AO), %xmm14
  2518. mulps %xmm14, %xmm15
  2519. mulps 60 * SIZE(BO), %xmm14
  2520. addps %xmm15, %xmm4
  2521. movaps 112 * SIZE(BO), %xmm15
  2522. addps %xmm14, %xmm5
  2523. movaps 112 * SIZE(AO), %xmm14
  2524. addq $64 * SIZE, AO
  2525. addq $64 * SIZE, BO
  2526. decq %rax
  2527. jne .L62
  2528. ALIGN_4
  2529. .L65:
  2530. #if defined(LT) || defined(RN)
  2531. movq KK, %rax
  2532. #else
  2533. movq K, %rax
  2534. subq KK, %rax
  2535. #endif
  2536. andq $7, %rax # if (k & 1)
  2537. BRANCH
  2538. je .L68
  2539. ALIGN_4
  2540. .L66:
  2541. mulps %xmm8, %xmm9
  2542. mulps 4 * SIZE(BO), %xmm8
  2543. addps %xmm9, %xmm0
  2544. movaps 0 * SIZE(BO), %xmm9
  2545. addps %xmm8, %xmm1
  2546. movaps 4 * SIZE(AO), %xmm8
  2547. mulps %xmm8, %xmm9
  2548. mulps 4 * SIZE(BO), %xmm8
  2549. addps %xmm9, %xmm4
  2550. movaps 8 * SIZE(BO), %xmm9
  2551. addps %xmm8, %xmm5
  2552. movaps 8 * SIZE(AO), %xmm8
  2553. addq $8 * SIZE, AO # aoffset += 4
  2554. addq $8 * SIZE, BO # boffset1 += 8
  2555. decq %rax
  2556. jg .L66
  2557. ALIGN_4
  2558. .L68:
  2559. #if defined(LN) || defined(RT)
  2560. movq KK, %rax
  2561. #ifdef LN
  2562. subq $8, %rax
  2563. #else
  2564. subq $2, %rax
  2565. #endif
  2566. movq AORIG, AO
  2567. movq BORIG, B
  2568. leaq BUFFER, BO
  2569. salq $1 + BASE_SHIFT, %rax
  2570. leaq (AO, %rax, 4), AO
  2571. leaq (B, %rax, 1), B
  2572. leaq (BO, %rax, 4), BO
  2573. #endif
  2574. #if defined(LN) || defined(LT)
  2575. movaps %xmm0, %xmm8
  2576. unpcklps %xmm2, %xmm0
  2577. unpckhps %xmm2, %xmm8
  2578. movaps %xmm1, %xmm14
  2579. unpcklps %xmm3, %xmm1
  2580. unpckhps %xmm3, %xmm14
  2581. movaps %xmm0, %xmm2
  2582. unpcklps %xmm1, %xmm0
  2583. unpckhps %xmm1, %xmm2
  2584. movaps %xmm8, %xmm3
  2585. unpcklps %xmm14, %xmm8
  2586. unpckhps %xmm14, %xmm3
  2587. movaps %xmm4, %xmm9
  2588. unpcklps %xmm6, %xmm4
  2589. unpckhps %xmm6, %xmm9
  2590. movaps %xmm5, %xmm14
  2591. unpcklps %xmm7, %xmm5
  2592. unpckhps %xmm7, %xmm14
  2593. movaps %xmm4, %xmm6
  2594. unpcklps %xmm5, %xmm4
  2595. unpckhps %xmm5, %xmm6
  2596. movaps %xmm9, %xmm7
  2597. unpcklps %xmm14, %xmm9
  2598. unpckhps %xmm14, %xmm7
  2599. #ifdef movsd
  2600. xorps %xmm1, %xmm1
  2601. #endif
  2602. movsd 0 * SIZE(B), %xmm1
  2603. #ifdef movsd
  2604. xorps %xmm5, %xmm5
  2605. #endif
  2606. movsd 2 * SIZE(B), %xmm5
  2607. #ifdef movsd
  2608. xorps %xmm10, %xmm10
  2609. #endif
  2610. movsd 4 * SIZE(B), %xmm10
  2611. #ifdef movsd
  2612. xorps %xmm11, %xmm11
  2613. #endif
  2614. movsd 6 * SIZE(B), %xmm11
  2615. #ifdef movsd
  2616. xorps %xmm12, %xmm12
  2617. #endif
  2618. movsd 8 * SIZE(B), %xmm12
  2619. #ifdef movsd
  2620. xorps %xmm13, %xmm13
  2621. #endif
  2622. movsd 10 * SIZE(B), %xmm13
  2623. #ifdef movsd
  2624. xorps %xmm14, %xmm14
  2625. #endif
  2626. movsd 12 * SIZE(B), %xmm14
  2627. #ifdef movsd
  2628. xorps %xmm15, %xmm15
  2629. #endif
  2630. movsd 14 * SIZE(B), %xmm15
  2631. subps %xmm0, %xmm1
  2632. subps %xmm2, %xmm5
  2633. subps %xmm8, %xmm10
  2634. subps %xmm3, %xmm11
  2635. subps %xmm4, %xmm12
  2636. subps %xmm6, %xmm13
  2637. subps %xmm9, %xmm14
  2638. subps %xmm7, %xmm15
  2639. #else
  2640. movaps 0 * SIZE(AO), %xmm8
  2641. movaps 4 * SIZE(AO), %xmm9
  2642. movaps 8 * SIZE(AO), %xmm10
  2643. movaps 12 * SIZE(AO), %xmm11
  2644. subps %xmm0, %xmm8
  2645. subps %xmm4, %xmm9
  2646. subps %xmm1, %xmm10
  2647. subps %xmm5, %xmm11
  2648. #endif
  2649. #ifdef LN
  2650. movaps 60 * SIZE(AO), %xmm6
  2651. pshufd $0xff, %xmm6, %xmm8
  2652. mulps %xmm8, %xmm15
  2653. pshufd $0xaa, %xmm6, %xmm8
  2654. mulps %xmm15, %xmm8
  2655. subps %xmm8, %xmm14
  2656. pshufd $0x55, %xmm6, %xmm8
  2657. mulps %xmm15, %xmm8
  2658. subps %xmm8, %xmm13
  2659. pshufd $0x00, %xmm6, %xmm8
  2660. mulps %xmm15, %xmm8
  2661. subps %xmm8, %xmm12
  2662. movaps 56 * SIZE(AO), %xmm6
  2663. pshufd $0xff, %xmm6, %xmm8
  2664. mulps %xmm15, %xmm8
  2665. subps %xmm8, %xmm11
  2666. pshufd $0xaa, %xmm6, %xmm8
  2667. mulps %xmm15, %xmm8
  2668. subps %xmm8, %xmm10
  2669. pshufd $0x55, %xmm6, %xmm8
  2670. mulps %xmm15, %xmm8
  2671. subps %xmm8, %xmm5
  2672. pshufd $0x00, %xmm6, %xmm8
  2673. mulps %xmm15, %xmm8
  2674. subps %xmm8, %xmm1
  2675. movaps 52 * SIZE(AO), %xmm6
  2676. pshufd $0xaa, %xmm6, %xmm8
  2677. mulps %xmm8, %xmm14
  2678. pshufd $0x55, %xmm6, %xmm8
  2679. mulps %xmm14, %xmm8
  2680. subps %xmm8, %xmm13
  2681. pshufd $0x00, %xmm6, %xmm8
  2682. mulps %xmm14, %xmm8
  2683. subps %xmm8, %xmm12
  2684. movaps 48 * SIZE(AO), %xmm6
  2685. pshufd $0xff, %xmm6, %xmm8
  2686. mulps %xmm14, %xmm8
  2687. subps %xmm8, %xmm11
  2688. pshufd $0xaa, %xmm6, %xmm8
  2689. mulps %xmm14, %xmm8
  2690. subps %xmm8, %xmm10
  2691. pshufd $0x55, %xmm6, %xmm8
  2692. mulps %xmm14, %xmm8
  2693. subps %xmm8, %xmm5
  2694. pshufd $0x00, %xmm6, %xmm8
  2695. mulps %xmm14, %xmm8
  2696. subps %xmm8, %xmm1
  2697. movaps 44 * SIZE(AO), %xmm6
  2698. pshufd $0x55, %xmm6, %xmm8
  2699. mulps %xmm8, %xmm13
  2700. pshufd $0x00, %xmm6, %xmm8
  2701. mulps %xmm13, %xmm8
  2702. subps %xmm8, %xmm12
  2703. movaps 40 * SIZE(AO), %xmm6
  2704. pshufd $0xff, %xmm6, %xmm8
  2705. mulps %xmm13, %xmm8
  2706. subps %xmm8, %xmm11
  2707. pshufd $0xaa, %xmm6, %xmm8
  2708. mulps %xmm13, %xmm8
  2709. subps %xmm8, %xmm10
  2710. pshufd $0x55, %xmm6, %xmm8
  2711. mulps %xmm13, %xmm8
  2712. subps %xmm8, %xmm5
  2713. pshufd $0x00, %xmm6, %xmm8
  2714. mulps %xmm13, %xmm8
  2715. subps %xmm8, %xmm1
  2716. movaps 36 * SIZE(AO), %xmm6
  2717. pshufd $0x00, %xmm6, %xmm8
  2718. mulps %xmm8, %xmm12
  2719. movaps 32 * SIZE(AO), %xmm6
  2720. pshufd $0xff, %xmm6, %xmm8
  2721. mulps %xmm12, %xmm8
  2722. subps %xmm8, %xmm11
  2723. pshufd $0xaa, %xmm6, %xmm8
  2724. mulps %xmm12, %xmm8
  2725. subps %xmm8, %xmm10
  2726. pshufd $0x55, %xmm6, %xmm8
  2727. mulps %xmm12, %xmm8
  2728. subps %xmm8, %xmm5
  2729. pshufd $0x00, %xmm6, %xmm8
  2730. mulps %xmm12, %xmm8
  2731. subps %xmm8, %xmm1
  2732. movaps 24 * SIZE(AO), %xmm6
  2733. pshufd $0xff, %xmm6, %xmm8
  2734. mulps %xmm8, %xmm11
  2735. pshufd $0xaa, %xmm6, %xmm8
  2736. mulps %xmm11, %xmm8
  2737. subps %xmm8, %xmm10
  2738. pshufd $0x55, %xmm6, %xmm8
  2739. mulps %xmm11, %xmm8
  2740. subps %xmm8, %xmm5
  2741. pshufd $0x00, %xmm6, %xmm8
  2742. mulps %xmm11, %xmm8
  2743. subps %xmm8, %xmm1
  2744. movaps 16 * SIZE(AO), %xmm6
  2745. pshufd $0xaa, %xmm6, %xmm8
  2746. mulps %xmm8, %xmm10
  2747. pshufd $0x55, %xmm6, %xmm8
  2748. mulps %xmm10, %xmm8
  2749. subps %xmm8, %xmm5
  2750. pshufd $0x00, %xmm6, %xmm8
  2751. mulps %xmm10, %xmm8
  2752. subps %xmm8, %xmm1
  2753. movaps 8 * SIZE(AO), %xmm6
  2754. pshufd $0x55, %xmm6, %xmm8
  2755. mulps %xmm8, %xmm5
  2756. pshufd $0x00, %xmm6, %xmm8
  2757. mulps %xmm5, %xmm8
  2758. subps %xmm8, %xmm1
  2759. movaps 0 * SIZE(AO), %xmm6
  2760. pshufd $0x00, %xmm6, %xmm8
  2761. mulps %xmm8, %xmm1
  2762. #endif
  2763. #ifdef LT
  2764. movaps 0 * SIZE(AO), %xmm6
  2765. pshufd $0x00, %xmm6, %xmm8
  2766. mulps %xmm8, %xmm1
  2767. pshufd $0x55, %xmm6, %xmm8
  2768. mulps %xmm1, %xmm8
  2769. subps %xmm8, %xmm5
  2770. pshufd $0xaa, %xmm6, %xmm8
  2771. mulps %xmm1, %xmm8
  2772. subps %xmm8, %xmm10
  2773. pshufd $0xff, %xmm6, %xmm8
  2774. mulps %xmm1, %xmm8
  2775. subps %xmm8, %xmm11
  2776. movaps 4 * SIZE(AO), %xmm7
  2777. pshufd $0x00, %xmm7, %xmm8
  2778. mulps %xmm1, %xmm8
  2779. subps %xmm8, %xmm12
  2780. pshufd $0x55, %xmm7, %xmm8
  2781. mulps %xmm1, %xmm8
  2782. subps %xmm8, %xmm13
  2783. pshufd $0xaa, %xmm7, %xmm8
  2784. mulps %xmm1, %xmm8
  2785. subps %xmm8, %xmm14
  2786. pshufd $0xff, %xmm7, %xmm8
  2787. mulps %xmm1, %xmm8
  2788. subps %xmm8, %xmm15
  2789. movaps 8 * SIZE(AO), %xmm6
  2790. pshufd $0x55, %xmm6, %xmm8
  2791. mulps %xmm8, %xmm5
  2792. pshufd $0xaa, %xmm6, %xmm8
  2793. mulps %xmm5, %xmm8
  2794. subps %xmm8, %xmm10
  2795. pshufd $0xff, %xmm6, %xmm8
  2796. mulps %xmm5, %xmm8
  2797. subps %xmm8, %xmm11
  2798. movaps 12 * SIZE(AO), %xmm7
  2799. pshufd $0x00, %xmm7, %xmm8
  2800. mulps %xmm5, %xmm8
  2801. subps %xmm8, %xmm12
  2802. pshufd $0x55, %xmm7, %xmm8
  2803. mulps %xmm5, %xmm8
  2804. subps %xmm8, %xmm13
  2805. pshufd $0xaa, %xmm7, %xmm8
  2806. mulps %xmm5, %xmm8
  2807. subps %xmm8, %xmm14
  2808. pshufd $0xff, %xmm7, %xmm8
  2809. mulps %xmm5, %xmm8
  2810. subps %xmm8, %xmm15
  2811. movaps 16 * SIZE(AO), %xmm6
  2812. pshufd $0xaa, %xmm6, %xmm8
  2813. mulps %xmm8, %xmm10
  2814. pshufd $0xff, %xmm6, %xmm8
  2815. mulps %xmm10, %xmm8
  2816. subps %xmm8, %xmm11
  2817. movaps 20 * SIZE(AO), %xmm7
  2818. pshufd $0x00, %xmm7, %xmm8
  2819. mulps %xmm10, %xmm8
  2820. subps %xmm8, %xmm12
  2821. pshufd $0x55, %xmm7, %xmm8
  2822. mulps %xmm10, %xmm8
  2823. subps %xmm8, %xmm13
  2824. pshufd $0xaa, %xmm7, %xmm8
  2825. mulps %xmm10, %xmm8
  2826. subps %xmm8, %xmm14
  2827. pshufd $0xff, %xmm7, %xmm8
  2828. mulps %xmm10, %xmm8
  2829. subps %xmm8, %xmm15
  2830. movaps 24 * SIZE(AO), %xmm6
  2831. pshufd $0xff, %xmm6, %xmm8
  2832. mulps %xmm8, %xmm11
  2833. movaps 28 * SIZE(AO), %xmm7
  2834. pshufd $0x00, %xmm7, %xmm8
  2835. mulps %xmm11, %xmm8
  2836. subps %xmm8, %xmm12
  2837. pshufd $0x55, %xmm7, %xmm8
  2838. mulps %xmm11, %xmm8
  2839. subps %xmm8, %xmm13
  2840. pshufd $0xaa, %xmm7, %xmm8
  2841. mulps %xmm11, %xmm8
  2842. subps %xmm8, %xmm14
  2843. pshufd $0xff, %xmm7, %xmm8
  2844. mulps %xmm11, %xmm8
  2845. subps %xmm8, %xmm15
  2846. movaps 36 * SIZE(AO), %xmm6
  2847. pshufd $0x00, %xmm6, %xmm8
  2848. mulps %xmm8, %xmm12
  2849. pshufd $0x55, %xmm6, %xmm8
  2850. mulps %xmm12, %xmm8
  2851. subps %xmm8, %xmm13
  2852. pshufd $0xaa, %xmm6, %xmm8
  2853. mulps %xmm12, %xmm8
  2854. subps %xmm8, %xmm14
  2855. pshufd $0xff, %xmm6, %xmm8
  2856. mulps %xmm12, %xmm8
  2857. subps %xmm8, %xmm15
  2858. movaps 44 * SIZE(AO), %xmm7
  2859. pshufd $0x55, %xmm7, %xmm8
  2860. mulps %xmm8, %xmm13
  2861. pshufd $0xaa, %xmm7, %xmm8
  2862. mulps %xmm13, %xmm8
  2863. subps %xmm8, %xmm14
  2864. pshufd $0xff, %xmm7, %xmm8
  2865. mulps %xmm13, %xmm8
  2866. subps %xmm8, %xmm15
  2867. movaps 52 * SIZE(AO), %xmm6
  2868. pshufd $0xaa, %xmm6, %xmm8
  2869. mulps %xmm8, %xmm14
  2870. pshufd $0xff, %xmm6, %xmm8
  2871. mulps %xmm14, %xmm8
  2872. subps %xmm8, %xmm15
  2873. movaps 60 * SIZE(AO), %xmm7
  2874. pshufd $0xff, %xmm7, %xmm8
  2875. mulps %xmm8, %xmm15
  2876. #endif
  2877. #ifdef RN
  2878. movaps 0 * SIZE(B), %xmm0
  2879. pshufd $0x00, %xmm0, %xmm2
  2880. mulps %xmm2, %xmm8
  2881. mulps %xmm2, %xmm9
  2882. pshufd $0x55, %xmm0, %xmm2
  2883. mulps %xmm8, %xmm2
  2884. subps %xmm2, %xmm10
  2885. pshufd $0x55, %xmm0, %xmm2
  2886. mulps %xmm9, %xmm2
  2887. subps %xmm2, %xmm11
  2888. pshufd $0xff, %xmm0, %xmm2
  2889. mulps %xmm2, %xmm10
  2890. mulps %xmm2, %xmm11
  2891. #endif
  2892. #ifdef RT
  2893. movaps 0 * SIZE(B), %xmm0
  2894. pshufd $0xff, %xmm0, %xmm2
  2895. mulps %xmm2, %xmm10
  2896. mulps %xmm2, %xmm11
  2897. pshufd $0xaa, %xmm0, %xmm2
  2898. mulps %xmm10, %xmm2
  2899. subps %xmm2, %xmm8
  2900. pshufd $0xaa, %xmm0, %xmm2
  2901. mulps %xmm11, %xmm2
  2902. subps %xmm2, %xmm9
  2903. pshufd $0x00, %xmm0, %xmm2
  2904. mulps %xmm2, %xmm8
  2905. mulps %xmm2, %xmm9
  2906. #endif
  2907. #ifdef LN
  2908. subq $8 * SIZE, CO1
  2909. #endif
  2910. #if defined(LN) || defined(LT)
  2911. movlps %xmm1, 0 * SIZE(B)
  2912. movlps %xmm5, 2 * SIZE(B)
  2913. movlps %xmm10, 4 * SIZE(B)
  2914. movlps %xmm11, 6 * SIZE(B)
  2915. movlps %xmm12, 8 * SIZE(B)
  2916. movlps %xmm13, 10 * SIZE(B)
  2917. movlps %xmm14, 12 * SIZE(B)
  2918. movlps %xmm15, 14 * SIZE(B)
  2919. pshufd $0x00, %xmm1, %xmm2
  2920. pshufd $0x55, %xmm1, %xmm3
  2921. movaps %xmm2, 0 * SIZE(BO)
  2922. movaps %xmm3, 4 * SIZE(BO)
  2923. pshufd $0x00, %xmm5, %xmm2
  2924. pshufd $0x55, %xmm5, %xmm3
  2925. movaps %xmm2, 8 * SIZE(BO)
  2926. movaps %xmm3, 12 * SIZE(BO)
  2927. pshufd $0x00, %xmm10, %xmm2
  2928. pshufd $0x55, %xmm10, %xmm3
  2929. movaps %xmm2, 16 * SIZE(BO)
  2930. movaps %xmm3, 20 * SIZE(BO)
  2931. pshufd $0x00, %xmm11, %xmm2
  2932. pshufd $0x55, %xmm11, %xmm3
  2933. movaps %xmm2, 24 * SIZE(BO)
  2934. movaps %xmm3, 28 * SIZE(BO)
  2935. pshufd $0x00, %xmm12, %xmm2
  2936. pshufd $0x55, %xmm12, %xmm3
  2937. movaps %xmm2, 32 * SIZE(BO)
  2938. movaps %xmm3, 36 * SIZE(BO)
  2939. pshufd $0x00, %xmm13, %xmm2
  2940. pshufd $0x55, %xmm13, %xmm3
  2941. movaps %xmm2, 40 * SIZE(BO)
  2942. movaps %xmm3, 44 * SIZE(BO)
  2943. pshufd $0x00, %xmm14, %xmm2
  2944. pshufd $0x55, %xmm14, %xmm3
  2945. movaps %xmm2, 48 * SIZE(BO)
  2946. movaps %xmm3, 52 * SIZE(BO)
  2947. pshufd $0x00, %xmm15, %xmm2
  2948. pshufd $0x55, %xmm15, %xmm3
  2949. movaps %xmm2, 56 * SIZE(BO)
  2950. movaps %xmm3, 60 * SIZE(BO)
  2951. #else
  2952. movaps %xmm8, 0 * SIZE(AO)
  2953. movaps %xmm9, 4 * SIZE(AO)
  2954. movaps %xmm10, 8 * SIZE(AO)
  2955. movaps %xmm11, 12 * SIZE(AO)
  2956. #endif
  2957. #if defined(LN) || defined(LT)
  2958. unpcklps %xmm10, %xmm1
  2959. unpcklps %xmm11, %xmm5
  2960. movaps %xmm1, %xmm10
  2961. unpcklps %xmm5, %xmm1
  2962. unpckhps %xmm5, %xmm10
  2963. unpcklps %xmm14, %xmm12
  2964. unpcklps %xmm15, %xmm13
  2965. movaps %xmm12, %xmm14
  2966. unpcklps %xmm13, %xmm12
  2967. unpckhps %xmm13, %xmm14
  2968. movlps %xmm1, 0 * SIZE(CO1)
  2969. movhps %xmm1, 2 * SIZE(CO1)
  2970. movlps %xmm12, 4 * SIZE(CO1)
  2971. movhps %xmm12, 6 * SIZE(CO1)
  2972. movlps %xmm10, 0 * SIZE(CO1, LDC, 1)
  2973. movhps %xmm10, 2 * SIZE(CO1, LDC, 1)
  2974. movlps %xmm14, 4 * SIZE(CO1, LDC, 1)
  2975. movhps %xmm14, 6 * SIZE(CO1, LDC, 1)
  2976. #else
  2977. movlps %xmm8, 0 * SIZE(CO1)
  2978. movhps %xmm8, 2 * SIZE(CO1)
  2979. movlps %xmm9, 4 * SIZE(CO1)
  2980. movhps %xmm9, 6 * SIZE(CO1)
  2981. movlps %xmm10, 0 * SIZE(CO1, LDC, 1)
  2982. movhps %xmm10, 2 * SIZE(CO1, LDC, 1)
  2983. movlps %xmm11, 4 * SIZE(CO1, LDC, 1)
  2984. movhps %xmm11, 6 * SIZE(CO1, LDC, 1)
  2985. #endif
  2986. #ifndef LN
  2987. addq $8 * SIZE, CO1
  2988. #endif
  2989. #if defined(LT) || defined(RN)
  2990. movq K, %rax
  2991. subq KK, %rax
  2992. leaq (,%rax, SIZE), %rax
  2993. leaq (AO, %rax, 8), AO
  2994. #ifdef LT
  2995. addq $16 * SIZE, B
  2996. #endif
  2997. #endif
  2998. #ifdef LN
  2999. subq $8, KK
  3000. movq BORIG, B
  3001. #endif
  3002. #ifdef LT
  3003. addq $8, KK
  3004. #endif
  3005. #ifdef RT
  3006. movq K, %rax
  3007. movq BORIG, B
  3008. salq $3 + BASE_SHIFT, %rax
  3009. addq %rax, AORIG
  3010. #endif
  3011. decq I # i --
  3012. jg .L61
  3013. ALIGN_4
  3014. .L70:
  3015. testq $4, M
  3016. je .L80
  3017. #ifdef LN
  3018. movq K, %rax
  3019. salq $2 + BASE_SHIFT, %rax
  3020. subq %rax, AORIG
  3021. #endif
  3022. #if defined(LN) || defined(RT)
  3023. movq KK, %rax
  3024. movq AORIG, AO
  3025. leaq (, %rax, SIZE), %rax
  3026. leaq (AO, %rax, 4), AO
  3027. #endif
  3028. leaq BUFFER, BO
  3029. #if defined(LN) || defined(RT)
  3030. movq KK, %rax
  3031. salq $1 + BASE_SHIFT, %rax
  3032. leaq (BO, %rax, 4), BO
  3033. #endif
  3034. movaps 0 * SIZE(AO), %xmm8
  3035. movaps 16 * SIZE(AO), %xmm10
  3036. movaps 0 * SIZE(BO), %xmm9
  3037. movaps 16 * SIZE(BO), %xmm11
  3038. movaps 32 * SIZE(BO), %xmm13
  3039. movaps 48 * SIZE(BO), %xmm15
  3040. pxor %xmm0, %xmm0
  3041. pxor %xmm1, %xmm1
  3042. pxor %xmm2, %xmm2
  3043. pxor %xmm3, %xmm3
  3044. #if defined(LT) || defined(RN)
  3045. movq KK, %rax
  3046. #else
  3047. movq K, %rax
  3048. subq KK, %rax
  3049. #endif
  3050. sarq $3, %rax
  3051. je .L75
  3052. ALIGN_4
  3053. .L72:
  3054. mulps %xmm8, %xmm9
  3055. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  3056. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  3057. #endif
  3058. mulps 4 * SIZE(BO), %xmm8
  3059. addps %xmm9, %xmm0
  3060. movaps 8 * SIZE(BO), %xmm9
  3061. addps %xmm8, %xmm1
  3062. movaps 4 * SIZE(AO), %xmm8
  3063. mulps %xmm8, %xmm9
  3064. mulps 12 * SIZE(BO), %xmm8
  3065. addps %xmm9, %xmm2
  3066. movaps 64 * SIZE(BO), %xmm9
  3067. addps %xmm8, %xmm3
  3068. movaps 8 * SIZE(AO), %xmm8
  3069. mulps %xmm8, %xmm11
  3070. mulps 20 * SIZE(BO), %xmm8
  3071. addps %xmm11, %xmm0
  3072. movaps 24 * SIZE(BO), %xmm11
  3073. addps %xmm8, %xmm1
  3074. movaps 12 * SIZE(AO), %xmm8
  3075. mulps %xmm8, %xmm11
  3076. mulps 28 * SIZE(BO), %xmm8
  3077. addps %xmm11, %xmm2
  3078. movaps 80 * SIZE(BO), %xmm11
  3079. addps %xmm8, %xmm3
  3080. movaps 32 * SIZE(AO), %xmm8
  3081. mulps %xmm10, %xmm13
  3082. mulps 36 * SIZE(BO), %xmm10
  3083. addps %xmm13, %xmm0
  3084. movaps 40 * SIZE(BO), %xmm13
  3085. addps %xmm10, %xmm1
  3086. movaps 20 * SIZE(AO), %xmm10
  3087. mulps %xmm10, %xmm13
  3088. mulps 44 * SIZE(BO), %xmm10
  3089. addps %xmm13, %xmm2
  3090. movaps 96 * SIZE(BO), %xmm13
  3091. addps %xmm10, %xmm3
  3092. movaps 24 * SIZE(AO), %xmm10
  3093. mulps %xmm10, %xmm15
  3094. mulps 52 * SIZE(BO), %xmm10
  3095. addps %xmm15, %xmm0
  3096. movaps 56 * SIZE(BO), %xmm15
  3097. addps %xmm10, %xmm1
  3098. movaps 28 * SIZE(AO), %xmm10
  3099. mulps %xmm10, %xmm15
  3100. mulps 60 * SIZE(BO), %xmm10
  3101. addps %xmm15, %xmm2
  3102. movaps 112 * SIZE(BO), %xmm15
  3103. addps %xmm10, %xmm3
  3104. movaps 48 * SIZE(AO), %xmm10
  3105. addq $32 * SIZE, AO
  3106. addq $64 * SIZE, BO
  3107. decq %rax
  3108. jne .L72
  3109. ALIGN_4
  3110. .L75:
  3111. #if defined(LT) || defined(RN)
  3112. movq KK, %rax
  3113. #else
  3114. movq K, %rax
  3115. subq KK, %rax
  3116. #endif
  3117. andq $7, %rax # if (k & 1)
  3118. BRANCH
  3119. je .L78
  3120. ALIGN_4
  3121. .L76:
  3122. mulps %xmm8, %xmm9
  3123. mulps 4 * SIZE(BO), %xmm8
  3124. addps %xmm9, %xmm0
  3125. movaps 8 * SIZE(BO), %xmm9
  3126. addps %xmm8, %xmm1
  3127. movaps 4 * SIZE(AO), %xmm8
  3128. addq $4 * SIZE, AO # aoffset += 4
  3129. addq $8 * SIZE, BO # boffset1 += 8
  3130. decq %rax
  3131. jg .L76
  3132. ALIGN_4
  3133. .L78:
  3134. addps %xmm2, %xmm0
  3135. addps %xmm3, %xmm1
  3136. #if defined(LN) || defined(RT)
  3137. movq KK, %rax
  3138. #ifdef LN
  3139. subq $4, %rax
  3140. #else
  3141. subq $2, %rax
  3142. #endif
  3143. movq AORIG, AO
  3144. movq BORIG, B
  3145. leaq BUFFER, BO
  3146. salq $1 + BASE_SHIFT, %rax
  3147. leaq (AO, %rax, 2), AO
  3148. leaq (B, %rax, 1), B
  3149. leaq (BO, %rax, 4), BO
  3150. #endif
  3151. #if defined(LN) || defined(LT)
  3152. movaps %xmm0, %xmm8
  3153. unpcklps %xmm2, %xmm0
  3154. unpckhps %xmm2, %xmm8
  3155. movaps %xmm1, %xmm14
  3156. unpcklps %xmm3, %xmm1
  3157. unpckhps %xmm3, %xmm14
  3158. movaps %xmm0, %xmm2
  3159. unpcklps %xmm1, %xmm0
  3160. unpckhps %xmm1, %xmm2
  3161. movaps %xmm8, %xmm3
  3162. unpcklps %xmm14, %xmm8
  3163. unpckhps %xmm14, %xmm3
  3164. #ifdef movsd
  3165. xorps %xmm1, %xmm1
  3166. #endif
  3167. movsd 0 * SIZE(B), %xmm1
  3168. #ifdef movsd
  3169. xorps %xmm5, %xmm5
  3170. #endif
  3171. movsd 2 * SIZE(B), %xmm5
  3172. #ifdef movsd
  3173. xorps %xmm10, %xmm10
  3174. #endif
  3175. movsd 4 * SIZE(B), %xmm10
  3176. #ifdef movsd
  3177. xorps %xmm11, %xmm11
  3178. #endif
  3179. movsd 6 * SIZE(B), %xmm11
  3180. subps %xmm0, %xmm1
  3181. subps %xmm2, %xmm5
  3182. subps %xmm8, %xmm10
  3183. subps %xmm3, %xmm11
  3184. #else
  3185. movaps 0 * SIZE(AO), %xmm8
  3186. movaps 4 * SIZE(AO), %xmm10
  3187. subps %xmm0, %xmm8
  3188. subps %xmm1, %xmm10
  3189. #endif
  3190. #ifdef LN
  3191. movaps 12 * SIZE(AO), %xmm6
  3192. pshufd $0xff, %xmm6, %xmm8
  3193. mulps %xmm8, %xmm11
  3194. pshufd $0xaa, %xmm6, %xmm8
  3195. mulps %xmm11, %xmm8
  3196. subps %xmm8, %xmm10
  3197. pshufd $0x55, %xmm6, %xmm8
  3198. mulps %xmm11, %xmm8
  3199. subps %xmm8, %xmm5
  3200. pshufd $0x00, %xmm6, %xmm8
  3201. mulps %xmm11, %xmm8
  3202. subps %xmm8, %xmm1
  3203. movaps 8 * SIZE(AO), %xmm6
  3204. pshufd $0xaa, %xmm6, %xmm8
  3205. mulps %xmm8, %xmm10
  3206. pshufd $0x55, %xmm6, %xmm8
  3207. mulps %xmm10, %xmm8
  3208. subps %xmm8, %xmm5
  3209. pshufd $0x00, %xmm6, %xmm8
  3210. mulps %xmm10, %xmm8
  3211. subps %xmm8, %xmm1
  3212. movaps 4 * SIZE(AO), %xmm6
  3213. pshufd $0x55, %xmm6, %xmm8
  3214. mulps %xmm8, %xmm5
  3215. pshufd $0x00, %xmm6, %xmm8
  3216. mulps %xmm5, %xmm8
  3217. subps %xmm8, %xmm1
  3218. movaps 0 * SIZE(AO), %xmm6
  3219. pshufd $0x00, %xmm6, %xmm8
  3220. mulps %xmm8, %xmm1
  3221. #endif
  3222. #ifdef LT
  3223. movaps 0 * SIZE(AO), %xmm6
  3224. pshufd $0x00, %xmm6, %xmm8
  3225. mulps %xmm8, %xmm1
  3226. pshufd $0x55, %xmm6, %xmm8
  3227. mulps %xmm1, %xmm8
  3228. subps %xmm8, %xmm5
  3229. pshufd $0xaa, %xmm6, %xmm8
  3230. mulps %xmm1, %xmm8
  3231. subps %xmm8, %xmm10
  3232. pshufd $0xff, %xmm6, %xmm8
  3233. mulps %xmm1, %xmm8
  3234. subps %xmm8, %xmm11
  3235. movaps 4 * SIZE(AO), %xmm6
  3236. pshufd $0x55, %xmm6, %xmm8
  3237. mulps %xmm8, %xmm5
  3238. pshufd $0xaa, %xmm6, %xmm8
  3239. mulps %xmm5, %xmm8
  3240. subps %xmm8, %xmm10
  3241. pshufd $0xff, %xmm6, %xmm8
  3242. mulps %xmm5, %xmm8
  3243. subps %xmm8, %xmm11
  3244. movaps 8 * SIZE(AO), %xmm6
  3245. pshufd $0xaa, %xmm6, %xmm8
  3246. mulps %xmm8, %xmm10
  3247. pshufd $0xff, %xmm6, %xmm8
  3248. mulps %xmm10, %xmm8
  3249. subps %xmm8, %xmm11
  3250. movaps 12 * SIZE(AO), %xmm6
  3251. pshufd $0xff, %xmm6, %xmm8
  3252. mulps %xmm8, %xmm11
  3253. #endif
  3254. #ifdef RN
  3255. movaps 0 * SIZE(B), %xmm0
  3256. pshufd $0x00, %xmm0, %xmm2
  3257. mulps %xmm2, %xmm8
  3258. pshufd $0x55, %xmm0, %xmm2
  3259. mulps %xmm8, %xmm2
  3260. subps %xmm2, %xmm10
  3261. pshufd $0xff, %xmm0, %xmm2
  3262. mulps %xmm2, %xmm10
  3263. #endif
  3264. #ifdef RT
  3265. movaps 0 * SIZE(B), %xmm0
  3266. pshufd $0xff, %xmm0, %xmm2
  3267. mulps %xmm2, %xmm10
  3268. pshufd $0xaa, %xmm0, %xmm2
  3269. mulps %xmm10, %xmm2
  3270. subps %xmm2, %xmm8
  3271. pshufd $0x00, %xmm0, %xmm2
  3272. mulps %xmm2, %xmm8
  3273. #endif
  3274. #ifdef LN
  3275. subq $4 * SIZE, CO1
  3276. #endif
  3277. #if defined(LN) || defined(LT)
  3278. movlps %xmm1, 0 * SIZE(B)
  3279. movlps %xmm5, 2 * SIZE(B)
  3280. movlps %xmm10, 4 * SIZE(B)
  3281. movlps %xmm11, 6 * SIZE(B)
  3282. pshufd $0x00, %xmm1, %xmm2
  3283. pshufd $0x55, %xmm1, %xmm3
  3284. movaps %xmm2, 0 * SIZE(BO)
  3285. movaps %xmm3, 4 * SIZE(BO)
  3286. pshufd $0x00, %xmm5, %xmm2
  3287. pshufd $0x55, %xmm5, %xmm3
  3288. movaps %xmm2, 8 * SIZE(BO)
  3289. movaps %xmm3, 12 * SIZE(BO)
  3290. pshufd $0x00, %xmm10, %xmm2
  3291. pshufd $0x55, %xmm10, %xmm3
  3292. movaps %xmm2, 16 * SIZE(BO)
  3293. movaps %xmm3, 20 * SIZE(BO)
  3294. pshufd $0x00, %xmm11, %xmm2
  3295. pshufd $0x55, %xmm11, %xmm3
  3296. movaps %xmm2, 24 * SIZE(BO)
  3297. movaps %xmm3, 28 * SIZE(BO)
  3298. #else
  3299. movaps %xmm8, 0 * SIZE(AO)
  3300. movaps %xmm10, 4 * SIZE(AO)
  3301. #endif
  3302. #if defined(LN) || defined(LT)
  3303. unpcklps %xmm10, %xmm1
  3304. unpcklps %xmm11, %xmm5
  3305. movaps %xmm1, %xmm10
  3306. unpcklps %xmm5, %xmm1
  3307. unpckhps %xmm5, %xmm10
  3308. movlps %xmm1, 0 * SIZE(CO1)
  3309. movhps %xmm1, 2 * SIZE(CO1)
  3310. movlps %xmm10, 0 * SIZE(CO1, LDC, 1)
  3311. movhps %xmm10, 2 * SIZE(CO1, LDC, 1)
  3312. #else
  3313. movlps %xmm8, 0 * SIZE(CO1)
  3314. movhps %xmm8, 2 * SIZE(CO1)
  3315. movlps %xmm10, 0 * SIZE(CO1, LDC, 1)
  3316. movhps %xmm10, 2 * SIZE(CO1, LDC, 1)
  3317. #endif
  3318. #ifndef LN
  3319. addq $4 * SIZE, CO1
  3320. #endif
  3321. #if defined(LT) || defined(RN)
  3322. movq K, %rax
  3323. subq KK, %rax
  3324. leaq (,%rax, SIZE), %rax
  3325. leaq (AO, %rax, 4), AO
  3326. #ifdef LT
  3327. addq $ 8 * SIZE, B
  3328. #endif
  3329. #endif
  3330. #ifdef LN
  3331. subq $4, KK
  3332. movq BORIG, B
  3333. #endif
  3334. #ifdef LT
  3335. addq $4, KK
  3336. #endif
  3337. #ifdef RT
  3338. movq K, %rax
  3339. movq BORIG, B
  3340. salq $2 + BASE_SHIFT, %rax
  3341. addq %rax, AORIG
  3342. #endif
  3343. ALIGN_4
  3344. .L80:
  3345. testq $2, M
  3346. je .L90
  3347. #ifdef LN
  3348. movq K, %rax
  3349. salq $1 + BASE_SHIFT, %rax
  3350. subq %rax, AORIG
  3351. #endif
  3352. #if defined(LN) || defined(RT)
  3353. movq KK, %rax
  3354. movq AORIG, AO
  3355. leaq (, %rax, SIZE), %rax
  3356. leaq (AO, %rax, 2), AO
  3357. #endif
  3358. leaq BUFFER, BO
  3359. #if defined(LN) || defined(RT)
  3360. movq KK, %rax
  3361. salq $1 + BASE_SHIFT, %rax
  3362. leaq (BO, %rax, 4), BO
  3363. #endif
  3364. movaps 0 * SIZE(AO), %xmm8
  3365. movaps 8 * SIZE(AO), %xmm10
  3366. movaps 0 * SIZE(BO), %xmm9
  3367. movaps 16 * SIZE(BO), %xmm11
  3368. movaps 32 * SIZE(BO), %xmm13
  3369. movaps 48 * SIZE(BO), %xmm15
  3370. pxor %xmm0, %xmm0
  3371. pxor %xmm1, %xmm1
  3372. pxor %xmm2, %xmm2
  3373. pxor %xmm3, %xmm3
  3374. #if defined(LT) || defined(RN)
  3375. movq KK, %rax
  3376. #else
  3377. movq K, %rax
  3378. subq KK, %rax
  3379. #endif
  3380. sarq $3, %rax
  3381. je .L85
  3382. ALIGN_4
  3383. .L82:
  3384. mulps %xmm8, %xmm9
  3385. addps %xmm9, %xmm0
  3386. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  3387. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  3388. #endif
  3389. movaps 4 * SIZE(BO), %xmm9
  3390. mulps %xmm8, %xmm9
  3391. movsd 2 * SIZE(AO), %xmm8
  3392. addps %xmm9, %xmm1
  3393. movaps 8 * SIZE(BO), %xmm9
  3394. mulps %xmm8, %xmm9
  3395. addps %xmm9, %xmm2
  3396. movaps 12 * SIZE(BO), %xmm9
  3397. mulps %xmm8, %xmm9
  3398. movsd 4 * SIZE(AO), %xmm8
  3399. addps %xmm9, %xmm3
  3400. movaps 64 * SIZE(BO), %xmm9
  3401. mulps %xmm8, %xmm11
  3402. addps %xmm11, %xmm0
  3403. movaps 20 * SIZE(BO), %xmm11
  3404. mulps %xmm8, %xmm11
  3405. movsd 6 * SIZE(AO), %xmm8
  3406. addps %xmm11, %xmm1
  3407. movaps 24 * SIZE(BO), %xmm11
  3408. mulps %xmm8, %xmm11
  3409. addps %xmm11, %xmm2
  3410. movaps 28 * SIZE(BO), %xmm11
  3411. mulps %xmm8, %xmm11
  3412. movsd 16 * SIZE(AO), %xmm8
  3413. addps %xmm11, %xmm3
  3414. movaps 80 * SIZE(BO), %xmm11
  3415. mulps %xmm10, %xmm13
  3416. addps %xmm13, %xmm0
  3417. movaps 36 * SIZE(BO), %xmm13
  3418. mulps %xmm10, %xmm13
  3419. movsd 10 * SIZE(AO), %xmm10
  3420. addps %xmm13, %xmm1
  3421. movaps 40 * SIZE(BO), %xmm13
  3422. mulps %xmm10, %xmm13
  3423. addps %xmm13, %xmm2
  3424. movaps 44 * SIZE(BO), %xmm13
  3425. mulps %xmm10, %xmm13
  3426. movsd 12 * SIZE(AO), %xmm10
  3427. addps %xmm13, %xmm3
  3428. movaps 96 * SIZE(BO), %xmm13
  3429. mulps %xmm10, %xmm15
  3430. addps %xmm15, %xmm0
  3431. movaps 52 * SIZE(BO), %xmm15
  3432. mulps %xmm10, %xmm15
  3433. movsd 14 * SIZE(AO), %xmm10
  3434. addps %xmm15, %xmm1
  3435. movaps 56 * SIZE(BO), %xmm15
  3436. mulps %xmm10, %xmm15
  3437. addps %xmm15, %xmm2
  3438. movaps 60 * SIZE(BO), %xmm15
  3439. mulps %xmm10, %xmm15
  3440. movsd 24 * SIZE(AO), %xmm10
  3441. addps %xmm15, %xmm3
  3442. movaps 112 * SIZE(BO), %xmm15
  3443. addq $16 * SIZE, AO
  3444. addq $64 * SIZE, BO
  3445. decq %rax
  3446. jne .L82
  3447. ALIGN_4
  3448. .L85:
  3449. #if defined(LT) || defined(RN)
  3450. movq KK, %rax
  3451. #else
  3452. movq K, %rax
  3453. subq KK, %rax
  3454. #endif
  3455. andq $7, %rax # if (k & 1)
  3456. BRANCH
  3457. je .L88
  3458. ALIGN_4
  3459. .L86:
  3460. mulps %xmm8, %xmm9
  3461. addps %xmm9, %xmm0
  3462. movaps 4 * SIZE(BO), %xmm9
  3463. mulps %xmm8, %xmm9
  3464. movsd 2 * SIZE(AO), %xmm8
  3465. addps %xmm9, %xmm1
  3466. movaps 8 * SIZE(BO), %xmm9
  3467. addq $2 * SIZE, AO # aoffset += 4
  3468. addq $8 * SIZE, BO # boffset1 += 8
  3469. decq %rax
  3470. jg .L86
  3471. ALIGN_4
  3472. .L88:
  3473. addps %xmm2, %xmm0
  3474. addps %xmm3, %xmm1
  3475. #if defined(LN) || defined(RT)
  3476. movq KK, %rax
  3477. #ifdef LN
  3478. subq $2, %rax
  3479. #else
  3480. subq $2, %rax
  3481. #endif
  3482. movq AORIG, AO
  3483. movq BORIG, B
  3484. leaq BUFFER, BO
  3485. salq $1 + BASE_SHIFT, %rax
  3486. leaq (AO, %rax, 1), AO
  3487. leaq (B, %rax, 1), B
  3488. leaq (BO, %rax, 4), BO
  3489. #endif
  3490. #if defined(LN) || defined(LT)
  3491. unpcklps %xmm2, %xmm0
  3492. unpcklps %xmm3, %xmm1
  3493. movaps %xmm0, %xmm2
  3494. unpcklps %xmm1, %xmm0
  3495. unpckhps %xmm1, %xmm2
  3496. #ifdef movsd
  3497. xorps %xmm1, %xmm1
  3498. #endif
  3499. movsd 0 * SIZE(B), %xmm1
  3500. #ifdef movsd
  3501. xorps %xmm5, %xmm5
  3502. #endif
  3503. movsd 2 * SIZE(B), %xmm5
  3504. subps %xmm0, %xmm1
  3505. subps %xmm2, %xmm5
  3506. #else
  3507. #ifdef movsd
  3508. xorps %xmm8, %xmm8
  3509. #endif
  3510. movsd 0 * SIZE(AO), %xmm8
  3511. #ifdef movsd
  3512. xorps %xmm10, %xmm10
  3513. #endif
  3514. movsd 2 * SIZE(AO), %xmm10
  3515. subps %xmm0, %xmm8
  3516. subps %xmm1, %xmm10
  3517. #endif
  3518. #ifdef LN
  3519. movaps 0 * SIZE(AO), %xmm6
  3520. pshufd $0xff, %xmm6, %xmm8
  3521. mulps %xmm8, %xmm5
  3522. pshufd $0xaa, %xmm6, %xmm8
  3523. mulps %xmm5, %xmm8
  3524. subps %xmm8, %xmm1
  3525. pshufd $0x00, %xmm6, %xmm8
  3526. mulps %xmm8, %xmm1
  3527. #endif
  3528. #ifdef LT
  3529. movaps 0 * SIZE(AO), %xmm6
  3530. pshufd $0x00, %xmm6, %xmm8
  3531. mulps %xmm8, %xmm1
  3532. pshufd $0x55, %xmm6, %xmm8
  3533. mulps %xmm1, %xmm8
  3534. subps %xmm8, %xmm5
  3535. pshufd $0xff, %xmm6, %xmm8
  3536. mulps %xmm8, %xmm5
  3537. #endif
  3538. #ifdef RN
  3539. movaps 0 * SIZE(B), %xmm0
  3540. pshufd $0x00, %xmm0, %xmm2
  3541. mulps %xmm2, %xmm8
  3542. pshufd $0x55, %xmm0, %xmm2
  3543. mulps %xmm8, %xmm2
  3544. subps %xmm2, %xmm10
  3545. pshufd $0xff, %xmm0, %xmm2
  3546. mulps %xmm2, %xmm10
  3547. #endif
  3548. #ifdef RT
  3549. movaps 0 * SIZE(B), %xmm0
  3550. pshufd $0xff, %xmm0, %xmm2
  3551. mulps %xmm2, %xmm10
  3552. pshufd $0xaa, %xmm0, %xmm2
  3553. mulps %xmm10, %xmm2
  3554. subps %xmm2, %xmm8
  3555. pshufd $0x00, %xmm0, %xmm2
  3556. mulps %xmm2, %xmm8
  3557. #endif
  3558. #ifdef LN
  3559. subq $2 * SIZE, CO1
  3560. #endif
  3561. #if defined(LN) || defined(LT)
  3562. movlps %xmm1, 0 * SIZE(B)
  3563. movlps %xmm5, 2 * SIZE(B)
  3564. pshufd $0x00, %xmm1, %xmm2
  3565. pshufd $0x55, %xmm1, %xmm3
  3566. movaps %xmm2, 0 * SIZE(BO)
  3567. movaps %xmm3, 4 * SIZE(BO)
  3568. pshufd $0x00, %xmm5, %xmm2
  3569. pshufd $0x55, %xmm5, %xmm3
  3570. movaps %xmm2, 8 * SIZE(BO)
  3571. movaps %xmm3, 12 * SIZE(BO)
  3572. #else
  3573. movlps %xmm8, 0 * SIZE(AO)
  3574. movlps %xmm10, 2 * SIZE(AO)
  3575. #endif
  3576. #if defined(LN) || defined(LT)
  3577. unpcklps %xmm10, %xmm1
  3578. unpcklps %xmm11, %xmm5
  3579. movaps %xmm1, %xmm10
  3580. unpcklps %xmm5, %xmm1
  3581. unpckhps %xmm5, %xmm10
  3582. movlps %xmm1, 0 * SIZE(CO1)
  3583. movlps %xmm10, 0 * SIZE(CO1, LDC, 1)
  3584. #else
  3585. movlps %xmm8, 0 * SIZE(CO1)
  3586. movlps %xmm10, 0 * SIZE(CO1, LDC, 1)
  3587. #endif
  3588. #ifndef LN
  3589. addq $2 * SIZE, CO1
  3590. #endif
  3591. #if defined(LT) || defined(RN)
  3592. movq K, %rax
  3593. subq KK, %rax
  3594. leaq (,%rax, SIZE), %rax
  3595. leaq (AO, %rax, 2), AO
  3596. #ifdef LT
  3597. addq $ 4 * SIZE, B
  3598. #endif
  3599. #endif
  3600. #ifdef LN
  3601. subq $2, KK
  3602. movq BORIG, B
  3603. #endif
  3604. #ifdef LT
  3605. addq $2, KK
  3606. #endif
  3607. #ifdef RT
  3608. movq K, %rax
  3609. movq BORIG, B
  3610. salq $1 + BASE_SHIFT, %rax
  3611. addq %rax, AORIG
  3612. #endif
  3613. ALIGN_4
  3614. .L90:
  3615. testq $1, M
  3616. je .L99
  3617. #ifdef LN
  3618. movq K, %rax
  3619. salq $BASE_SHIFT, %rax
  3620. subq %rax, AORIG
  3621. #endif
  3622. #if defined(LN) || defined(RT)
  3623. movq KK, %rax
  3624. movq AORIG, AO
  3625. leaq (AO, %rax, SIZE), AO
  3626. #endif
  3627. leaq BUFFER, BO
  3628. #if defined(LN) || defined(RT)
  3629. movq KK, %rax
  3630. salq $1 + BASE_SHIFT, %rax
  3631. leaq (BO, %rax, 4), BO
  3632. #endif
  3633. movss 0 * SIZE(AO), %xmm8
  3634. movss 4 * SIZE(AO), %xmm10
  3635. movss 0 * SIZE(BO), %xmm9
  3636. movss 16 * SIZE(BO), %xmm11
  3637. movss 32 * SIZE(BO), %xmm13
  3638. movss 48 * SIZE(BO), %xmm15
  3639. pxor %xmm0, %xmm0
  3640. pxor %xmm1, %xmm1
  3641. pxor %xmm2, %xmm2
  3642. pxor %xmm3, %xmm3
  3643. #if defined(LT) || defined(RN)
  3644. movq KK, %rax
  3645. #else
  3646. movq K, %rax
  3647. subq KK, %rax
  3648. #endif
  3649. sarq $3, %rax
  3650. je .L95
  3651. ALIGN_4
  3652. .L92:
  3653. mulps %xmm8, %xmm9
  3654. addps %xmm9, %xmm0
  3655. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  3656. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  3657. #endif
  3658. movss 4 * SIZE(BO), %xmm9
  3659. mulps %xmm8, %xmm9
  3660. movss 1 * SIZE(AO), %xmm8
  3661. addps %xmm9, %xmm1
  3662. movss 8 * SIZE(BO), %xmm9
  3663. mulps %xmm8, %xmm9
  3664. addps %xmm9, %xmm2
  3665. movss 12 * SIZE(BO), %xmm9
  3666. mulps %xmm8, %xmm9
  3667. movss 2 * SIZE(AO), %xmm8
  3668. addps %xmm9, %xmm3
  3669. movss 64 * SIZE(BO), %xmm9
  3670. mulps %xmm8, %xmm11
  3671. addps %xmm11, %xmm0
  3672. movss 20 * SIZE(BO), %xmm11
  3673. mulps %xmm8, %xmm11
  3674. movss 3 * SIZE(AO), %xmm8
  3675. addps %xmm11, %xmm1
  3676. movss 24 * SIZE(BO), %xmm11
  3677. mulps %xmm8, %xmm11
  3678. addps %xmm11, %xmm2
  3679. movss 28 * SIZE(BO), %xmm11
  3680. mulps %xmm8, %xmm11
  3681. movss 8 * SIZE(AO), %xmm8
  3682. addps %xmm11, %xmm3
  3683. movss 80 * SIZE(BO), %xmm11
  3684. mulps %xmm10, %xmm13
  3685. addps %xmm13, %xmm0
  3686. movss 36 * SIZE(BO), %xmm13
  3687. mulps %xmm10, %xmm13
  3688. movss 5 * SIZE(AO), %xmm10
  3689. addps %xmm13, %xmm1
  3690. movss 40 * SIZE(BO), %xmm13
  3691. mulps %xmm10, %xmm13
  3692. addps %xmm13, %xmm2
  3693. movss 44 * SIZE(BO), %xmm13
  3694. mulps %xmm10, %xmm13
  3695. movss 6 * SIZE(AO), %xmm10
  3696. addps %xmm13, %xmm3
  3697. movss 96 * SIZE(BO), %xmm13
  3698. mulps %xmm10, %xmm15
  3699. addps %xmm15, %xmm0
  3700. movss 52 * SIZE(BO), %xmm15
  3701. mulps %xmm10, %xmm15
  3702. movss 7 * SIZE(AO), %xmm10
  3703. addps %xmm15, %xmm1
  3704. movss 56 * SIZE(BO), %xmm15
  3705. mulps %xmm10, %xmm15
  3706. addps %xmm15, %xmm2
  3707. movss 60 * SIZE(BO), %xmm15
  3708. mulps %xmm10, %xmm15
  3709. movss 12 * SIZE(AO), %xmm10
  3710. addps %xmm15, %xmm3
  3711. movss 112 * SIZE(BO), %xmm15
  3712. addq $ 8 * SIZE, AO
  3713. addq $64 * SIZE, BO
  3714. decq %rax
  3715. jne .L92
  3716. ALIGN_4
  3717. .L95:
  3718. #if defined(LT) || defined(RN)
  3719. movq KK, %rax
  3720. #else
  3721. movq K, %rax
  3722. subq KK, %rax
  3723. #endif
  3724. andq $7, %rax # if (k & 1)
  3725. BRANCH
  3726. je .L98
  3727. ALIGN_4
  3728. .L96:
  3729. mulps %xmm8, %xmm9
  3730. addps %xmm9, %xmm0
  3731. movss 4 * SIZE(BO), %xmm9
  3732. mulps %xmm8, %xmm9
  3733. movss 1 * SIZE(AO), %xmm8
  3734. addps %xmm9, %xmm1
  3735. movss 8 * SIZE(BO), %xmm9
  3736. addq $1 * SIZE, AO # aoffset += 4
  3737. addq $8 * SIZE, BO # boffset1 += 8
  3738. decq %rax
  3739. jg .L96
  3740. ALIGN_4
  3741. .L98:
  3742. addss %xmm2, %xmm0
  3743. addss %xmm3, %xmm1
  3744. #if defined(LN) || defined(RT)
  3745. movq KK, %rax
  3746. #ifdef LN
  3747. subq $1, %rax
  3748. #else
  3749. subq $2, %rax
  3750. #endif
  3751. movq AORIG, AO
  3752. movq BORIG, B
  3753. leaq BUFFER, BO
  3754. salq $ BASE_SHIFT, %rax
  3755. leaq (AO, %rax, 1), AO
  3756. leaq (B, %rax, 2), B
  3757. leaq (BO, %rax, 8), BO
  3758. #endif
  3759. #if defined(LN) || defined(LT)
  3760. unpcklps %xmm1, %xmm0
  3761. #ifdef movsd
  3762. xorps %xmm1, %xmm1
  3763. #endif
  3764. movsd 0 * SIZE(B), %xmm1
  3765. subps %xmm0, %xmm1
  3766. #else
  3767. movss 0 * SIZE(AO), %xmm8
  3768. movss 1 * SIZE(AO), %xmm10
  3769. subss %xmm0, %xmm8
  3770. subss %xmm1, %xmm10
  3771. #endif
  3772. #if defined(LN) || defined(LT)
  3773. movaps 0 * SIZE(AO), %xmm6
  3774. pshufd $0x00, %xmm6, %xmm8
  3775. mulps %xmm8, %xmm1
  3776. #endif
  3777. #ifdef RN
  3778. movaps 0 * SIZE(B), %xmm0
  3779. pshufd $0x00, %xmm0, %xmm2
  3780. mulss %xmm2, %xmm8
  3781. pshufd $0x55, %xmm0, %xmm2
  3782. mulss %xmm8, %xmm2
  3783. subss %xmm2, %xmm10
  3784. pshufd $0xff, %xmm0, %xmm2
  3785. mulss %xmm2, %xmm10
  3786. #endif
  3787. #ifdef RT
  3788. movaps 0 * SIZE(B), %xmm0
  3789. pshufd $0xff, %xmm0, %xmm2
  3790. mulss %xmm2, %xmm10
  3791. pshufd $0xaa, %xmm0, %xmm2
  3792. mulss %xmm10, %xmm2
  3793. subss %xmm2, %xmm8
  3794. pshufd $0x00, %xmm0, %xmm2
  3795. mulss %xmm2, %xmm8
  3796. #endif
  3797. #ifdef LN
  3798. subq $1 * SIZE, CO1
  3799. #endif
  3800. #if defined(LN) || defined(LT)
  3801. movlps %xmm1, 0 * SIZE(B)
  3802. pshufd $0x00, %xmm1, %xmm2
  3803. pshufd $0x55, %xmm1, %xmm3
  3804. movaps %xmm2, 0 * SIZE(BO)
  3805. movaps %xmm3, 4 * SIZE(BO)
  3806. #else
  3807. movss %xmm8, 0 * SIZE(AO)
  3808. movss %xmm10, 1 * SIZE(AO)
  3809. #endif
  3810. #if defined(LN) || defined(LT)
  3811. unpcklps %xmm10, %xmm1
  3812. unpcklps %xmm11, %xmm5
  3813. movaps %xmm1, %xmm10
  3814. unpcklps %xmm5, %xmm1
  3815. unpckhps %xmm5, %xmm10
  3816. movss %xmm1, 0 * SIZE(CO1)
  3817. movss %xmm10, 0 * SIZE(CO1, LDC, 1)
  3818. #else
  3819. movss %xmm8, 0 * SIZE(CO1)
  3820. movss %xmm10, 0 * SIZE(CO1, LDC, 1)
  3821. #endif
  3822. #ifndef LN
  3823. addq $1 * SIZE, CO1
  3824. #endif
  3825. #if defined(LT) || defined(RN)
  3826. movq K, %rax
  3827. subq KK, %rax
  3828. leaq (AO, %rax, SIZE), AO
  3829. #ifdef LT
  3830. addq $ 2 * SIZE, B
  3831. #endif
  3832. #endif
  3833. #ifdef LN
  3834. subq $1, KK
  3835. movq BORIG, B
  3836. #endif
  3837. #ifdef LT
  3838. addq $1, KK
  3839. #endif
  3840. #ifdef RT
  3841. movq K, %rax
  3842. movq BORIG, B
  3843. salq $BASE_SHIFT, %rax
  3844. addq %rax, AORIG
  3845. #endif
  3846. ALIGN_4
  3847. .L99:
  3848. #ifdef LN
  3849. leaq (, K, SIZE), %rax
  3850. leaq (B, %rax, 2), B
  3851. #endif
  3852. #if defined(LT) || defined(RN)
  3853. movq K, %rax
  3854. subq KK, %rax
  3855. leaq (,%rax, SIZE), %rax
  3856. leaq (B, %rax, 2), B
  3857. #endif
  3858. #ifdef RN
  3859. addq $2, KK
  3860. #endif
  3861. #ifdef RT
  3862. subq $2, KK
  3863. #endif
  3864. ALIGN_4
  3865. .L100:
  3866. testq $1, N
  3867. je .L999
  3868. #ifdef LN
  3869. movq OFFSET, %rax
  3870. addq M, %rax
  3871. movq %rax, KK
  3872. #endif
  3873. leaq BUFFER, BO
  3874. #ifdef RT
  3875. movq K, %rax
  3876. salq $BASE_SHIFT, %rax
  3877. subq %rax, B
  3878. #endif
  3879. #if defined(LN) || defined(RT)
  3880. movq KK, %rax
  3881. movq B, BORIG
  3882. salq $BASE_SHIFT, %rax
  3883. leaq (B, %rax, 1), B
  3884. leaq (BO, %rax, 4), BO
  3885. #endif
  3886. #ifdef LT
  3887. movq OFFSET, %rax
  3888. movq %rax, KK
  3889. #endif
  3890. #if defined(LT) || defined(RN)
  3891. movq KK, %rax
  3892. #else
  3893. movq K, %rax
  3894. subq KK, %rax
  3895. #endif
  3896. sarq $3, %rax
  3897. jle .L103
  3898. ALIGN_4
  3899. .L102:
  3900. movsd 0 * SIZE(B), %xmm3
  3901. movhps 2 * SIZE(B), %xmm3
  3902. movsd 4 * SIZE(B), %xmm7
  3903. movhps 6 * SIZE(B), %xmm7
  3904. pshufd $0x00, %xmm3, %xmm0
  3905. pshufd $0x55, %xmm3, %xmm1
  3906. pshufd $0xaa, %xmm3, %xmm2
  3907. pshufd $0xff, %xmm3, %xmm3
  3908. pshufd $0x00, %xmm7, %xmm4
  3909. pshufd $0x55, %xmm7, %xmm5
  3910. pshufd $0xaa, %xmm7, %xmm6
  3911. pshufd $0xff, %xmm7, %xmm7
  3912. movaps %xmm0, 0 * SIZE(BO)
  3913. movaps %xmm1, 4 * SIZE(BO)
  3914. movaps %xmm2, 8 * SIZE(BO)
  3915. movaps %xmm3, 12 * SIZE(BO)
  3916. movaps %xmm4, 16 * SIZE(BO)
  3917. movaps %xmm5, 20 * SIZE(BO)
  3918. movaps %xmm6, 24 * SIZE(BO)
  3919. movaps %xmm7, 28 * SIZE(BO)
  3920. addq $ 8 * SIZE, B
  3921. addq $32 * SIZE, BO
  3922. decq %rax
  3923. jne .L102
  3924. ALIGN_4
  3925. .L103:
  3926. #if defined(LT) || defined(RN)
  3927. movq KK, %rax
  3928. #else
  3929. movq K, %rax
  3930. subq KK, %rax
  3931. #endif
  3932. andq $7, %rax
  3933. BRANCH
  3934. jle .L110
  3935. ALIGN_4
  3936. .L104:
  3937. movss 0 * SIZE(B), %xmm3
  3938. pshufd $0x00, %xmm3, %xmm0
  3939. movaps %xmm0, 0 * SIZE(BO)
  3940. addq $ 1 * SIZE, B
  3941. addq $ 4 * SIZE, BO
  3942. decq %rax
  3943. jne .L104
  3944. ALIGN_4
  3945. .L110:
  3946. #if defined(LT) || defined(RN)
  3947. movq A, AO
  3948. #else
  3949. movq A, AORIG
  3950. #endif
  3951. #ifdef RT
  3952. subq LDC, C
  3953. #endif
  3954. movq C, CO1 # coffset1 = c
  3955. #ifndef RT
  3956. addq LDC, C
  3957. #endif
  3958. movq M, I
  3959. sarq $3, I # i = (m >> 3)
  3960. jle .L120
  3961. ALIGN_4
  3962. .L111:
  3963. #ifdef LN
  3964. movq K, %rax
  3965. salq $3 + BASE_SHIFT, %rax
  3966. subq %rax, AORIG
  3967. #endif
  3968. #if defined(LN) || defined(RT)
  3969. movq KK, %rax
  3970. movq AORIG, AO
  3971. leaq (, %rax, SIZE), %rax
  3972. leaq (AO, %rax, 8), AO
  3973. #endif
  3974. leaq BUFFER, BO
  3975. #if defined(LN) || defined(RT)
  3976. movq KK, %rax
  3977. salq $BASE_SHIFT, %rax
  3978. leaq (BO, %rax, 4), BO
  3979. #endif
  3980. movaps 0 * SIZE(AO), %xmm8
  3981. movaps 16 * SIZE(AO), %xmm10
  3982. movaps 32 * SIZE(AO), %xmm12
  3983. movaps 48 * SIZE(AO), %xmm14
  3984. movaps 0 * SIZE(BO), %xmm9
  3985. movaps 16 * SIZE(BO), %xmm11
  3986. movaps 32 * SIZE(BO), %xmm13
  3987. movaps 48 * SIZE(BO), %xmm15
  3988. pxor %xmm0, %xmm0
  3989. pxor %xmm1, %xmm1
  3990. PREFETCHW 4 * SIZE(CO1)
  3991. pxor %xmm4, %xmm4
  3992. pxor %xmm5, %xmm5
  3993. #if defined(LT) || defined(RN)
  3994. movq KK, %rax
  3995. #else
  3996. movq K, %rax
  3997. subq KK, %rax
  3998. #endif
  3999. sarq $3, %rax
  4000. je .L115
  4001. ALIGN_4
  4002. .L112:
  4003. mulps %xmm9, %xmm8
  4004. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  4005. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  4006. #endif
  4007. mulps 4 * SIZE(AO), %xmm9
  4008. addps %xmm8, %xmm0
  4009. movaps 8 * SIZE(AO), %xmm8
  4010. addps %xmm9, %xmm4
  4011. movaps 4 * SIZE(BO), %xmm9
  4012. mulps %xmm9, %xmm8
  4013. mulps 12 * SIZE(AO), %xmm9
  4014. addps %xmm8, %xmm0
  4015. movaps 64 * SIZE(AO), %xmm8
  4016. addps %xmm9, %xmm4
  4017. movaps 8 * SIZE(BO), %xmm9
  4018. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  4019. PREFETCH (PREFETCHSIZE + 16) * SIZE(AO)
  4020. #endif
  4021. mulps %xmm9, %xmm10
  4022. mulps 20 * SIZE(AO), %xmm9
  4023. addps %xmm10, %xmm0
  4024. movaps 24 * SIZE(AO), %xmm10
  4025. addps %xmm9, %xmm4
  4026. movaps 12 * SIZE(BO), %xmm9
  4027. mulps %xmm9, %xmm10
  4028. mulps 28 * SIZE(AO), %xmm9
  4029. addps %xmm10, %xmm0
  4030. movaps 80 * SIZE(AO), %xmm10
  4031. addps %xmm9, %xmm4
  4032. movaps 32 * SIZE(BO), %xmm9
  4033. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  4034. PREFETCH (PREFETCHSIZE + 32) * SIZE(AO)
  4035. #endif
  4036. mulps %xmm11, %xmm12
  4037. mulps 36 * SIZE(AO), %xmm11
  4038. addps %xmm12, %xmm0
  4039. movaps 40 * SIZE(AO), %xmm12
  4040. addps %xmm11, %xmm4
  4041. movaps 20 * SIZE(BO), %xmm11
  4042. mulps %xmm11, %xmm12
  4043. mulps 44 * SIZE(AO), %xmm11
  4044. addps %xmm12, %xmm0
  4045. movaps 96 * SIZE(AO), %xmm12
  4046. addps %xmm11, %xmm4
  4047. movaps 24 * SIZE(BO), %xmm11
  4048. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  4049. PREFETCH (PREFETCHSIZE + 48) * SIZE(AO)
  4050. #endif
  4051. mulps %xmm11, %xmm14
  4052. mulps 52 * SIZE(AO), %xmm11
  4053. addps %xmm14, %xmm0
  4054. movaps 56 * SIZE(AO), %xmm14
  4055. addps %xmm11, %xmm4
  4056. movaps 28 * SIZE(BO), %xmm11
  4057. mulps %xmm11, %xmm14
  4058. mulps 60 * SIZE(AO), %xmm11
  4059. addps %xmm14, %xmm0
  4060. movaps 112 * SIZE(AO), %xmm14
  4061. addps %xmm11, %xmm4
  4062. movaps 48 * SIZE(BO), %xmm11
  4063. addq $64 * SIZE, AO
  4064. addq $32 * SIZE, BO
  4065. decq %rax
  4066. jne .L112
  4067. ALIGN_4
  4068. .L115:
  4069. #if defined(LT) || defined(RN)
  4070. movq KK, %rax
  4071. #else
  4072. movq K, %rax
  4073. subq KK, %rax
  4074. #endif
  4075. andq $7, %rax # if (k & 1)
  4076. BRANCH
  4077. je .L118
  4078. ALIGN_4
  4079. .L116:
  4080. mulps %xmm9, %xmm8
  4081. mulps 4 * SIZE(AO), %xmm9
  4082. addps %xmm8, %xmm0
  4083. movaps 8 * SIZE(AO), %xmm8
  4084. addps %xmm9, %xmm4
  4085. movaps 4 * SIZE(BO), %xmm9
  4086. addq $8 * SIZE, AO # aoffset += 4
  4087. addq $4 * SIZE, BO # boffset1 += 8
  4088. decq %rax
  4089. jg .L116
  4090. ALIGN_4
  4091. .L118:
  4092. #if defined(LN) || defined(RT)
  4093. movq KK, %rax
  4094. #ifdef LN
  4095. subq $8, %rax
  4096. #else
  4097. subq $1, %rax
  4098. #endif
  4099. movq AORIG, AO
  4100. movq BORIG, B
  4101. leaq BUFFER, BO
  4102. salq $BASE_SHIFT, %rax
  4103. leaq (AO, %rax, 8), AO
  4104. leaq (B, %rax, 1), B
  4105. leaq (BO, %rax, 4), BO
  4106. #endif
  4107. #if defined(LN) || defined(LT)
  4108. movaps %xmm0, %xmm8
  4109. unpcklps %xmm2, %xmm0
  4110. unpckhps %xmm2, %xmm8
  4111. movaps %xmm1, %xmm14
  4112. unpcklps %xmm3, %xmm1
  4113. unpckhps %xmm3, %xmm14
  4114. movaps %xmm0, %xmm2
  4115. unpcklps %xmm1, %xmm0
  4116. unpckhps %xmm1, %xmm2
  4117. movaps %xmm8, %xmm3
  4118. unpcklps %xmm14, %xmm8
  4119. unpckhps %xmm14, %xmm3
  4120. movaps %xmm4, %xmm9
  4121. unpcklps %xmm6, %xmm4
  4122. unpckhps %xmm6, %xmm9
  4123. movaps %xmm5, %xmm14
  4124. unpcklps %xmm7, %xmm5
  4125. unpckhps %xmm7, %xmm14
  4126. movaps %xmm4, %xmm6
  4127. unpcklps %xmm5, %xmm4
  4128. unpckhps %xmm5, %xmm6
  4129. movaps %xmm9, %xmm7
  4130. unpcklps %xmm14, %xmm9
  4131. unpckhps %xmm14, %xmm7
  4132. movss 0 * SIZE(B), %xmm1
  4133. movss 1 * SIZE(B), %xmm5
  4134. movss 2 * SIZE(B), %xmm10
  4135. movss 3 * SIZE(B), %xmm11
  4136. movss 4 * SIZE(B), %xmm12
  4137. movss 5 * SIZE(B), %xmm13
  4138. movss 6 * SIZE(B), %xmm14
  4139. movss 7 * SIZE(B), %xmm15
  4140. subss %xmm0, %xmm1
  4141. subss %xmm2, %xmm5
  4142. subss %xmm8, %xmm10
  4143. subss %xmm3, %xmm11
  4144. subss %xmm4, %xmm12
  4145. subss %xmm6, %xmm13
  4146. subss %xmm9, %xmm14
  4147. subss %xmm7, %xmm15
  4148. #else
  4149. movaps 0 * SIZE(AO), %xmm8
  4150. movaps 4 * SIZE(AO), %xmm9
  4151. subps %xmm0, %xmm8
  4152. subps %xmm4, %xmm9
  4153. #endif
  4154. #ifdef LN
  4155. movaps 60 * SIZE(AO), %xmm6
  4156. pshufd $0xff, %xmm6, %xmm8
  4157. mulss %xmm8, %xmm15
  4158. pshufd $0xaa, %xmm6, %xmm8
  4159. mulss %xmm15, %xmm8
  4160. subss %xmm8, %xmm14
  4161. pshufd $0x55, %xmm6, %xmm8
  4162. mulss %xmm15, %xmm8
  4163. subss %xmm8, %xmm13
  4164. pshufd $0x00, %xmm6, %xmm8
  4165. mulss %xmm15, %xmm8
  4166. subss %xmm8, %xmm12
  4167. movaps 56 * SIZE(AO), %xmm6
  4168. pshufd $0xff, %xmm6, %xmm8
  4169. mulss %xmm15, %xmm8
  4170. subss %xmm8, %xmm11
  4171. pshufd $0xaa, %xmm6, %xmm8
  4172. mulss %xmm15, %xmm8
  4173. subss %xmm8, %xmm10
  4174. pshufd $0x55, %xmm6, %xmm8
  4175. mulss %xmm15, %xmm8
  4176. subss %xmm8, %xmm5
  4177. pshufd $0x00, %xmm6, %xmm8
  4178. mulss %xmm15, %xmm8
  4179. subss %xmm8, %xmm1
  4180. movaps 52 * SIZE(AO), %xmm6
  4181. pshufd $0xaa, %xmm6, %xmm8
  4182. mulss %xmm8, %xmm14
  4183. pshufd $0x55, %xmm6, %xmm8
  4184. mulss %xmm14, %xmm8
  4185. subss %xmm8, %xmm13
  4186. pshufd $0x00, %xmm6, %xmm8
  4187. mulss %xmm14, %xmm8
  4188. subss %xmm8, %xmm12
  4189. movaps 48 * SIZE(AO), %xmm6
  4190. pshufd $0xff, %xmm6, %xmm8
  4191. mulss %xmm14, %xmm8
  4192. subss %xmm8, %xmm11
  4193. pshufd $0xaa, %xmm6, %xmm8
  4194. mulss %xmm14, %xmm8
  4195. subss %xmm8, %xmm10
  4196. pshufd $0x55, %xmm6, %xmm8
  4197. mulss %xmm14, %xmm8
  4198. subss %xmm8, %xmm5
  4199. pshufd $0x00, %xmm6, %xmm8
  4200. mulss %xmm14, %xmm8
  4201. subss %xmm8, %xmm1
  4202. movaps 44 * SIZE(AO), %xmm6
  4203. pshufd $0x55, %xmm6, %xmm8
  4204. mulss %xmm8, %xmm13
  4205. pshufd $0x00, %xmm6, %xmm8
  4206. mulss %xmm13, %xmm8
  4207. subss %xmm8, %xmm12
  4208. movaps 40 * SIZE(AO), %xmm6
  4209. pshufd $0xff, %xmm6, %xmm8
  4210. mulss %xmm13, %xmm8
  4211. subss %xmm8, %xmm11
  4212. pshufd $0xaa, %xmm6, %xmm8
  4213. mulss %xmm13, %xmm8
  4214. subss %xmm8, %xmm10
  4215. pshufd $0x55, %xmm6, %xmm8
  4216. mulss %xmm13, %xmm8
  4217. subss %xmm8, %xmm5
  4218. pshufd $0x00, %xmm6, %xmm8
  4219. mulss %xmm13, %xmm8
  4220. subss %xmm8, %xmm1
  4221. movaps 36 * SIZE(AO), %xmm6
  4222. pshufd $0x00, %xmm6, %xmm8
  4223. mulss %xmm8, %xmm12
  4224. movaps 32 * SIZE(AO), %xmm6
  4225. pshufd $0xff, %xmm6, %xmm8
  4226. mulss %xmm12, %xmm8
  4227. subss %xmm8, %xmm11
  4228. pshufd $0xaa, %xmm6, %xmm8
  4229. mulss %xmm12, %xmm8
  4230. subss %xmm8, %xmm10
  4231. pshufd $0x55, %xmm6, %xmm8
  4232. mulss %xmm12, %xmm8
  4233. subss %xmm8, %xmm5
  4234. pshufd $0x00, %xmm6, %xmm8
  4235. mulss %xmm12, %xmm8
  4236. subss %xmm8, %xmm1
  4237. movaps 24 * SIZE(AO), %xmm6
  4238. pshufd $0xff, %xmm6, %xmm8
  4239. mulss %xmm8, %xmm11
  4240. pshufd $0xaa, %xmm6, %xmm8
  4241. mulss %xmm11, %xmm8
  4242. subss %xmm8, %xmm10
  4243. pshufd $0x55, %xmm6, %xmm8
  4244. mulss %xmm11, %xmm8
  4245. subss %xmm8, %xmm5
  4246. pshufd $0x00, %xmm6, %xmm8
  4247. mulss %xmm11, %xmm8
  4248. subss %xmm8, %xmm1
  4249. movaps 16 * SIZE(AO), %xmm6
  4250. pshufd $0xaa, %xmm6, %xmm8
  4251. mulss %xmm8, %xmm10
  4252. pshufd $0x55, %xmm6, %xmm8
  4253. mulss %xmm10, %xmm8
  4254. subss %xmm8, %xmm5
  4255. pshufd $0x00, %xmm6, %xmm8
  4256. mulss %xmm10, %xmm8
  4257. subss %xmm8, %xmm1
  4258. movaps 8 * SIZE(AO), %xmm6
  4259. pshufd $0x55, %xmm6, %xmm8
  4260. mulss %xmm8, %xmm5
  4261. pshufd $0x00, %xmm6, %xmm8
  4262. mulss %xmm5, %xmm8
  4263. subss %xmm8, %xmm1
  4264. movaps 0 * SIZE(AO), %xmm6
  4265. pshufd $0x00, %xmm6, %xmm8
  4266. mulss %xmm8, %xmm1
  4267. #endif
  4268. #ifdef LT
  4269. movaps 0 * SIZE(AO), %xmm6
  4270. pshufd $0x00, %xmm6, %xmm8
  4271. mulss %xmm8, %xmm1
  4272. pshufd $0x55, %xmm6, %xmm8
  4273. mulss %xmm1, %xmm8
  4274. subss %xmm8, %xmm5
  4275. pshufd $0xaa, %xmm6, %xmm8
  4276. mulss %xmm1, %xmm8
  4277. subss %xmm8, %xmm10
  4278. pshufd $0xff, %xmm6, %xmm8
  4279. mulss %xmm1, %xmm8
  4280. subss %xmm8, %xmm11
  4281. movaps 4 * SIZE(AO), %xmm7
  4282. pshufd $0x00, %xmm7, %xmm8
  4283. mulss %xmm1, %xmm8
  4284. subss %xmm8, %xmm12
  4285. pshufd $0x55, %xmm7, %xmm8
  4286. mulss %xmm1, %xmm8
  4287. subss %xmm8, %xmm13
  4288. pshufd $0xaa, %xmm7, %xmm8
  4289. mulss %xmm1, %xmm8
  4290. subss %xmm8, %xmm14
  4291. pshufd $0xff, %xmm7, %xmm8
  4292. mulss %xmm1, %xmm8
  4293. subss %xmm8, %xmm15
  4294. movaps 8 * SIZE(AO), %xmm6
  4295. pshufd $0x55, %xmm6, %xmm8
  4296. mulss %xmm8, %xmm5
  4297. pshufd $0xaa, %xmm6, %xmm8
  4298. mulss %xmm5, %xmm8
  4299. subss %xmm8, %xmm10
  4300. pshufd $0xff, %xmm6, %xmm8
  4301. mulss %xmm5, %xmm8
  4302. subss %xmm8, %xmm11
  4303. movaps 12 * SIZE(AO), %xmm7
  4304. pshufd $0x00, %xmm7, %xmm8
  4305. mulss %xmm5, %xmm8
  4306. subss %xmm8, %xmm12
  4307. pshufd $0x55, %xmm7, %xmm8
  4308. mulss %xmm5, %xmm8
  4309. subss %xmm8, %xmm13
  4310. pshufd $0xaa, %xmm7, %xmm8
  4311. mulss %xmm5, %xmm8
  4312. subss %xmm8, %xmm14
  4313. pshufd $0xff, %xmm7, %xmm8
  4314. mulss %xmm5, %xmm8
  4315. subss %xmm8, %xmm15
  4316. movaps 16 * SIZE(AO), %xmm6
  4317. pshufd $0xaa, %xmm6, %xmm8
  4318. mulss %xmm8, %xmm10
  4319. pshufd $0xff, %xmm6, %xmm8
  4320. mulss %xmm10, %xmm8
  4321. subss %xmm8, %xmm11
  4322. movaps 20 * SIZE(AO), %xmm7
  4323. pshufd $0x00, %xmm7, %xmm8
  4324. mulss %xmm10, %xmm8
  4325. subss %xmm8, %xmm12
  4326. pshufd $0x55, %xmm7, %xmm8
  4327. mulss %xmm10, %xmm8
  4328. subss %xmm8, %xmm13
  4329. pshufd $0xaa, %xmm7, %xmm8
  4330. mulss %xmm10, %xmm8
  4331. subss %xmm8, %xmm14
  4332. pshufd $0xff, %xmm7, %xmm8
  4333. mulss %xmm10, %xmm8
  4334. subss %xmm8, %xmm15
  4335. movaps 24 * SIZE(AO), %xmm6
  4336. pshufd $0xff, %xmm6, %xmm8
  4337. mulss %xmm8, %xmm11
  4338. movaps 28 * SIZE(AO), %xmm7
  4339. pshufd $0x00, %xmm7, %xmm8
  4340. mulss %xmm11, %xmm8
  4341. subss %xmm8, %xmm12
  4342. pshufd $0x55, %xmm7, %xmm8
  4343. mulss %xmm11, %xmm8
  4344. subss %xmm8, %xmm13
  4345. pshufd $0xaa, %xmm7, %xmm8
  4346. mulss %xmm11, %xmm8
  4347. subss %xmm8, %xmm14
  4348. pshufd $0xff, %xmm7, %xmm8
  4349. mulss %xmm11, %xmm8
  4350. subss %xmm8, %xmm15
  4351. movaps 36 * SIZE(AO), %xmm6
  4352. pshufd $0x00, %xmm6, %xmm8
  4353. mulss %xmm8, %xmm12
  4354. pshufd $0x55, %xmm6, %xmm8
  4355. mulss %xmm12, %xmm8
  4356. subss %xmm8, %xmm13
  4357. pshufd $0xaa, %xmm6, %xmm8
  4358. mulss %xmm12, %xmm8
  4359. subss %xmm8, %xmm14
  4360. pshufd $0xff, %xmm6, %xmm8
  4361. mulss %xmm12, %xmm8
  4362. subss %xmm8, %xmm15
  4363. movaps 44 * SIZE(AO), %xmm7
  4364. pshufd $0x55, %xmm7, %xmm8
  4365. mulss %xmm8, %xmm13
  4366. pshufd $0xaa, %xmm7, %xmm8
  4367. mulss %xmm13, %xmm8
  4368. subss %xmm8, %xmm14
  4369. pshufd $0xff, %xmm7, %xmm8
  4370. mulss %xmm13, %xmm8
  4371. subss %xmm8, %xmm15
  4372. movaps 52 * SIZE(AO), %xmm6
  4373. pshufd $0xaa, %xmm6, %xmm8
  4374. mulss %xmm8, %xmm14
  4375. pshufd $0xff, %xmm6, %xmm8
  4376. mulss %xmm14, %xmm8
  4377. subss %xmm8, %xmm15
  4378. movaps 60 * SIZE(AO), %xmm7
  4379. pshufd $0xff, %xmm7, %xmm8
  4380. mulss %xmm8, %xmm15
  4381. #endif
  4382. #if defined(RN) || defined(RT)
  4383. movss 0 * SIZE(B), %xmm0
  4384. pshufd $0x00, %xmm0, %xmm2
  4385. mulps %xmm2, %xmm8
  4386. mulps %xmm2, %xmm9
  4387. #endif
  4388. #ifdef LN
  4389. subq $8 * SIZE, CO1
  4390. #endif
  4391. #if defined(LN) || defined(LT)
  4392. movss %xmm1, 0 * SIZE(B)
  4393. movss %xmm5, 1 * SIZE(B)
  4394. movss %xmm10, 2 * SIZE(B)
  4395. movss %xmm11, 3 * SIZE(B)
  4396. movss %xmm12, 4 * SIZE(B)
  4397. movss %xmm13, 5 * SIZE(B)
  4398. movss %xmm14, 6 * SIZE(B)
  4399. movss %xmm15, 7 * SIZE(B)
  4400. pshufd $0x00, %xmm1, %xmm2
  4401. movaps %xmm2, 0 * SIZE(BO)
  4402. pshufd $0x00, %xmm5, %xmm2
  4403. movaps %xmm2, 4 * SIZE(BO)
  4404. pshufd $0x00, %xmm10, %xmm2
  4405. movaps %xmm2, 8 * SIZE(BO)
  4406. pshufd $0x00, %xmm11, %xmm2
  4407. movaps %xmm2, 12 * SIZE(BO)
  4408. pshufd $0x00, %xmm12, %xmm2
  4409. movaps %xmm2, 16 * SIZE(BO)
  4410. pshufd $0x00, %xmm13, %xmm2
  4411. movaps %xmm2, 20 * SIZE(BO)
  4412. pshufd $0x00, %xmm14, %xmm2
  4413. movaps %xmm2, 24 * SIZE(BO)
  4414. pshufd $0x00, %xmm15, %xmm2
  4415. movaps %xmm2, 28 * SIZE(BO)
  4416. #else
  4417. movaps %xmm8, 0 * SIZE(AO)
  4418. movaps %xmm9, 4 * SIZE(AO)
  4419. #endif
  4420. #if defined(LN) || defined(LT)
  4421. unpcklps %xmm10, %xmm1
  4422. unpcklps %xmm11, %xmm5
  4423. unpcklps %xmm5, %xmm1
  4424. unpcklps %xmm14, %xmm12
  4425. unpcklps %xmm15, %xmm13
  4426. unpcklps %xmm13, %xmm12
  4427. movlps %xmm1, 0 * SIZE(CO1)
  4428. movhps %xmm1, 2 * SIZE(CO1)
  4429. movlps %xmm12, 4 * SIZE(CO1)
  4430. movhps %xmm12, 6 * SIZE(CO1)
  4431. #else
  4432. movlps %xmm8, 0 * SIZE(CO1)
  4433. movhps %xmm8, 2 * SIZE(CO1)
  4434. movlps %xmm9, 4 * SIZE(CO1)
  4435. movhps %xmm9, 6 * SIZE(CO1)
  4436. #endif
  4437. #ifndef LN
  4438. addq $8 * SIZE, CO1
  4439. #endif
  4440. #if defined(LT) || defined(RN)
  4441. movq K, %rax
  4442. subq KK, %rax
  4443. leaq (,%rax, SIZE), %rax
  4444. leaq (AO, %rax, 8), AO
  4445. #ifdef LT
  4446. addq $8 * SIZE, B
  4447. #endif
  4448. #endif
  4449. #ifdef LN
  4450. subq $8, KK
  4451. movq BORIG, B
  4452. #endif
  4453. #ifdef LT
  4454. addq $8, KK
  4455. #endif
  4456. #ifdef RT
  4457. movq K, %rax
  4458. movq BORIG, B
  4459. salq $3 + BASE_SHIFT, %rax
  4460. addq %rax, AORIG
  4461. #endif
  4462. decq I # i --
  4463. jg .L111
  4464. ALIGN_4
  4465. .L120:
  4466. testq $4, M
  4467. je .L130
  4468. #ifdef LN
  4469. movq K, %rax
  4470. salq $2 + BASE_SHIFT, %rax
  4471. subq %rax, AORIG
  4472. #endif
  4473. #if defined(LN) || defined(RT)
  4474. movq KK, %rax
  4475. movq AORIG, AO
  4476. leaq (, %rax, SIZE), %rax
  4477. leaq (AO, %rax, 4), AO
  4478. #endif
  4479. leaq BUFFER, BO
  4480. #if defined(LN) || defined(RT)
  4481. movq KK, %rax
  4482. salq $BASE_SHIFT, %rax
  4483. leaq (BO, %rax, 4), BO
  4484. #endif
  4485. movaps 0 * SIZE(AO), %xmm8
  4486. movaps 16 * SIZE(AO), %xmm10
  4487. movaps 0 * SIZE(BO), %xmm9
  4488. movaps 16 * SIZE(BO), %xmm11
  4489. pxor %xmm0, %xmm0
  4490. pxor %xmm1, %xmm1
  4491. pxor %xmm2, %xmm2
  4492. pxor %xmm3, %xmm3
  4493. #if defined(LT) || defined(RN)
  4494. movq KK, %rax
  4495. #else
  4496. movq K, %rax
  4497. subq KK, %rax
  4498. #endif
  4499. sarq $3, %rax
  4500. je .L125
  4501. ALIGN_4
  4502. .L122:
  4503. mulps %xmm8, %xmm9
  4504. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  4505. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  4506. #endif
  4507. movaps 4 * SIZE(AO), %xmm8
  4508. mulps 4 * SIZE(BO), %xmm8
  4509. addps %xmm9, %xmm0
  4510. movaps 32 * SIZE(BO), %xmm9
  4511. addps %xmm8, %xmm1
  4512. movaps 8 * SIZE(AO), %xmm8
  4513. mulps 8 * SIZE(BO), %xmm8
  4514. addps %xmm8, %xmm2
  4515. movaps 12 * SIZE(AO), %xmm8
  4516. mulps 12 * SIZE(BO), %xmm8
  4517. addps %xmm8, %xmm3
  4518. movaps 32 * SIZE(AO), %xmm8
  4519. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  4520. PREFETCH (PREFETCHSIZE + 16) * SIZE(AO)
  4521. #endif
  4522. mulps %xmm10, %xmm11
  4523. movaps 20 * SIZE(AO), %xmm10
  4524. mulps 20 * SIZE(BO), %xmm10
  4525. addps %xmm11, %xmm0
  4526. movaps 48 * SIZE(BO), %xmm11
  4527. addps %xmm10, %xmm1
  4528. movaps 24 * SIZE(AO), %xmm10
  4529. mulps 24 * SIZE(BO), %xmm10
  4530. addps %xmm10, %xmm2
  4531. movaps 28 * SIZE(AO), %xmm10
  4532. mulps 28 * SIZE(BO), %xmm10
  4533. addps %xmm10, %xmm3
  4534. movaps 48 * SIZE(AO), %xmm10
  4535. addq $32 * SIZE, AO
  4536. addq $32 * SIZE, BO
  4537. decq %rax
  4538. jne .L122
  4539. ALIGN_4
  4540. .L125:
  4541. #if defined(LT) || defined(RN)
  4542. movq KK, %rax
  4543. #else
  4544. movq K, %rax
  4545. subq KK, %rax
  4546. #endif
  4547. andq $7, %rax # if (k & 1)
  4548. BRANCH
  4549. je .L128
  4550. ALIGN_4
  4551. .L126:
  4552. mulps %xmm8, %xmm9
  4553. movaps 4 * SIZE(AO), %xmm8
  4554. addps %xmm9, %xmm0
  4555. movaps 4 * SIZE(BO), %xmm9
  4556. addq $4 * SIZE, AO # aoffset += 4
  4557. addq $4 * SIZE, BO # boffset1 += 8
  4558. decq %rax
  4559. jg .L126
  4560. ALIGN_4
  4561. .L128:
  4562. addps %xmm1, %xmm0
  4563. addps %xmm3, %xmm2
  4564. addps %xmm2, %xmm0
  4565. #if defined(LN) || defined(RT)
  4566. movq KK, %rax
  4567. #ifdef LN
  4568. subq $4, %rax
  4569. #else
  4570. subq $1, %rax
  4571. #endif
  4572. movq AORIG, AO
  4573. movq BORIG, B
  4574. leaq BUFFER, BO
  4575. salq $BASE_SHIFT, %rax
  4576. leaq (AO, %rax, 4), AO
  4577. leaq (B, %rax, 1), B
  4578. leaq (BO, %rax, 4), BO
  4579. #endif
  4580. #if defined(LN) || defined(LT)
  4581. movaps %xmm0, %xmm8
  4582. unpcklps %xmm2, %xmm0
  4583. unpckhps %xmm2, %xmm8
  4584. movaps %xmm1, %xmm14
  4585. unpcklps %xmm3, %xmm1
  4586. unpckhps %xmm3, %xmm14
  4587. movaps %xmm0, %xmm2
  4588. unpcklps %xmm1, %xmm0
  4589. unpckhps %xmm1, %xmm2
  4590. movaps %xmm8, %xmm3
  4591. unpcklps %xmm14, %xmm8
  4592. unpckhps %xmm14, %xmm3
  4593. movss 0 * SIZE(B), %xmm1
  4594. movss 1 * SIZE(B), %xmm5
  4595. movss 2 * SIZE(B), %xmm10
  4596. movss 3 * SIZE(B), %xmm11
  4597. subss %xmm0, %xmm1
  4598. subss %xmm2, %xmm5
  4599. subss %xmm8, %xmm10
  4600. subss %xmm3, %xmm11
  4601. #else
  4602. movaps 0 * SIZE(AO), %xmm8
  4603. subps %xmm0, %xmm8
  4604. #endif
  4605. #ifdef LN
  4606. movaps 12 * SIZE(AO), %xmm6
  4607. pshufd $0xff, %xmm6, %xmm8
  4608. mulss %xmm8, %xmm11
  4609. pshufd $0xaa, %xmm6, %xmm8
  4610. mulss %xmm11, %xmm8
  4611. subss %xmm8, %xmm10
  4612. pshufd $0x55, %xmm6, %xmm8
  4613. mulss %xmm11, %xmm8
  4614. subss %xmm8, %xmm5
  4615. pshufd $0x00, %xmm6, %xmm8
  4616. mulss %xmm11, %xmm8
  4617. subss %xmm8, %xmm1
  4618. movaps 8 * SIZE(AO), %xmm6
  4619. pshufd $0xaa, %xmm6, %xmm8
  4620. mulss %xmm8, %xmm10
  4621. pshufd $0x55, %xmm6, %xmm8
  4622. mulss %xmm10, %xmm8
  4623. subss %xmm8, %xmm5
  4624. pshufd $0x00, %xmm6, %xmm8
  4625. mulss %xmm10, %xmm8
  4626. subss %xmm8, %xmm1
  4627. movaps 4 * SIZE(AO), %xmm6
  4628. pshufd $0x55, %xmm6, %xmm8
  4629. mulss %xmm8, %xmm5
  4630. pshufd $0x00, %xmm6, %xmm8
  4631. mulss %xmm5, %xmm8
  4632. subss %xmm8, %xmm1
  4633. movaps 0 * SIZE(AO), %xmm6
  4634. pshufd $0x00, %xmm6, %xmm8
  4635. mulss %xmm8, %xmm1
  4636. #endif
  4637. #ifdef LT
  4638. movaps 0 * SIZE(AO), %xmm6
  4639. pshufd $0x00, %xmm6, %xmm8
  4640. mulss %xmm8, %xmm1
  4641. pshufd $0x55, %xmm6, %xmm8
  4642. mulss %xmm1, %xmm8
  4643. subss %xmm8, %xmm5
  4644. pshufd $0xaa, %xmm6, %xmm8
  4645. mulss %xmm1, %xmm8
  4646. subss %xmm8, %xmm10
  4647. pshufd $0xff, %xmm6, %xmm8
  4648. mulss %xmm1, %xmm8
  4649. subss %xmm8, %xmm11
  4650. movaps 4 * SIZE(AO), %xmm6
  4651. pshufd $0x55, %xmm6, %xmm8
  4652. mulss %xmm8, %xmm5
  4653. pshufd $0xaa, %xmm6, %xmm8
  4654. mulss %xmm5, %xmm8
  4655. subss %xmm8, %xmm10
  4656. pshufd $0xff, %xmm6, %xmm8
  4657. mulss %xmm5, %xmm8
  4658. subss %xmm8, %xmm11
  4659. movaps 8 * SIZE(AO), %xmm6
  4660. pshufd $0xaa, %xmm6, %xmm8
  4661. mulss %xmm8, %xmm10
  4662. pshufd $0xff, %xmm6, %xmm8
  4663. mulss %xmm10, %xmm8
  4664. subss %xmm8, %xmm11
  4665. movaps 12 * SIZE(AO), %xmm6
  4666. pshufd $0xff, %xmm6, %xmm8
  4667. mulss %xmm8, %xmm11
  4668. #endif
  4669. #if defined(RN) || defined(RT)
  4670. movss 0 * SIZE(B), %xmm0
  4671. pshufd $0x00, %xmm0, %xmm2
  4672. mulps %xmm2, %xmm8
  4673. #endif
  4674. #ifdef LN
  4675. subq $4 * SIZE, CO1
  4676. #endif
  4677. #if defined(LN) || defined(LT)
  4678. movss %xmm1, 0 * SIZE(B)
  4679. movss %xmm5, 1 * SIZE(B)
  4680. movss %xmm10, 2 * SIZE(B)
  4681. movss %xmm11, 3 * SIZE(B)
  4682. pshufd $0x00, %xmm1, %xmm2
  4683. movaps %xmm2, 0 * SIZE(BO)
  4684. pshufd $0x00, %xmm5, %xmm2
  4685. movaps %xmm2, 4 * SIZE(BO)
  4686. pshufd $0x00, %xmm10, %xmm2
  4687. movaps %xmm2, 8 * SIZE(BO)
  4688. pshufd $0x00, %xmm11, %xmm2
  4689. movaps %xmm2, 12 * SIZE(BO)
  4690. #else
  4691. movaps %xmm8, 0 * SIZE(AO)
  4692. #endif
  4693. #if defined(LN) || defined(LT)
  4694. unpcklps %xmm10, %xmm1
  4695. unpcklps %xmm11, %xmm5
  4696. unpcklps %xmm5, %xmm1
  4697. movlps %xmm1, 0 * SIZE(CO1)
  4698. movhps %xmm1, 2 * SIZE(CO1)
  4699. #else
  4700. movlps %xmm8, 0 * SIZE(CO1)
  4701. movhps %xmm8, 2 * SIZE(CO1)
  4702. #endif
  4703. #ifndef LN
  4704. addq $4 * SIZE, CO1
  4705. #endif
  4706. #if defined(LT) || defined(RN)
  4707. movq K, %rax
  4708. subq KK, %rax
  4709. leaq (,%rax, SIZE), %rax
  4710. leaq (AO, %rax, 4), AO
  4711. #ifdef LT
  4712. addq $4 * SIZE, B
  4713. #endif
  4714. #endif
  4715. #ifdef LN
  4716. subq $4, KK
  4717. movq BORIG, B
  4718. #endif
  4719. #ifdef LT
  4720. addq $4, KK
  4721. #endif
  4722. #ifdef RT
  4723. movq K, %rax
  4724. movq BORIG, B
  4725. salq $2 + BASE_SHIFT, %rax
  4726. addq %rax, AORIG
  4727. #endif
  4728. ALIGN_4
  4729. .L130:
  4730. testq $2, M
  4731. je .L140
  4732. #ifdef LN
  4733. movq K, %rax
  4734. salq $1 + BASE_SHIFT, %rax
  4735. subq %rax, AORIG
  4736. #endif
  4737. #if defined(LN) || defined(RT)
  4738. movq KK, %rax
  4739. movq AORIG, AO
  4740. leaq (, %rax, SIZE), %rax
  4741. leaq (AO, %rax, 2), AO
  4742. #endif
  4743. leaq BUFFER, BO
  4744. #if defined(LN) || defined(RT)
  4745. movq KK, %rax
  4746. salq $BASE_SHIFT, %rax
  4747. leaq (BO, %rax, 4), BO
  4748. #endif
  4749. movaps 0 * SIZE(AO), %xmm8
  4750. movaps 8 * SIZE(AO), %xmm10
  4751. movaps 0 * SIZE(BO), %xmm9
  4752. movaps 16 * SIZE(BO), %xmm11
  4753. pxor %xmm0, %xmm0
  4754. pxor %xmm1, %xmm1
  4755. pxor %xmm2, %xmm2
  4756. pxor %xmm3, %xmm3
  4757. #if defined(LT) || defined(RN)
  4758. movq KK, %rax
  4759. #else
  4760. movq K, %rax
  4761. subq KK, %rax
  4762. #endif
  4763. sarq $3, %rax
  4764. je .L135
  4765. ALIGN_4
  4766. .L132:
  4767. mulps %xmm8, %xmm9
  4768. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  4769. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  4770. #endif
  4771. movsd 2 * SIZE(AO), %xmm8
  4772. addps %xmm9, %xmm0
  4773. movaps 4 * SIZE(BO), %xmm9
  4774. mulps %xmm8, %xmm9
  4775. movsd 4 * SIZE(AO), %xmm8
  4776. addps %xmm9, %xmm1
  4777. movaps 8 * SIZE(BO), %xmm9
  4778. mulps %xmm8, %xmm9
  4779. movsd 6 * SIZE(AO), %xmm8
  4780. addps %xmm9, %xmm0
  4781. movaps 12 * SIZE(BO), %xmm9
  4782. mulps %xmm8, %xmm9
  4783. movsd 16 * SIZE(AO), %xmm8
  4784. addps %xmm9, %xmm1
  4785. movaps 32 * SIZE(BO), %xmm9
  4786. mulps %xmm10, %xmm11
  4787. movsd 10 * SIZE(AO), %xmm10
  4788. addps %xmm11, %xmm0
  4789. movaps 20 * SIZE(BO), %xmm11
  4790. mulps %xmm10, %xmm11
  4791. movsd 12 * SIZE(AO), %xmm10
  4792. addps %xmm11, %xmm1
  4793. movaps 24 * SIZE(BO), %xmm11
  4794. mulps %xmm10, %xmm11
  4795. movsd 14 * SIZE(AO), %xmm10
  4796. addps %xmm11, %xmm0
  4797. movaps 28 * SIZE(BO), %xmm11
  4798. mulps %xmm10, %xmm11
  4799. movsd 24 * SIZE(AO), %xmm10
  4800. addps %xmm11, %xmm1
  4801. movaps 48 * SIZE(BO), %xmm11
  4802. addq $16 * SIZE, AO
  4803. addq $32 * SIZE, BO
  4804. decq %rax
  4805. jne .L132
  4806. ALIGN_4
  4807. .L135:
  4808. #if defined(LT) || defined(RN)
  4809. movq KK, %rax
  4810. #else
  4811. movq K, %rax
  4812. subq KK, %rax
  4813. #endif
  4814. andq $7, %rax # if (k & 1)
  4815. BRANCH
  4816. je .L138
  4817. ALIGN_4
  4818. .L136:
  4819. mulps %xmm8, %xmm9
  4820. movsd 2 * SIZE(AO), %xmm8
  4821. addps %xmm9, %xmm0
  4822. movaps 4 * SIZE(BO), %xmm9
  4823. addq $2 * SIZE, AO # aoffset += 4
  4824. addq $4 * SIZE, BO # boffset1 += 8
  4825. decq %rax
  4826. jg .L136
  4827. ALIGN_4
  4828. .L138:
  4829. addps %xmm1, %xmm0
  4830. #if defined(LN) || defined(RT)
  4831. movq KK, %rax
  4832. #ifdef LN
  4833. subq $2, %rax
  4834. #else
  4835. subq $1, %rax
  4836. #endif
  4837. movq AORIG, AO
  4838. movq BORIG, B
  4839. leaq BUFFER, BO
  4840. salq $BASE_SHIFT, %rax
  4841. leaq (AO, %rax, 2), AO
  4842. leaq (B, %rax, 1), B
  4843. leaq (BO, %rax, 4), BO
  4844. #endif
  4845. #if defined(LN) || defined(LT)
  4846. unpcklps %xmm2, %xmm0
  4847. unpcklps %xmm3, %xmm1
  4848. movaps %xmm0, %xmm2
  4849. unpcklps %xmm1, %xmm0
  4850. unpckhps %xmm1, %xmm2
  4851. movss 0 * SIZE(B), %xmm1
  4852. movss 1 * SIZE(B), %xmm5
  4853. subss %xmm0, %xmm1
  4854. subss %xmm2, %xmm5
  4855. #else
  4856. #ifdef movsd
  4857. xorps %xmm8, %xmm8
  4858. #endif
  4859. movsd 0 * SIZE(AO), %xmm8
  4860. subps %xmm0, %xmm8
  4861. #endif
  4862. #ifdef LN
  4863. movaps 0 * SIZE(AO), %xmm6
  4864. pshufd $0xff, %xmm6, %xmm8
  4865. mulss %xmm8, %xmm5
  4866. pshufd $0xaa, %xmm6, %xmm8
  4867. mulss %xmm5, %xmm8
  4868. subss %xmm8, %xmm1
  4869. pshufd $0x00, %xmm6, %xmm8
  4870. mulss %xmm8, %xmm1
  4871. #endif
  4872. #ifdef LT
  4873. movaps 0 * SIZE(AO), %xmm6
  4874. pshufd $0x00, %xmm6, %xmm8
  4875. mulss %xmm8, %xmm1
  4876. pshufd $0x55, %xmm6, %xmm8
  4877. mulss %xmm1, %xmm8
  4878. subss %xmm8, %xmm5
  4879. pshufd $0xff, %xmm6, %xmm8
  4880. mulss %xmm8, %xmm5
  4881. #endif
  4882. #if defined(RN) || defined(RT)
  4883. movss 0 * SIZE(B), %xmm0
  4884. pshufd $0x00, %xmm0, %xmm2
  4885. mulps %xmm2, %xmm8
  4886. #endif
  4887. #ifdef LN
  4888. subq $2 * SIZE, CO1
  4889. #endif
  4890. #if defined(LN) || defined(LT)
  4891. movss %xmm1, 0 * SIZE(B)
  4892. movss %xmm5, 1 * SIZE(B)
  4893. pshufd $0x00, %xmm1, %xmm2
  4894. movaps %xmm2, 0 * SIZE(BO)
  4895. pshufd $0x00, %xmm5, %xmm2
  4896. movaps %xmm2, 4 * SIZE(BO)
  4897. #else
  4898. movlps %xmm8, 0 * SIZE(AO)
  4899. #endif
  4900. #if defined(LN) || defined(LT)
  4901. unpcklps %xmm10, %xmm1
  4902. unpcklps %xmm11, %xmm5
  4903. unpcklps %xmm5, %xmm1
  4904. movlps %xmm1, 0 * SIZE(CO1)
  4905. #else
  4906. movlps %xmm8, 0 * SIZE(CO1)
  4907. #endif
  4908. #ifndef LN
  4909. addq $2 * SIZE, CO1
  4910. #endif
  4911. #if defined(LT) || defined(RN)
  4912. movq K, %rax
  4913. subq KK, %rax
  4914. leaq (,%rax, SIZE), %rax
  4915. leaq (AO, %rax, 2), AO
  4916. #ifdef LT
  4917. addq $2 * SIZE, B
  4918. #endif
  4919. #endif
  4920. #ifdef LN
  4921. subq $2, KK
  4922. movq BORIG, B
  4923. #endif
  4924. #ifdef LT
  4925. addq $2, KK
  4926. #endif
  4927. #ifdef RT
  4928. movq K, %rax
  4929. movq BORIG, B
  4930. salq $1 + BASE_SHIFT, %rax
  4931. addq %rax, AORIG
  4932. #endif
  4933. ALIGN_4
  4934. .L140:
  4935. testq $1, M
  4936. je .L149
  4937. #ifdef LN
  4938. movq K, %rax
  4939. salq $BASE_SHIFT, %rax
  4940. subq %rax, AORIG
  4941. #endif
  4942. #if defined(LN) || defined(RT)
  4943. movq KK, %rax
  4944. movq AORIG, AO
  4945. leaq (AO, %rax, SIZE), AO
  4946. #endif
  4947. leaq BUFFER, BO
  4948. #if defined(LN) || defined(RT)
  4949. movq KK, %rax
  4950. salq $BASE_SHIFT, %rax
  4951. leaq (BO, %rax, 4), BO
  4952. #endif
  4953. movss 0 * SIZE(AO), %xmm8
  4954. movss 4 * SIZE(AO), %xmm10
  4955. movss 0 * SIZE(BO), %xmm9
  4956. movss 16 * SIZE(BO), %xmm11
  4957. pxor %xmm0, %xmm0
  4958. pxor %xmm1, %xmm1
  4959. pxor %xmm2, %xmm2
  4960. pxor %xmm3, %xmm3
  4961. #if defined(LT) || defined(RN)
  4962. movq KK, %rax
  4963. #else
  4964. movq K, %rax
  4965. subq KK, %rax
  4966. #endif
  4967. sarq $3, %rax
  4968. je .L145
  4969. ALIGN_4
  4970. .L142:
  4971. mulss %xmm8, %xmm9
  4972. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  4973. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  4974. #endif
  4975. movss 1 * SIZE(AO), %xmm8
  4976. mulss 4 * SIZE(BO), %xmm8
  4977. addss %xmm9, %xmm0
  4978. movss 32 * SIZE(BO), %xmm9
  4979. addss %xmm8, %xmm1
  4980. movss 2 * SIZE(AO), %xmm8
  4981. mulss 8 * SIZE(BO), %xmm8
  4982. addss %xmm8, %xmm2
  4983. movss 3 * SIZE(AO), %xmm8
  4984. mulss 12 * SIZE(BO), %xmm8
  4985. addss %xmm8, %xmm3
  4986. movss 8 * SIZE(AO), %xmm8
  4987. mulss %xmm10, %xmm11
  4988. movss 5 * SIZE(AO), %xmm10
  4989. mulss 20 * SIZE(BO), %xmm10
  4990. addss %xmm11, %xmm0
  4991. movss 48 * SIZE(BO), %xmm11
  4992. addss %xmm10, %xmm1
  4993. movss 6 * SIZE(AO), %xmm10
  4994. mulss 24 * SIZE(BO), %xmm10
  4995. addss %xmm10, %xmm2
  4996. movss 7 * SIZE(AO), %xmm10
  4997. mulss 28 * SIZE(BO), %xmm10
  4998. addss %xmm10, %xmm3
  4999. movss 12 * SIZE(AO), %xmm10
  5000. addq $ 8 * SIZE, AO
  5001. addq $32 * SIZE, BO
  5002. decq %rax
  5003. jne .L142
  5004. ALIGN_4
  5005. .L145:
  5006. #if defined(LT) || defined(RN)
  5007. movq KK, %rax
  5008. #else
  5009. movq K, %rax
  5010. subq KK, %rax
  5011. #endif
  5012. andq $7, %rax # if (k & 1)
  5013. BRANCH
  5014. je .L148
  5015. ALIGN_4
  5016. .L146:
  5017. mulss %xmm8, %xmm9
  5018. movss 1 * SIZE(AO), %xmm8
  5019. addss %xmm9, %xmm0
  5020. movss 4 * SIZE(BO), %xmm9
  5021. addq $1 * SIZE, AO
  5022. addq $4 * SIZE, BO
  5023. decq %rax
  5024. jg .L146
  5025. ALIGN_4
  5026. .L148:
  5027. addss %xmm1, %xmm0
  5028. addss %xmm3, %xmm2
  5029. addss %xmm2, %xmm0
  5030. #if defined(LN) || defined(RT)
  5031. movq KK, %rax
  5032. subq $1, %rax
  5033. movq AORIG, AO
  5034. movq BORIG, B
  5035. leaq BUFFER, BO
  5036. salq $BASE_SHIFT, %rax
  5037. leaq (AO, %rax, 1), AO
  5038. leaq (B, %rax, 1), B
  5039. leaq (BO, %rax, 4), BO
  5040. #endif
  5041. #if defined(LN) || defined(LT)
  5042. movss 0 * SIZE(B), %xmm1
  5043. subss %xmm0, %xmm1
  5044. #else
  5045. movss 0 * SIZE(AO), %xmm8
  5046. subps %xmm0, %xmm8
  5047. #endif
  5048. #if defined(LN) || defined(LT)
  5049. mulss 0 * SIZE(AO), %xmm1
  5050. #endif
  5051. #if defined(RN) || defined(RT)
  5052. mulss 0 * SIZE(B), %xmm8
  5053. #endif
  5054. #ifdef LN
  5055. subq $1 * SIZE, CO1
  5056. #endif
  5057. #if defined(LN) || defined(LT)
  5058. movss %xmm1, 0 * SIZE(B)
  5059. pshufd $0x00, %xmm1, %xmm2
  5060. movaps %xmm2, 0 * SIZE(BO)
  5061. #else
  5062. movss %xmm8, 0 * SIZE(AO)
  5063. #endif
  5064. #if defined(LN) || defined(LT)
  5065. movss %xmm1, 0 * SIZE(CO1)
  5066. #else
  5067. movss %xmm8, 0 * SIZE(CO1)
  5068. #endif
  5069. #ifndef LN
  5070. addq $1 * SIZE, CO1
  5071. #endif
  5072. #if defined(LT) || defined(RN)
  5073. movq K, %rax
  5074. subq KK, %rax
  5075. leaq (,%rax, SIZE), %rax
  5076. leaq (AO, %rax, 1), AO
  5077. #ifdef LT
  5078. addq $1 * SIZE, B
  5079. #endif
  5080. #endif
  5081. #ifdef LN
  5082. subq $1, KK
  5083. movq BORIG, B
  5084. #endif
  5085. #ifdef LT
  5086. addq $1, KK
  5087. #endif
  5088. #ifdef RT
  5089. movq K, %rax
  5090. movq BORIG, B
  5091. salq $BASE_SHIFT, %rax
  5092. addq %rax, AORIG
  5093. #endif
  5094. ALIGN_4
  5095. .L149:
  5096. #ifdef LN
  5097. leaq (, K, SIZE), %rax
  5098. leaq (B, %rax, 1), B
  5099. #endif
  5100. #if defined(LT) || defined(RN)
  5101. movq K, %rax
  5102. subq KK, %rax
  5103. leaq (,%rax, SIZE), %rax
  5104. leaq (B, %rax, 1), B
  5105. #endif
  5106. #ifdef RN
  5107. addq $1, KK
  5108. #endif
  5109. #ifdef RT
  5110. subq $1, KK
  5111. #endif
  5112. ALIGN_4
  5113. .L999:
  5114. movq %rbx, %rsp
  5115. EMMS
  5116. movq 0(%rsp), %rbx
  5117. movq 8(%rsp), %rbp
  5118. movq 16(%rsp), %r12
  5119. movq 24(%rsp), %r13
  5120. movq 32(%rsp), %r14
  5121. movq 40(%rsp), %r15
  5122. #ifdef WINDOWS_ABI
  5123. movq 48(%rsp), %rdi
  5124. movq 56(%rsp), %rsi
  5125. movups 64(%rsp), %xmm6
  5126. movups 80(%rsp), %xmm7
  5127. movups 96(%rsp), %xmm8
  5128. movups 112(%rsp), %xmm9
  5129. movups 128(%rsp), %xmm10
  5130. movups 144(%rsp), %xmm11
  5131. movups 160(%rsp), %xmm12
  5132. movups 176(%rsp), %xmm13
  5133. movups 192(%rsp), %xmm14
  5134. movups 208(%rsp), %xmm15
  5135. #endif
  5136. addq $STACKSIZE, %rsp
  5137. ret
  5138. EPILOGUE