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

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