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.

ztrsm_kernel_LT_4x2_sse.S 72 kB

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