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_LN_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. testq $1, M
  404. je .L20
  405. #ifdef LN
  406. movq K, %rax
  407. salq $ZBASE_SHIFT, %rax
  408. subq %rax, AORIG
  409. #endif
  410. #if defined(LN) || defined(RT)
  411. movq KK, %rax
  412. movq AORIG, AO
  413. salq $ZBASE_SHIFT, %rax
  414. leaq (AO, %rax, 1), AO
  415. #endif
  416. leaq BUFFER, BO
  417. #if defined(LN) || defined(RT)
  418. movq KK, %rax
  419. salq $1 + ZBASE_SHIFT, %rax
  420. leaq (BO, %rax, 4), BO
  421. #endif
  422. movlps 0 * SIZE(AO), %xmm8
  423. movhps 2 * SIZE(AO), %xmm8
  424. movlps 8 * SIZE(AO), %xmm10
  425. movhps 10 * SIZE(AO), %xmm10
  426. movaps 0 * SIZE(BO), %xmm9
  427. movaps 16 * SIZE(BO), %xmm11
  428. movaps 32 * SIZE(BO), %xmm13
  429. movaps 48 * SIZE(BO), %xmm15
  430. pxor %xmm0, %xmm0
  431. pxor %xmm1, %xmm1
  432. pxor %xmm2, %xmm2
  433. pxor %xmm3, %xmm3
  434. #if defined(LT) || defined(RN)
  435. movq KK, %rax
  436. #else
  437. movq K, %rax
  438. subq KK, %rax
  439. #endif
  440. sarq $3, %rax
  441. je .L35
  442. ALIGN_4
  443. .L32:
  444. mulps %xmm8, %xmm9
  445. addps %xmm9, %xmm0
  446. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  447. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  448. #endif
  449. movaps 4 * SIZE(BO), %xmm9
  450. mulps %xmm8, %xmm9
  451. addps %xmm9, %xmm1
  452. movaps 8 * SIZE(BO), %xmm9
  453. mulps %xmm8, %xmm9
  454. addps %xmm9, %xmm2
  455. movaps 12 * SIZE(BO), %xmm9
  456. mulps %xmm8, %xmm9
  457. movsd 2 * SIZE(AO), %xmm8
  458. addps %xmm9, %xmm3
  459. movaps 64 * SIZE(BO), %xmm9
  460. mulps %xmm8, %xmm11
  461. addps %xmm11, %xmm0
  462. movaps 20 * SIZE(BO), %xmm11
  463. mulps %xmm8, %xmm11
  464. addps %xmm11, %xmm1
  465. movaps 24 * SIZE(BO), %xmm11
  466. mulps %xmm8, %xmm11
  467. addps %xmm11, %xmm2
  468. movaps 28 * SIZE(BO), %xmm11
  469. mulps %xmm8, %xmm11
  470. movsd 4 * SIZE(AO), %xmm8
  471. addps %xmm11, %xmm3
  472. movaps 80 * SIZE(BO), %xmm11
  473. mulps %xmm8, %xmm13
  474. addps %xmm13, %xmm0
  475. movaps 36 * SIZE(BO), %xmm13
  476. mulps %xmm8, %xmm13
  477. addps %xmm13, %xmm1
  478. movaps 40 * SIZE(BO), %xmm13
  479. mulps %xmm8, %xmm13
  480. addps %xmm13, %xmm2
  481. movaps 44 * SIZE(BO), %xmm13
  482. mulps %xmm8, %xmm13
  483. movsd 6 * SIZE(AO), %xmm8
  484. addps %xmm13, %xmm3
  485. movaps 96 * SIZE(BO), %xmm13
  486. mulps %xmm8, %xmm15
  487. addps %xmm15, %xmm0
  488. movaps 52 * SIZE(BO), %xmm15
  489. mulps %xmm8, %xmm15
  490. addps %xmm15, %xmm1
  491. movaps 56 * SIZE(BO), %xmm15
  492. mulps %xmm8, %xmm15
  493. addps %xmm15, %xmm2
  494. movaps 60 * SIZE(BO), %xmm15
  495. mulps %xmm8, %xmm15
  496. movsd 16 * SIZE(AO), %xmm8
  497. addps %xmm15, %xmm3
  498. movaps 112 * SIZE(BO), %xmm15
  499. mulps %xmm10, %xmm9
  500. addps %xmm9, %xmm0
  501. movaps 68 * SIZE(BO), %xmm9
  502. mulps %xmm10, %xmm9
  503. addps %xmm9, %xmm1
  504. movaps 72 * SIZE(BO), %xmm9
  505. mulps %xmm10, %xmm9
  506. addps %xmm9, %xmm2
  507. movaps 76 * SIZE(BO), %xmm9
  508. mulps %xmm10, %xmm9
  509. movsd 10 * SIZE(AO), %xmm10
  510. addps %xmm9, %xmm3
  511. movaps 128 * SIZE(BO), %xmm9
  512. mulps %xmm10, %xmm11
  513. addps %xmm11, %xmm0
  514. movaps 84 * SIZE(BO), %xmm11
  515. mulps %xmm10, %xmm11
  516. addps %xmm11, %xmm1
  517. movaps 88 * SIZE(BO), %xmm11
  518. mulps %xmm10, %xmm11
  519. addps %xmm11, %xmm2
  520. movaps 92 * SIZE(BO), %xmm11
  521. mulps %xmm10, %xmm11
  522. movsd 12 * SIZE(AO), %xmm10
  523. addps %xmm11, %xmm3
  524. movaps 144 * SIZE(BO), %xmm11
  525. mulps %xmm10, %xmm13
  526. addps %xmm13, %xmm0
  527. movaps 100 * SIZE(BO), %xmm13
  528. mulps %xmm10, %xmm13
  529. addps %xmm13, %xmm1
  530. movaps 104 * SIZE(BO), %xmm13
  531. mulps %xmm10, %xmm13
  532. addps %xmm13, %xmm2
  533. movaps 108 * SIZE(BO), %xmm13
  534. mulps %xmm10, %xmm13
  535. movsd 14 * SIZE(AO), %xmm10
  536. addps %xmm13, %xmm3
  537. movaps 160 * SIZE(BO), %xmm13
  538. mulps %xmm10, %xmm15
  539. addps %xmm15, %xmm0
  540. movaps 116 * SIZE(BO), %xmm15
  541. mulps %xmm10, %xmm15
  542. addps %xmm15, %xmm1
  543. movaps 120 * SIZE(BO), %xmm15
  544. mulps %xmm10, %xmm15
  545. addps %xmm15, %xmm2
  546. movaps 124 * SIZE(BO), %xmm15
  547. mulps %xmm10, %xmm15
  548. movsd 24 * SIZE(AO), %xmm10
  549. addps %xmm15, %xmm3
  550. movaps 176 * SIZE(BO), %xmm15
  551. addq $16 * SIZE, AO
  552. addq $128 * SIZE, BO
  553. decq %rax
  554. jne .L32
  555. ALIGN_4
  556. .L35:
  557. #if defined(LT) || defined(RN)
  558. movq KK, %rax
  559. #else
  560. movq K, %rax
  561. subq KK, %rax
  562. #endif
  563. movaps POSINV, %xmm15
  564. andq $7, %rax # if (k & 1)
  565. BRANCH
  566. je .L38
  567. ALIGN_4
  568. .L36:
  569. mulps %xmm8, %xmm9
  570. addps %xmm9, %xmm0
  571. movaps 4 * SIZE(BO), %xmm9
  572. mulps %xmm8, %xmm9
  573. addps %xmm9, %xmm1
  574. movaps 8 * SIZE(BO), %xmm9
  575. mulps %xmm8, %xmm9
  576. addps %xmm9, %xmm2
  577. movaps 12 * SIZE(BO), %xmm9
  578. mulps %xmm8, %xmm9
  579. movsd 2 * SIZE(AO), %xmm8
  580. addps %xmm9, %xmm3
  581. movaps 16 * SIZE(BO), %xmm9
  582. addq $ 2 * SIZE, AO # aoffset += 4
  583. addq $16 * SIZE, BO # boffset1 += 8
  584. decq %rax
  585. jg .L36
  586. ALIGN_4
  587. .L38:
  588. shufps $0xb1, %xmm1, %xmm1
  589. shufps $0xb1, %xmm3, %xmm3
  590. #if defined(LN) || defined(LT)
  591. #ifndef CONJ
  592. xorps %xmm15, %xmm1
  593. xorps %xmm15, %xmm3
  594. #else
  595. xorps %xmm15, %xmm0
  596. xorps %xmm15, %xmm2
  597. #endif
  598. #else
  599. xorps %xmm15, %xmm1
  600. xorps %xmm15, %xmm3
  601. #endif
  602. addps %xmm1, %xmm0
  603. addps %xmm3, %xmm2
  604. #if defined(LN) || defined(RT)
  605. movq KK, %rax
  606. #ifdef LN
  607. subq $1, %rax
  608. #else
  609. subq $2, %rax
  610. #endif
  611. movq AORIG, AO
  612. movq BORIG, B
  613. leaq BUFFER, BO
  614. salq $ZBASE_SHIFT, %rax
  615. leaq (AO, %rax, 1), AO
  616. leaq (B, %rax, 2), B
  617. leaq (BO, %rax, 8), BO
  618. #endif
  619. #if defined(LN) || defined(LT)
  620. unpcklpd %xmm2, %xmm0
  621. movaps 0 * SIZE(B), %xmm2
  622. subps %xmm0, %xmm2
  623. #else
  624. #ifdef movsd
  625. xorps %xmm1, %xmm1
  626. #endif
  627. movsd 0 * SIZE(AO), %xmm1
  628. #ifdef movsd
  629. xorps %xmm5, %xmm5
  630. #endif
  631. movsd 2 * SIZE(AO), %xmm5
  632. subps %xmm0, %xmm1
  633. subps %xmm2, %xmm5
  634. #endif
  635. #ifdef LN
  636. movaps 0 * SIZE(AO), %xmm8
  637. pshufd $0x44, %xmm8, %xmm9
  638. pshufd $0x11, %xmm8, %xmm10
  639. pshufd $0xa0, %xmm2, %xmm0
  640. pshufd $0xf5, %xmm2, %xmm2
  641. #ifndef CONJ
  642. xorps %xmm15, %xmm2
  643. #else
  644. xorps %xmm15, %xmm0
  645. #endif
  646. mulps %xmm9, %xmm0
  647. mulps %xmm10, %xmm2
  648. addps %xmm0, %xmm2
  649. #endif
  650. #ifdef LT
  651. movaps 0 * SIZE(AO), %xmm8
  652. pshufd $0x44, %xmm8, %xmm9
  653. pshufd $0x11, %xmm8, %xmm10
  654. pshufd $0xa0, %xmm2, %xmm0
  655. pshufd $0xf5, %xmm2, %xmm2
  656. #ifndef CONJ
  657. xorps %xmm15, %xmm2
  658. #else
  659. xorps %xmm15, %xmm0
  660. #endif
  661. mulps %xmm9, %xmm0
  662. mulps %xmm10, %xmm2
  663. addps %xmm0, %xmm2
  664. #endif
  665. #ifdef RN
  666. movaps 0 * SIZE(B), %xmm8
  667. pshufd $0x44, %xmm8, %xmm9
  668. pshufd $0x11, %xmm8, %xmm10
  669. pshufd $0xa0, %xmm1, %xmm0
  670. pshufd $0xf5, %xmm1, %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. addps %xmm0, %xmm1
  679. pshufd $0xee, %xmm8, %xmm9
  680. pshufd $0xbb, %xmm8, %xmm10
  681. pshufd $0xa0, %xmm1, %xmm0
  682. pshufd $0xf5, %xmm1, %xmm2
  683. #ifndef CONJ
  684. xorps %xmm15, %xmm2
  685. #else
  686. xorps %xmm15, %xmm0
  687. #endif
  688. mulps %xmm9, %xmm0
  689. mulps %xmm10, %xmm2
  690. subps %xmm0, %xmm5
  691. subps %xmm2, %xmm5
  692. movaps 4 * SIZE(B), %xmm8
  693. pshufd $0xee, %xmm8, %xmm9
  694. pshufd $0xbb, %xmm8, %xmm10
  695. pshufd $0xa0, %xmm5, %xmm4
  696. pshufd $0xf5, %xmm5, %xmm5
  697. #ifndef CONJ
  698. xorps %xmm15, %xmm5
  699. #else
  700. xorps %xmm15, %xmm4
  701. #endif
  702. mulps %xmm9, %xmm4
  703. mulps %xmm10, %xmm5
  704. addps %xmm4, %xmm5
  705. #endif
  706. #ifdef RT
  707. movaps 4 * SIZE(B), %xmm8
  708. pshufd $0xee, %xmm8, %xmm9
  709. pshufd $0xbb, %xmm8, %xmm10
  710. pshufd $0xa0, %xmm5, %xmm0
  711. pshufd $0xf5, %xmm5, %xmm5
  712. #ifndef CONJ
  713. xorps %xmm15, %xmm5
  714. #else
  715. xorps %xmm15, %xmm0
  716. #endif
  717. mulps %xmm9, %xmm0
  718. mulps %xmm10, %xmm5
  719. addps %xmm0, %xmm5
  720. pshufd $0x44, %xmm8, %xmm9
  721. pshufd $0x11, %xmm8, %xmm10
  722. pshufd $0xa0, %xmm5, %xmm0
  723. pshufd $0xf5, %xmm5, %xmm2
  724. #ifndef CONJ
  725. xorps %xmm15, %xmm2
  726. #else
  727. xorps %xmm15, %xmm0
  728. #endif
  729. mulps %xmm9, %xmm0
  730. mulps %xmm10, %xmm2
  731. subps %xmm0, %xmm1
  732. subps %xmm2, %xmm1
  733. movaps 0 * SIZE(B), %xmm8
  734. pshufd $0x44, %xmm8, %xmm9
  735. pshufd $0x11, %xmm8, %xmm10
  736. pshufd $0xa0, %xmm1, %xmm4
  737. pshufd $0xf5, %xmm1, %xmm1
  738. #ifndef CONJ
  739. xorps %xmm15, %xmm1
  740. #else
  741. xorps %xmm15, %xmm4
  742. #endif
  743. mulps %xmm9, %xmm4
  744. mulps %xmm10, %xmm1
  745. addps %xmm4, %xmm1
  746. #endif
  747. #ifdef LN
  748. subq $2 * SIZE, CO1
  749. subq $2 * SIZE, CO2
  750. #endif
  751. #if defined(LN) || defined(LT)
  752. movaps %xmm2, 0 * SIZE(B)
  753. pshufd $0x00, %xmm2, %xmm0
  754. pshufd $0x55, %xmm2, %xmm1
  755. pshufd $0xaa, %xmm2, %xmm4
  756. pshufd $0xff, %xmm2, %xmm5
  757. movaps %xmm0, 0 * SIZE(BO)
  758. movaps %xmm1, 4 * SIZE(BO)
  759. movaps %xmm4, 8 * SIZE(BO)
  760. movaps %xmm5, 12 * SIZE(BO)
  761. movlps %xmm2, 0 * SIZE(CO1)
  762. movhps %xmm2, 0 * SIZE(CO2)
  763. #else
  764. movlps %xmm1, 0 * SIZE(AO)
  765. movlps %xmm5, 2 * SIZE(AO)
  766. movlps %xmm1, 0 * SIZE(CO1)
  767. movlps %xmm5, 0 * SIZE(CO2)
  768. #endif
  769. #ifndef LN
  770. addq $2 * SIZE, CO1
  771. addq $2 * SIZE, CO2
  772. #endif
  773. #if defined(LT) || defined(RN)
  774. movq K, %rax
  775. subq KK, %rax
  776. salq $ZBASE_SHIFT, %rax
  777. leaq (AO, %rax, 1), AO
  778. #ifdef LT
  779. addq $4 * SIZE, B
  780. #endif
  781. #endif
  782. #ifdef LN
  783. subq $1, KK
  784. movq BORIG, B
  785. #endif
  786. #ifdef LT
  787. addq $1, KK
  788. #endif
  789. #ifdef RT
  790. movq K, %rax
  791. movq BORIG, B
  792. salq $ZBASE_SHIFT, %rax
  793. addq %rax, AORIG
  794. #endif
  795. ALIGN_4
  796. .L20:
  797. testq $2, M
  798. je .L30
  799. #ifdef LN
  800. movq K, %rax
  801. salq $1 + ZBASE_SHIFT, %rax
  802. subq %rax, AORIG
  803. #endif
  804. #if defined(LN) || defined(RT)
  805. movq KK, %rax
  806. movq AORIG, AO
  807. salq $ZBASE_SHIFT, %rax
  808. leaq (AO, %rax, 2), AO
  809. #endif
  810. leaq BUFFER, BO
  811. #if defined(LN) || defined(RT)
  812. movq KK, %rax
  813. salq $1 + ZBASE_SHIFT, %rax
  814. leaq (BO, %rax, 4), BO
  815. #endif
  816. movaps 0 * SIZE(AO), %xmm8
  817. movaps 16 * SIZE(AO), %xmm10
  818. movaps 32 * SIZE(AO), %xmm12
  819. movaps 48 * SIZE(AO), %xmm14
  820. movaps 0 * SIZE(BO), %xmm9
  821. movaps 16 * SIZE(BO), %xmm11
  822. movaps 32 * SIZE(BO), %xmm13
  823. movaps 48 * SIZE(BO), %xmm15
  824. pxor %xmm0, %xmm0
  825. pxor %xmm1, %xmm1
  826. pxor %xmm2, %xmm2
  827. pxor %xmm3, %xmm3
  828. #if defined(LT) || defined(RN)
  829. movq KK, %rax
  830. #else
  831. movq K, %rax
  832. subq KK, %rax
  833. #endif
  834. sarq $3, %rax
  835. je .L25
  836. ALIGN_4
  837. .L22:
  838. mulps %xmm8, %xmm9
  839. addps %xmm9, %xmm0
  840. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  841. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  842. #endif
  843. movaps 4 * SIZE(BO), %xmm9
  844. mulps %xmm8, %xmm9
  845. addps %xmm9, %xmm1
  846. movaps 8 * SIZE(BO), %xmm9
  847. mulps %xmm8, %xmm9
  848. mulps 12 * SIZE(BO), %xmm8
  849. addps %xmm9, %xmm2
  850. movaps 64 * SIZE(BO), %xmm9
  851. addps %xmm8, %xmm3
  852. movaps 4 * SIZE(AO), %xmm8
  853. mulps %xmm8, %xmm11
  854. addps %xmm11, %xmm0
  855. movaps 20 * SIZE(BO), %xmm11
  856. mulps %xmm8, %xmm11
  857. addps %xmm11, %xmm1
  858. movaps 24 * SIZE(BO), %xmm11
  859. mulps %xmm8, %xmm11
  860. mulps 28 * SIZE(BO), %xmm8
  861. addps %xmm11, %xmm2
  862. movaps 80 * SIZE(BO), %xmm11
  863. addps %xmm8, %xmm3
  864. movaps 8 * SIZE(AO), %xmm8
  865. mulps %xmm8, %xmm13
  866. addps %xmm13, %xmm0
  867. movaps 36 * SIZE(BO), %xmm13
  868. mulps %xmm8, %xmm13
  869. addps %xmm13, %xmm1
  870. movaps 40 * SIZE(BO), %xmm13
  871. mulps %xmm8, %xmm13
  872. mulps 44 * SIZE(BO), %xmm8
  873. addps %xmm13, %xmm2
  874. movaps 96 * SIZE(BO), %xmm13
  875. addps %xmm8, %xmm3
  876. movaps 12 * SIZE(AO), %xmm8
  877. mulps %xmm8, %xmm15
  878. addps %xmm15, %xmm0
  879. movaps 52 * SIZE(BO), %xmm15
  880. mulps %xmm8, %xmm15
  881. addps %xmm15, %xmm1
  882. movaps 56 * SIZE(BO), %xmm15
  883. mulps %xmm8, %xmm15
  884. mulps 60 * SIZE(BO), %xmm8
  885. addps %xmm15, %xmm2
  886. movaps 112 * SIZE(BO), %xmm15
  887. addps %xmm8, %xmm3
  888. movaps 32 * SIZE(AO), %xmm8
  889. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  890. PREFETCH (PREFETCHSIZE + 16) * SIZE(AO)
  891. #endif
  892. mulps %xmm10, %xmm9
  893. addps %xmm9, %xmm0
  894. movaps 68 * SIZE(BO), %xmm9
  895. mulps %xmm10, %xmm9
  896. addps %xmm9, %xmm1
  897. movaps 72 * SIZE(BO), %xmm9
  898. mulps %xmm10, %xmm9
  899. mulps 76 * SIZE(BO), %xmm10
  900. addps %xmm9, %xmm2
  901. movaps 128 * SIZE(BO), %xmm9
  902. addps %xmm10, %xmm3
  903. movaps 20 * SIZE(AO), %xmm10
  904. mulps %xmm10, %xmm11
  905. addps %xmm11, %xmm0
  906. movaps 84 * SIZE(BO), %xmm11
  907. mulps %xmm10, %xmm11
  908. addps %xmm11, %xmm1
  909. movaps 88 * SIZE(BO), %xmm11
  910. mulps %xmm10, %xmm11
  911. mulps 92 * SIZE(BO), %xmm10
  912. addps %xmm11, %xmm2
  913. movaps 144 * SIZE(BO), %xmm11
  914. addps %xmm10, %xmm3
  915. movaps 24 * SIZE(AO), %xmm10
  916. mulps %xmm10, %xmm13
  917. addps %xmm13, %xmm0
  918. movaps 100 * SIZE(BO), %xmm13
  919. mulps %xmm10, %xmm13
  920. addps %xmm13, %xmm1
  921. movaps 104 * SIZE(BO), %xmm13
  922. mulps %xmm10, %xmm13
  923. mulps 108 * SIZE(BO), %xmm10
  924. addps %xmm13, %xmm2
  925. movaps 160 * SIZE(BO), %xmm13
  926. addps %xmm10, %xmm3
  927. movaps 28 * SIZE(AO), %xmm10
  928. mulps %xmm10, %xmm15
  929. addps %xmm15, %xmm0
  930. movaps 116 * SIZE(BO), %xmm15
  931. mulps %xmm10, %xmm15
  932. addps %xmm15, %xmm1
  933. movaps 120 * SIZE(BO), %xmm15
  934. mulps %xmm10, %xmm15
  935. mulps 124 * SIZE(BO), %xmm10
  936. addps %xmm15, %xmm2
  937. movaps 176 * SIZE(BO), %xmm15
  938. addps %xmm10, %xmm3
  939. movaps 48 * SIZE(AO), %xmm10
  940. addq $32 * SIZE, AO
  941. addq $128 * SIZE, BO
  942. decq %rax
  943. jne .L22
  944. ALIGN_4
  945. .L25:
  946. #if defined(LT) || defined(RN)
  947. movq KK, %rax
  948. #else
  949. movq K, %rax
  950. subq KK, %rax
  951. #endif
  952. movaps POSINV, %xmm15
  953. andq $7, %rax # if (k & 1)
  954. BRANCH
  955. je .L28
  956. ALIGN_4
  957. .L26:
  958. mulps %xmm8, %xmm9
  959. addps %xmm9, %xmm0
  960. movaps 4 * SIZE(BO), %xmm9
  961. mulps %xmm8, %xmm9
  962. addps %xmm9, %xmm1
  963. movaps 8 * SIZE(BO), %xmm9
  964. mulps %xmm8, %xmm9
  965. mulps 12 * SIZE(BO), %xmm8
  966. addps %xmm9, %xmm2
  967. movaps 16 * SIZE(BO), %xmm9
  968. addps %xmm8, %xmm3
  969. movaps 4 * SIZE(AO), %xmm8
  970. addq $ 4 * SIZE, AO # aoffset += 4
  971. addq $16 * SIZE, BO # boffset1 += 8
  972. decq %rax
  973. jg .L26
  974. ALIGN_4
  975. .L28:
  976. shufps $0xb1, %xmm1, %xmm1
  977. shufps $0xb1, %xmm3, %xmm3
  978. #if defined(LN) || defined(LT)
  979. #ifndef CONJ
  980. xorps %xmm15, %xmm1
  981. xorps %xmm15, %xmm3
  982. #else
  983. xorps %xmm15, %xmm0
  984. xorps %xmm15, %xmm2
  985. #endif
  986. #else
  987. xorps %xmm15, %xmm1
  988. xorps %xmm15, %xmm3
  989. #endif
  990. addps %xmm1, %xmm0
  991. addps %xmm3, %xmm2
  992. #if defined(LN) || defined(RT)
  993. movq KK, %rax
  994. #ifdef LN
  995. subq $2, %rax
  996. #else
  997. subq $2, %rax
  998. #endif
  999. movq AORIG, AO
  1000. movq BORIG, B
  1001. leaq BUFFER, BO
  1002. salq $ZBASE_SHIFT, %rax
  1003. leaq (AO, %rax, 2), AO
  1004. leaq (B, %rax, 2), B
  1005. leaq (BO, %rax, 8), BO
  1006. #endif
  1007. #if defined(LN) || defined(LT)
  1008. movaps %xmm0, %xmm1
  1009. unpcklpd %xmm2, %xmm0
  1010. unpckhpd %xmm2, %xmm1
  1011. movaps 0 * SIZE(B), %xmm2
  1012. movaps 4 * SIZE(B), %xmm3
  1013. subps %xmm0, %xmm2
  1014. subps %xmm1, %xmm3
  1015. #else
  1016. movaps 0 * SIZE(AO), %xmm1
  1017. movaps 4 * SIZE(AO), %xmm5
  1018. subps %xmm0, %xmm1
  1019. subps %xmm2, %xmm5
  1020. #endif
  1021. #ifdef LN
  1022. movaps 4 * SIZE(AO), %xmm8
  1023. pshufd $0xee, %xmm8, %xmm9
  1024. pshufd $0xbb, %xmm8, %xmm10
  1025. pshufd $0xa0, %xmm3, %xmm0
  1026. pshufd $0xf5, %xmm3, %xmm3
  1027. #ifndef CONJ
  1028. xorps %xmm15, %xmm3
  1029. #else
  1030. xorps %xmm15, %xmm0
  1031. #endif
  1032. mulps %xmm9, %xmm0
  1033. mulps %xmm10, %xmm3
  1034. addps %xmm0, %xmm3
  1035. pshufd $0x44, %xmm8, %xmm9
  1036. pshufd $0x11, %xmm8, %xmm10
  1037. pshufd $0xa0, %xmm3, %xmm0
  1038. pshufd $0xf5, %xmm3, %xmm1
  1039. #ifndef CONJ
  1040. xorps %xmm15, %xmm1
  1041. #else
  1042. xorps %xmm15, %xmm0
  1043. #endif
  1044. mulps %xmm9, %xmm0
  1045. mulps %xmm10, %xmm1
  1046. subps %xmm0, %xmm2
  1047. subps %xmm1, %xmm2
  1048. movaps 0 * SIZE(AO), %xmm8
  1049. pshufd $0x44, %xmm8, %xmm9
  1050. pshufd $0x11, %xmm8, %xmm10
  1051. pshufd $0xa0, %xmm2, %xmm0
  1052. pshufd $0xf5, %xmm2, %xmm2
  1053. #ifndef CONJ
  1054. xorps %xmm15, %xmm2
  1055. #else
  1056. xorps %xmm15, %xmm0
  1057. #endif
  1058. mulps %xmm9, %xmm0
  1059. mulps %xmm10, %xmm2
  1060. addps %xmm0, %xmm2
  1061. #endif
  1062. #ifdef LT
  1063. movaps 0 * SIZE(AO), %xmm8
  1064. pshufd $0x44, %xmm8, %xmm9
  1065. pshufd $0x11, %xmm8, %xmm10
  1066. pshufd $0xa0, %xmm2, %xmm0
  1067. pshufd $0xf5, %xmm2, %xmm2
  1068. #ifndef CONJ
  1069. xorps %xmm15, %xmm2
  1070. #else
  1071. xorps %xmm15, %xmm0
  1072. #endif
  1073. mulps %xmm9, %xmm0
  1074. mulps %xmm10, %xmm2
  1075. addps %xmm0, %xmm2
  1076. pshufd $0xee, %xmm8, %xmm9
  1077. pshufd $0xbb, %xmm8, %xmm10
  1078. pshufd $0xa0, %xmm2, %xmm0
  1079. pshufd $0xf5, %xmm2, %xmm1
  1080. #ifndef CONJ
  1081. xorps %xmm15, %xmm1
  1082. #else
  1083. xorps %xmm15, %xmm0
  1084. #endif
  1085. mulps %xmm9, %xmm0
  1086. mulps %xmm10, %xmm1
  1087. subps %xmm0, %xmm3
  1088. subps %xmm1, %xmm3
  1089. movaps 4 * SIZE(AO), %xmm8
  1090. pshufd $0xee, %xmm8, %xmm9
  1091. pshufd $0xbb, %xmm8, %xmm10
  1092. pshufd $0xa0, %xmm3, %xmm0
  1093. pshufd $0xf5, %xmm3, %xmm3
  1094. #ifndef CONJ
  1095. xorps %xmm15, %xmm3
  1096. #else
  1097. xorps %xmm15, %xmm0
  1098. #endif
  1099. mulps %xmm9, %xmm0
  1100. mulps %xmm10, %xmm3
  1101. addps %xmm0, %xmm3
  1102. #endif
  1103. #ifdef RN
  1104. movaps 0 * SIZE(B), %xmm8
  1105. pshufd $0x44, %xmm8, %xmm9
  1106. pshufd $0x11, %xmm8, %xmm10
  1107. pshufd $0xa0, %xmm1, %xmm0
  1108. pshufd $0xf5, %xmm1, %xmm1
  1109. #ifndef CONJ
  1110. xorps %xmm15, %xmm1
  1111. #else
  1112. xorps %xmm15, %xmm0
  1113. #endif
  1114. mulps %xmm9, %xmm0
  1115. mulps %xmm10, %xmm1
  1116. addps %xmm0, %xmm1
  1117. pshufd $0xee, %xmm8, %xmm9
  1118. pshufd $0xbb, %xmm8, %xmm10
  1119. pshufd $0xa0, %xmm1, %xmm0
  1120. pshufd $0xf5, %xmm1, %xmm2
  1121. #ifndef CONJ
  1122. xorps %xmm15, %xmm2
  1123. #else
  1124. xorps %xmm15, %xmm0
  1125. #endif
  1126. mulps %xmm9, %xmm0
  1127. mulps %xmm10, %xmm2
  1128. subps %xmm0, %xmm5
  1129. subps %xmm2, %xmm5
  1130. movaps 4 * SIZE(B), %xmm8
  1131. pshufd $0xee, %xmm8, %xmm9
  1132. pshufd $0xbb, %xmm8, %xmm10
  1133. pshufd $0xa0, %xmm5, %xmm4
  1134. pshufd $0xf5, %xmm5, %xmm5
  1135. #ifndef CONJ
  1136. xorps %xmm15, %xmm5
  1137. #else
  1138. xorps %xmm15, %xmm4
  1139. #endif
  1140. mulps %xmm9, %xmm4
  1141. mulps %xmm10, %xmm5
  1142. addps %xmm4, %xmm5
  1143. #endif
  1144. #ifdef RT
  1145. movaps 4 * SIZE(B), %xmm8
  1146. pshufd $0xee, %xmm8, %xmm9
  1147. pshufd $0xbb, %xmm8, %xmm10
  1148. pshufd $0xa0, %xmm5, %xmm0
  1149. pshufd $0xf5, %xmm5, %xmm5
  1150. #ifndef CONJ
  1151. xorps %xmm15, %xmm5
  1152. #else
  1153. xorps %xmm15, %xmm0
  1154. #endif
  1155. mulps %xmm9, %xmm0
  1156. mulps %xmm10, %xmm5
  1157. addps %xmm0, %xmm5
  1158. pshufd $0x44, %xmm8, %xmm9
  1159. pshufd $0x11, %xmm8, %xmm10
  1160. pshufd $0xa0, %xmm5, %xmm0
  1161. pshufd $0xf5, %xmm5, %xmm2
  1162. #ifndef CONJ
  1163. xorps %xmm15, %xmm2
  1164. #else
  1165. xorps %xmm15, %xmm0
  1166. #endif
  1167. mulps %xmm9, %xmm0
  1168. mulps %xmm10, %xmm2
  1169. subps %xmm0, %xmm1
  1170. subps %xmm2, %xmm1
  1171. movaps 0 * SIZE(B), %xmm8
  1172. pshufd $0x44, %xmm8, %xmm9
  1173. pshufd $0x11, %xmm8, %xmm10
  1174. pshufd $0xa0, %xmm1, %xmm4
  1175. pshufd $0xf5, %xmm1, %xmm1
  1176. #ifndef CONJ
  1177. xorps %xmm15, %xmm1
  1178. #else
  1179. xorps %xmm15, %xmm4
  1180. #endif
  1181. mulps %xmm9, %xmm4
  1182. mulps %xmm10, %xmm1
  1183. addps %xmm4, %xmm1
  1184. #endif
  1185. #ifdef LN
  1186. subq $4 * SIZE, CO1
  1187. subq $4 * SIZE, CO2
  1188. #endif
  1189. #if defined(LN) || defined(LT)
  1190. movaps %xmm2, 0 * SIZE(B)
  1191. movaps %xmm3, 4 * SIZE(B)
  1192. pshufd $0x00, %xmm2, %xmm0
  1193. pshufd $0x55, %xmm2, %xmm1
  1194. pshufd $0xaa, %xmm2, %xmm4
  1195. pshufd $0xff, %xmm2, %xmm5
  1196. movaps %xmm0, 0 * SIZE(BO)
  1197. movaps %xmm1, 4 * SIZE(BO)
  1198. movaps %xmm4, 8 * SIZE(BO)
  1199. movaps %xmm5, 12 * SIZE(BO)
  1200. pshufd $0x00, %xmm3, %xmm0
  1201. pshufd $0x55, %xmm3, %xmm1
  1202. pshufd $0xaa, %xmm3, %xmm4
  1203. pshufd $0xff, %xmm3, %xmm5
  1204. movaps %xmm0, 16 * SIZE(BO)
  1205. movaps %xmm1, 20 * SIZE(BO)
  1206. movaps %xmm4, 24 * SIZE(BO)
  1207. movaps %xmm5, 28 * SIZE(BO)
  1208. movlps %xmm2, 0 * SIZE(CO1)
  1209. movlps %xmm3, 2 * SIZE(CO1)
  1210. movhps %xmm2, 0 * SIZE(CO2)
  1211. movhps %xmm3, 2 * SIZE(CO2)
  1212. #else
  1213. movaps %xmm1, 0 * SIZE(AO)
  1214. movaps %xmm5, 4 * SIZE(AO)
  1215. movlps %xmm1, 0 * SIZE(CO1)
  1216. movhps %xmm1, 2 * SIZE(CO1)
  1217. movlps %xmm5, 0 * SIZE(CO2)
  1218. movhps %xmm5, 2 * SIZE(CO2)
  1219. #endif
  1220. #ifndef LN
  1221. addq $4 * SIZE, CO1
  1222. addq $4 * SIZE, CO2
  1223. #endif
  1224. #if defined(LT) || defined(RN)
  1225. movq K, %rax
  1226. subq KK, %rax
  1227. salq $ZBASE_SHIFT, %rax
  1228. leaq (AO, %rax, 2), AO
  1229. #ifdef LT
  1230. addq $8 * SIZE, B
  1231. #endif
  1232. #endif
  1233. #ifdef LN
  1234. subq $2, KK
  1235. movq BORIG, B
  1236. #endif
  1237. #ifdef LT
  1238. addq $2, KK
  1239. #endif
  1240. #ifdef RT
  1241. movq K, %rax
  1242. movq BORIG, B
  1243. salq $1 + ZBASE_SHIFT, %rax
  1244. addq %rax, AORIG
  1245. #endif
  1246. ALIGN_4
  1247. .L30:
  1248. movq M, I
  1249. sarq $2, I # i = (m >> 2)
  1250. jle .L39
  1251. ALIGN_4
  1252. .L11:
  1253. #ifdef LN
  1254. movq K, %rax
  1255. salq $2 + ZBASE_SHIFT, %rax
  1256. subq %rax, AORIG
  1257. #endif
  1258. #if defined(LN) || defined(RT)
  1259. movq KK, %rax
  1260. movq AORIG, AO
  1261. salq $ZBASE_SHIFT, %rax
  1262. leaq (AO, %rax, 4), AO
  1263. #endif
  1264. leaq BUFFER, BO
  1265. #if defined(LN) || defined(RT)
  1266. movq KK, %rax
  1267. salq $1 + ZBASE_SHIFT, %rax
  1268. leaq (BO, %rax, 4), BO
  1269. #endif
  1270. movaps 0 * SIZE(BO), %xmm9
  1271. movaps 4 * SIZE(BO), %xmm11
  1272. movaps 8 * SIZE(BO), %xmm13
  1273. movaps 16 * SIZE(BO), %xmm15
  1274. movaps 0 * SIZE(AO), %xmm8
  1275. pxor %xmm0, %xmm0
  1276. movaps 4 * SIZE(AO), %xmm10
  1277. pxor %xmm1, %xmm1
  1278. movaps 8 * SIZE(AO), %xmm12
  1279. pxor %xmm2, %xmm2
  1280. movaps 12 * SIZE(AO), %xmm14
  1281. pxor %xmm3, %xmm3
  1282. PREFETCHW -8 * SIZE(CO1)
  1283. pxor %xmm4, %xmm4
  1284. PREFETCHW -8 * SIZE(CO2)
  1285. pxor %xmm5, %xmm5
  1286. pxor %xmm6, %xmm6
  1287. pxor %xmm7, %xmm7
  1288. #if defined(LT) || defined(RN)
  1289. movq KK, %rax
  1290. #else
  1291. movq K, %rax
  1292. subq KK, %rax
  1293. #endif
  1294. andq $-8, %rax
  1295. salq $4, %rax
  1296. je .L15
  1297. .L1X:
  1298. KERNEL1(32 * 0)
  1299. KERNEL2(32 * 0)
  1300. KERNEL3(32 * 0)
  1301. KERNEL4(32 * 0)
  1302. KERNEL5(32 * 0)
  1303. KERNEL6(32 * 0)
  1304. KERNEL7(32 * 0)
  1305. KERNEL8(32 * 0)
  1306. KERNEL1(32 * 1)
  1307. KERNEL2(32 * 1)
  1308. KERNEL3(32 * 1)
  1309. KERNEL4(32 * 1)
  1310. KERNEL5(32 * 1)
  1311. KERNEL6(32 * 1)
  1312. KERNEL7(32 * 1)
  1313. KERNEL8(32 * 1)
  1314. addq $32 * 2 * SIZE, AO
  1315. addq $64 * 2 * SIZE, BO
  1316. subq $64 * 2, %rax
  1317. jg .L1X
  1318. .L12:
  1319. leaq (AO, %rax, 2), AO
  1320. leaq (BO, %rax, 4), BO
  1321. ALIGN_4
  1322. .L15:
  1323. #if defined(LT) || defined(RN)
  1324. movq KK, %rax
  1325. #else
  1326. movq K, %rax
  1327. subq KK, %rax
  1328. #endif
  1329. movaps POSINV, %xmm15
  1330. andq $7, %rax # if (k & 1)
  1331. BRANCH
  1332. je .L18
  1333. ALIGN_4
  1334. .L16:
  1335. mulps %xmm8, %xmm9
  1336. addps %xmm9, %xmm0
  1337. movaps 4 * SIZE(BO), %xmm9
  1338. mulps %xmm8, %xmm9
  1339. addps %xmm9, %xmm1
  1340. movaps 8 * SIZE(BO), %xmm9
  1341. mulps %xmm8, %xmm9
  1342. mulps 12 * SIZE(BO), %xmm8
  1343. addps %xmm9, %xmm2
  1344. movaps 0 * SIZE(BO), %xmm9
  1345. addps %xmm8, %xmm3
  1346. movaps 8 * SIZE(AO), %xmm8
  1347. mulps %xmm10, %xmm9
  1348. addps %xmm9, %xmm4
  1349. movaps 4 * SIZE(BO), %xmm9
  1350. mulps %xmm10, %xmm9
  1351. addps %xmm9, %xmm5
  1352. movaps 8 * SIZE(BO), %xmm9
  1353. mulps %xmm10, %xmm9
  1354. mulps 12 * SIZE(BO), %xmm10
  1355. addps %xmm9, %xmm6
  1356. movaps 16 * SIZE(BO), %xmm9
  1357. addps %xmm10, %xmm7
  1358. movaps 12 * SIZE(AO), %xmm10
  1359. addq $ 8 * SIZE, AO # aoffset += 4
  1360. addq $16 * SIZE, BO # boffset1 += 8
  1361. decq %rax
  1362. jg .L16
  1363. ALIGN_4
  1364. .L18:
  1365. shufps $0xb1, %xmm1, %xmm1
  1366. shufps $0xb1, %xmm3, %xmm3
  1367. shufps $0xb1, %xmm5, %xmm5
  1368. shufps $0xb1, %xmm7, %xmm7
  1369. #if defined(LN) || defined(LT)
  1370. #ifndef CONJ
  1371. xorps %xmm15, %xmm1
  1372. xorps %xmm15, %xmm3
  1373. xorps %xmm15, %xmm5
  1374. xorps %xmm15, %xmm7
  1375. #else
  1376. xorps %xmm15, %xmm0
  1377. xorps %xmm15, %xmm2
  1378. xorps %xmm15, %xmm4
  1379. xorps %xmm15, %xmm6
  1380. #endif
  1381. #else
  1382. xorps %xmm15, %xmm1
  1383. xorps %xmm15, %xmm3
  1384. xorps %xmm15, %xmm5
  1385. xorps %xmm15, %xmm7
  1386. #endif
  1387. addps %xmm1, %xmm0
  1388. addps %xmm3, %xmm2
  1389. addps %xmm5, %xmm4
  1390. addps %xmm7, %xmm6
  1391. #if defined(LN) || defined(RT)
  1392. movq KK, %rax
  1393. #ifdef LN
  1394. subq $4, %rax
  1395. #else
  1396. subq $2, %rax
  1397. #endif
  1398. movq AORIG, AO
  1399. movq BORIG, B
  1400. leaq BUFFER, BO
  1401. salq $ZBASE_SHIFT, %rax
  1402. leaq (AO, %rax, 4), AO
  1403. leaq (B, %rax, 2), B
  1404. leaq (BO, %rax, 8), BO
  1405. #endif
  1406. #if defined(LN) || defined(LT)
  1407. movaps %xmm0, %xmm1
  1408. unpcklpd %xmm2, %xmm0
  1409. unpckhpd %xmm2, %xmm1
  1410. movaps %xmm4, %xmm5
  1411. unpcklpd %xmm6, %xmm4
  1412. unpckhpd %xmm6, %xmm5
  1413. movaps 0 * SIZE(B), %xmm2
  1414. movaps 4 * SIZE(B), %xmm3
  1415. movaps 8 * SIZE(B), %xmm6
  1416. movaps 12 * SIZE(B), %xmm7
  1417. subps %xmm0, %xmm2
  1418. subps %xmm1, %xmm3
  1419. subps %xmm4, %xmm6
  1420. subps %xmm5, %xmm7
  1421. #else
  1422. movaps 0 * SIZE(AO), %xmm1
  1423. movaps 4 * SIZE(AO), %xmm3
  1424. movaps 8 * SIZE(AO), %xmm5
  1425. movaps 12 * SIZE(AO), %xmm7
  1426. subps %xmm0, %xmm1
  1427. subps %xmm4, %xmm3
  1428. subps %xmm2, %xmm5
  1429. subps %xmm6, %xmm7
  1430. #endif
  1431. #ifdef LN
  1432. movaps 28 * SIZE(AO), %xmm8
  1433. pshufd $0xee, %xmm8, %xmm9
  1434. pshufd $0xbb, %xmm8, %xmm10
  1435. pshufd $0xa0, %xmm7, %xmm0
  1436. pshufd $0xf5, %xmm7, %xmm7
  1437. #ifndef CONJ
  1438. xorps %xmm15, %xmm7
  1439. #else
  1440. xorps %xmm15, %xmm0
  1441. #endif
  1442. mulps %xmm9, %xmm0
  1443. mulps %xmm10, %xmm7
  1444. addps %xmm0, %xmm7
  1445. pshufd $0x44, %xmm8, %xmm9
  1446. pshufd $0x11, %xmm8, %xmm10
  1447. pshufd $0xa0, %xmm7, %xmm0
  1448. pshufd $0xf5, %xmm7, %xmm1
  1449. #ifndef CONJ
  1450. xorps %xmm15, %xmm1
  1451. #else
  1452. xorps %xmm15, %xmm0
  1453. #endif
  1454. mulps %xmm9, %xmm0
  1455. mulps %xmm10, %xmm1
  1456. subps %xmm0, %xmm6
  1457. subps %xmm1, %xmm6
  1458. movaps 24 * SIZE(AO), %xmm8
  1459. pshufd $0xee, %xmm8, %xmm9
  1460. pshufd $0xbb, %xmm8, %xmm10
  1461. pshufd $0xa0, %xmm7, %xmm0
  1462. pshufd $0xf5, %xmm7, %xmm1
  1463. #ifndef CONJ
  1464. xorps %xmm15, %xmm1
  1465. #else
  1466. xorps %xmm15, %xmm0
  1467. #endif
  1468. mulps %xmm9, %xmm0
  1469. mulps %xmm10, %xmm1
  1470. subps %xmm0, %xmm3
  1471. subps %xmm1, %xmm3
  1472. pshufd $0x44, %xmm8, %xmm9
  1473. pshufd $0x11, %xmm8, %xmm10
  1474. pshufd $0xa0, %xmm7, %xmm0
  1475. pshufd $0xf5, %xmm7, %xmm1
  1476. #ifndef CONJ
  1477. xorps %xmm15, %xmm1
  1478. #else
  1479. xorps %xmm15, %xmm0
  1480. #endif
  1481. mulps %xmm9, %xmm0
  1482. mulps %xmm10, %xmm1
  1483. subps %xmm0, %xmm2
  1484. subps %xmm1, %xmm2
  1485. movaps 20 * SIZE(AO), %xmm8
  1486. pshufd $0x44, %xmm8, %xmm9
  1487. pshufd $0x11, %xmm8, %xmm10
  1488. pshufd $0xa0, %xmm6, %xmm0
  1489. pshufd $0xf5, %xmm6, %xmm6
  1490. #ifndef CONJ
  1491. xorps %xmm15, %xmm6
  1492. #else
  1493. xorps %xmm15, %xmm0
  1494. #endif
  1495. mulps %xmm9, %xmm0
  1496. mulps %xmm10, %xmm6
  1497. addps %xmm0, %xmm6
  1498. movaps 16 * SIZE(AO), %xmm8
  1499. pshufd $0xee, %xmm8, %xmm9
  1500. pshufd $0xbb, %xmm8, %xmm10
  1501. pshufd $0xa0, %xmm6, %xmm0
  1502. pshufd $0xf5, %xmm6, %xmm1
  1503. #ifndef CONJ
  1504. xorps %xmm15, %xmm1
  1505. #else
  1506. xorps %xmm15, %xmm0
  1507. #endif
  1508. mulps %xmm9, %xmm0
  1509. mulps %xmm10, %xmm1
  1510. subps %xmm0, %xmm3
  1511. subps %xmm1, %xmm3
  1512. pshufd $0x44, %xmm8, %xmm9
  1513. pshufd $0x11, %xmm8, %xmm10
  1514. pshufd $0xa0, %xmm6, %xmm0
  1515. pshufd $0xf5, %xmm6, %xmm1
  1516. #ifndef CONJ
  1517. xorps %xmm15, %xmm1
  1518. #else
  1519. xorps %xmm15, %xmm0
  1520. #endif
  1521. mulps %xmm9, %xmm0
  1522. mulps %xmm10, %xmm1
  1523. subps %xmm0, %xmm2
  1524. subps %xmm1, %xmm2
  1525. movaps 8 * SIZE(AO), %xmm8
  1526. pshufd $0xee, %xmm8, %xmm9
  1527. pshufd $0xbb, %xmm8, %xmm10
  1528. pshufd $0xa0, %xmm3, %xmm0
  1529. pshufd $0xf5, %xmm3, %xmm3
  1530. #ifndef CONJ
  1531. xorps %xmm15, %xmm3
  1532. #else
  1533. xorps %xmm15, %xmm0
  1534. #endif
  1535. mulps %xmm9, %xmm0
  1536. mulps %xmm10, %xmm3
  1537. addps %xmm0, %xmm3
  1538. pshufd $0x44, %xmm8, %xmm9
  1539. pshufd $0x11, %xmm8, %xmm10
  1540. pshufd $0xa0, %xmm3, %xmm0
  1541. pshufd $0xf5, %xmm3, %xmm1
  1542. #ifndef CONJ
  1543. xorps %xmm15, %xmm1
  1544. #else
  1545. xorps %xmm15, %xmm0
  1546. #endif
  1547. mulps %xmm9, %xmm0
  1548. mulps %xmm10, %xmm1
  1549. subps %xmm0, %xmm2
  1550. subps %xmm1, %xmm2
  1551. movaps 0 * SIZE(AO), %xmm8
  1552. pshufd $0x44, %xmm8, %xmm9
  1553. pshufd $0x11, %xmm8, %xmm10
  1554. pshufd $0xa0, %xmm2, %xmm0
  1555. pshufd $0xf5, %xmm2, %xmm2
  1556. #ifndef CONJ
  1557. xorps %xmm15, %xmm2
  1558. #else
  1559. xorps %xmm15, %xmm0
  1560. #endif
  1561. mulps %xmm9, %xmm0
  1562. mulps %xmm10, %xmm2
  1563. addps %xmm0, %xmm2
  1564. #endif
  1565. #ifdef LT
  1566. movaps 0 * SIZE(AO), %xmm8
  1567. pshufd $0x44, %xmm8, %xmm9
  1568. pshufd $0x11, %xmm8, %xmm10
  1569. pshufd $0xa0, %xmm2, %xmm0
  1570. pshufd $0xf5, %xmm2, %xmm2
  1571. #ifndef CONJ
  1572. xorps %xmm15, %xmm2
  1573. #else
  1574. xorps %xmm15, %xmm0
  1575. #endif
  1576. mulps %xmm9, %xmm0
  1577. mulps %xmm10, %xmm2
  1578. addps %xmm0, %xmm2
  1579. pshufd $0xee, %xmm8, %xmm9
  1580. pshufd $0xbb, %xmm8, %xmm10
  1581. pshufd $0xa0, %xmm2, %xmm0
  1582. pshufd $0xf5, %xmm2, %xmm1
  1583. #ifndef CONJ
  1584. xorps %xmm15, %xmm1
  1585. #else
  1586. xorps %xmm15, %xmm0
  1587. #endif
  1588. mulps %xmm9, %xmm0
  1589. mulps %xmm10, %xmm1
  1590. subps %xmm0, %xmm3
  1591. subps %xmm1, %xmm3
  1592. movaps 4 * SIZE(AO), %xmm8
  1593. pshufd $0x44, %xmm8, %xmm9
  1594. pshufd $0x11, %xmm8, %xmm10
  1595. pshufd $0xa0, %xmm2, %xmm0
  1596. pshufd $0xf5, %xmm2, %xmm1
  1597. #ifndef CONJ
  1598. xorps %xmm15, %xmm1
  1599. #else
  1600. xorps %xmm15, %xmm0
  1601. #endif
  1602. mulps %xmm9, %xmm0
  1603. mulps %xmm10, %xmm1
  1604. subps %xmm0, %xmm6
  1605. subps %xmm1, %xmm6
  1606. pshufd $0xee, %xmm8, %xmm9
  1607. pshufd $0xbb, %xmm8, %xmm10
  1608. pshufd $0xa0, %xmm2, %xmm0
  1609. pshufd $0xf5, %xmm2, %xmm1
  1610. #ifndef CONJ
  1611. xorps %xmm15, %xmm1
  1612. #else
  1613. xorps %xmm15, %xmm0
  1614. #endif
  1615. mulps %xmm9, %xmm0
  1616. mulps %xmm10, %xmm1
  1617. subps %xmm0, %xmm7
  1618. subps %xmm1, %xmm7
  1619. movaps 8 * SIZE(AO), %xmm8
  1620. pshufd $0xee, %xmm8, %xmm9
  1621. pshufd $0xbb, %xmm8, %xmm10
  1622. pshufd $0xa0, %xmm3, %xmm0
  1623. pshufd $0xf5, %xmm3, %xmm3
  1624. #ifndef CONJ
  1625. xorps %xmm15, %xmm3
  1626. #else
  1627. xorps %xmm15, %xmm0
  1628. #endif
  1629. mulps %xmm9, %xmm0
  1630. mulps %xmm10, %xmm3
  1631. addps %xmm0, %xmm3
  1632. movaps 12 * SIZE(AO), %xmm8
  1633. pshufd $0x44, %xmm8, %xmm9
  1634. pshufd $0x11, %xmm8, %xmm10
  1635. pshufd $0xa0, %xmm3, %xmm0
  1636. pshufd $0xf5, %xmm3, %xmm1
  1637. #ifndef CONJ
  1638. xorps %xmm15, %xmm1
  1639. #else
  1640. xorps %xmm15, %xmm0
  1641. #endif
  1642. mulps %xmm9, %xmm0
  1643. mulps %xmm10, %xmm1
  1644. subps %xmm0, %xmm6
  1645. subps %xmm1, %xmm6
  1646. pshufd $0xee, %xmm8, %xmm9
  1647. pshufd $0xbb, %xmm8, %xmm10
  1648. pshufd $0xa0, %xmm3, %xmm0
  1649. pshufd $0xf5, %xmm3, %xmm1
  1650. #ifndef CONJ
  1651. xorps %xmm15, %xmm1
  1652. #else
  1653. xorps %xmm15, %xmm0
  1654. #endif
  1655. mulps %xmm9, %xmm0
  1656. mulps %xmm10, %xmm1
  1657. subps %xmm0, %xmm7
  1658. subps %xmm1, %xmm7
  1659. movaps 20 * SIZE(AO), %xmm8
  1660. pshufd $0x44, %xmm8, %xmm9
  1661. pshufd $0x11, %xmm8, %xmm10
  1662. pshufd $0xa0, %xmm6, %xmm0
  1663. pshufd $0xf5, %xmm6, %xmm6
  1664. #ifndef CONJ
  1665. xorps %xmm15, %xmm6
  1666. #else
  1667. xorps %xmm15, %xmm0
  1668. #endif
  1669. mulps %xmm9, %xmm0
  1670. mulps %xmm10, %xmm6
  1671. addps %xmm0, %xmm6
  1672. pshufd $0xee, %xmm8, %xmm9
  1673. pshufd $0xbb, %xmm8, %xmm10
  1674. pshufd $0xa0, %xmm6, %xmm0
  1675. pshufd $0xf5, %xmm6, %xmm1
  1676. #ifndef CONJ
  1677. xorps %xmm15, %xmm1
  1678. #else
  1679. xorps %xmm15, %xmm0
  1680. #endif
  1681. mulps %xmm9, %xmm0
  1682. mulps %xmm10, %xmm1
  1683. subps %xmm0, %xmm7
  1684. subps %xmm1, %xmm7
  1685. movaps 28 * SIZE(AO), %xmm8
  1686. pshufd $0xee, %xmm8, %xmm9
  1687. pshufd $0xbb, %xmm8, %xmm10
  1688. pshufd $0xa0, %xmm7, %xmm0
  1689. pshufd $0xf5, %xmm7, %xmm7
  1690. #ifndef CONJ
  1691. xorps %xmm15, %xmm7
  1692. #else
  1693. xorps %xmm15, %xmm0
  1694. #endif
  1695. mulps %xmm9, %xmm0
  1696. mulps %xmm10, %xmm7
  1697. addps %xmm0, %xmm7
  1698. #endif
  1699. #ifdef RN
  1700. movaps 0 * SIZE(B), %xmm8
  1701. pshufd $0x44, %xmm8, %xmm9
  1702. pshufd $0x11, %xmm8, %xmm10
  1703. pshufd $0xa0, %xmm1, %xmm0
  1704. pshufd $0xf5, %xmm1, %xmm1
  1705. pshufd $0xa0, %xmm3, %xmm2
  1706. pshufd $0xf5, %xmm3, %xmm3
  1707. #ifndef CONJ
  1708. xorps %xmm15, %xmm1
  1709. xorps %xmm15, %xmm3
  1710. #else
  1711. xorps %xmm15, %xmm0
  1712. xorps %xmm15, %xmm2
  1713. #endif
  1714. mulps %xmm9, %xmm0
  1715. mulps %xmm9, %xmm2
  1716. mulps %xmm10, %xmm1
  1717. mulps %xmm10, %xmm3
  1718. addps %xmm0, %xmm1
  1719. addps %xmm2, %xmm3
  1720. pshufd $0xee, %xmm8, %xmm9
  1721. pshufd $0xbb, %xmm8, %xmm10
  1722. pshufd $0xa0, %xmm1, %xmm0
  1723. pshufd $0xf5, %xmm1, %xmm2
  1724. pshufd $0xa0, %xmm3, %xmm4
  1725. pshufd $0xf5, %xmm3, %xmm6
  1726. #ifndef CONJ
  1727. xorps %xmm15, %xmm2
  1728. xorps %xmm15, %xmm6
  1729. #else
  1730. xorps %xmm15, %xmm0
  1731. xorps %xmm15, %xmm4
  1732. #endif
  1733. mulps %xmm9, %xmm0
  1734. mulps %xmm9, %xmm4
  1735. mulps %xmm10, %xmm2
  1736. mulps %xmm10, %xmm6
  1737. subps %xmm0, %xmm5
  1738. subps %xmm4, %xmm7
  1739. subps %xmm2, %xmm5
  1740. subps %xmm6, %xmm7
  1741. movaps 4 * SIZE(B), %xmm8
  1742. pshufd $0xee, %xmm8, %xmm9
  1743. pshufd $0xbb, %xmm8, %xmm10
  1744. pshufd $0xa0, %xmm5, %xmm4
  1745. pshufd $0xf5, %xmm5, %xmm5
  1746. pshufd $0xa0, %xmm7, %xmm6
  1747. pshufd $0xf5, %xmm7, %xmm7
  1748. #ifndef CONJ
  1749. xorps %xmm15, %xmm5
  1750. xorps %xmm15, %xmm7
  1751. #else
  1752. xorps %xmm15, %xmm4
  1753. xorps %xmm15, %xmm6
  1754. #endif
  1755. mulps %xmm9, %xmm4
  1756. mulps %xmm9, %xmm6
  1757. mulps %xmm10, %xmm5
  1758. mulps %xmm10, %xmm7
  1759. addps %xmm4, %xmm5
  1760. addps %xmm6, %xmm7
  1761. #endif
  1762. #ifdef RT
  1763. movaps 4 * SIZE(B), %xmm8
  1764. pshufd $0xee, %xmm8, %xmm9
  1765. pshufd $0xbb, %xmm8, %xmm10
  1766. pshufd $0xa0, %xmm5, %xmm0
  1767. pshufd $0xf5, %xmm5, %xmm5
  1768. pshufd $0xa0, %xmm7, %xmm2
  1769. pshufd $0xf5, %xmm7, %xmm7
  1770. #ifndef CONJ
  1771. xorps %xmm15, %xmm5
  1772. xorps %xmm15, %xmm7
  1773. #else
  1774. xorps %xmm15, %xmm0
  1775. xorps %xmm15, %xmm2
  1776. #endif
  1777. mulps %xmm9, %xmm0
  1778. mulps %xmm9, %xmm2
  1779. mulps %xmm10, %xmm5
  1780. mulps %xmm10, %xmm7
  1781. addps %xmm0, %xmm5
  1782. addps %xmm2, %xmm7
  1783. pshufd $0x44, %xmm8, %xmm9
  1784. pshufd $0x11, %xmm8, %xmm10
  1785. pshufd $0xa0, %xmm5, %xmm0
  1786. pshufd $0xf5, %xmm5, %xmm2
  1787. pshufd $0xa0, %xmm7, %xmm4
  1788. pshufd $0xf5, %xmm7, %xmm6
  1789. #ifndef CONJ
  1790. xorps %xmm15, %xmm2
  1791. xorps %xmm15, %xmm6
  1792. #else
  1793. xorps %xmm15, %xmm0
  1794. xorps %xmm15, %xmm4
  1795. #endif
  1796. mulps %xmm9, %xmm0
  1797. mulps %xmm9, %xmm4
  1798. mulps %xmm10, %xmm2
  1799. mulps %xmm10, %xmm6
  1800. subps %xmm0, %xmm1
  1801. subps %xmm4, %xmm3
  1802. subps %xmm2, %xmm1
  1803. subps %xmm6, %xmm3
  1804. movaps 0 * SIZE(B), %xmm8
  1805. pshufd $0x44, %xmm8, %xmm9
  1806. pshufd $0x11, %xmm8, %xmm10
  1807. pshufd $0xa0, %xmm1, %xmm4
  1808. pshufd $0xf5, %xmm1, %xmm1
  1809. pshufd $0xa0, %xmm3, %xmm6
  1810. pshufd $0xf5, %xmm3, %xmm3
  1811. #ifndef CONJ
  1812. xorps %xmm15, %xmm1
  1813. xorps %xmm15, %xmm3
  1814. #else
  1815. xorps %xmm15, %xmm4
  1816. xorps %xmm15, %xmm6
  1817. #endif
  1818. mulps %xmm9, %xmm4
  1819. mulps %xmm9, %xmm6
  1820. mulps %xmm10, %xmm1
  1821. mulps %xmm10, %xmm3
  1822. addps %xmm4, %xmm1
  1823. addps %xmm6, %xmm3
  1824. #endif
  1825. #ifdef LN
  1826. subq $8 * SIZE, CO1
  1827. subq $8 * SIZE, CO2
  1828. #endif
  1829. #if defined(LN) || defined(LT)
  1830. movaps %xmm2, 0 * SIZE(B)
  1831. movaps %xmm3, 4 * SIZE(B)
  1832. movaps %xmm6, 8 * SIZE(B)
  1833. movaps %xmm7, 12 * SIZE(B)
  1834. pshufd $0x00, %xmm2, %xmm0
  1835. pshufd $0x55, %xmm2, %xmm1
  1836. pshufd $0xaa, %xmm2, %xmm4
  1837. pshufd $0xff, %xmm2, %xmm5
  1838. movaps %xmm0, 0 * SIZE(BO)
  1839. movaps %xmm1, 4 * SIZE(BO)
  1840. movaps %xmm4, 8 * SIZE(BO)
  1841. movaps %xmm5, 12 * SIZE(BO)
  1842. pshufd $0x00, %xmm3, %xmm0
  1843. pshufd $0x55, %xmm3, %xmm1
  1844. pshufd $0xaa, %xmm3, %xmm4
  1845. pshufd $0xff, %xmm3, %xmm5
  1846. movaps %xmm0, 16 * SIZE(BO)
  1847. movaps %xmm1, 20 * SIZE(BO)
  1848. movaps %xmm4, 24 * SIZE(BO)
  1849. movaps %xmm5, 28 * SIZE(BO)
  1850. pshufd $0x00, %xmm6, %xmm0
  1851. pshufd $0x55, %xmm6, %xmm1
  1852. pshufd $0xaa, %xmm6, %xmm4
  1853. pshufd $0xff, %xmm6, %xmm5
  1854. movaps %xmm0, 32 * SIZE(BO)
  1855. movaps %xmm1, 36 * SIZE(BO)
  1856. movaps %xmm4, 40 * SIZE(BO)
  1857. movaps %xmm5, 44 * SIZE(BO)
  1858. pshufd $0x00, %xmm7, %xmm0
  1859. pshufd $0x55, %xmm7, %xmm1
  1860. pshufd $0xaa, %xmm7, %xmm4
  1861. pshufd $0xff, %xmm7, %xmm5
  1862. movaps %xmm0, 48 * SIZE(BO)
  1863. movaps %xmm1, 52 * SIZE(BO)
  1864. movaps %xmm4, 56 * SIZE(BO)
  1865. movaps %xmm5, 60 * SIZE(BO)
  1866. movlps %xmm2, 0 * SIZE(CO1)
  1867. movlps %xmm3, 2 * SIZE(CO1)
  1868. movlps %xmm6, 4 * SIZE(CO1)
  1869. movlps %xmm7, 6 * SIZE(CO1)
  1870. movhps %xmm2, 0 * SIZE(CO2)
  1871. movhps %xmm3, 2 * SIZE(CO2)
  1872. movhps %xmm6, 4 * SIZE(CO2)
  1873. movhps %xmm7, 6 * SIZE(CO2)
  1874. #else
  1875. movaps %xmm1, 0 * SIZE(AO)
  1876. movaps %xmm3, 4 * SIZE(AO)
  1877. movaps %xmm5, 8 * SIZE(AO)
  1878. movaps %xmm7, 12 * SIZE(AO)
  1879. movlps %xmm1, 0 * SIZE(CO1)
  1880. movhps %xmm1, 2 * SIZE(CO1)
  1881. movlps %xmm3, 4 * SIZE(CO1)
  1882. movhps %xmm3, 6 * SIZE(CO1)
  1883. movlps %xmm5, 0 * SIZE(CO2)
  1884. movhps %xmm5, 2 * SIZE(CO2)
  1885. movlps %xmm7, 4 * SIZE(CO2)
  1886. movhps %xmm7, 6 * SIZE(CO2)
  1887. #endif
  1888. #ifndef LN
  1889. addq $8 * SIZE, CO1
  1890. addq $8 * SIZE, CO2
  1891. #endif
  1892. #if defined(LT) || defined(RN)
  1893. movq K, %rax
  1894. subq KK, %rax
  1895. salq $ZBASE_SHIFT, %rax
  1896. leaq (AO, %rax, 4), AO
  1897. #ifdef LT
  1898. addq $16 * SIZE, B
  1899. #endif
  1900. #endif
  1901. #ifdef LN
  1902. subq $4, KK
  1903. movq BORIG, B
  1904. #endif
  1905. #ifdef LT
  1906. addq $4, KK
  1907. #endif
  1908. #ifdef RT
  1909. movq K, %rax
  1910. movq BORIG, B
  1911. salq $2 + ZBASE_SHIFT, %rax
  1912. addq %rax, AORIG
  1913. #endif
  1914. decq I # i --
  1915. jg .L11
  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. testq $1, M
  2032. je .L60
  2033. #ifdef LN
  2034. movq K, %rax
  2035. salq $ZBASE_SHIFT, %rax
  2036. subq %rax, AORIG
  2037. #endif
  2038. #if defined(LN) || defined(RT)
  2039. movq KK, %rax
  2040. movq AORIG, AO
  2041. salq $ZBASE_SHIFT, %rax
  2042. leaq (AO, %rax, 1), AO
  2043. #endif
  2044. leaq BUFFER, BO
  2045. #if defined(LN) || defined(RT)
  2046. movq KK, %rax
  2047. salq $ZBASE_SHIFT, %rax
  2048. leaq (BO, %rax, 4), BO
  2049. #endif
  2050. movsd 0 * SIZE(AO), %xmm8
  2051. movhps 2 * SIZE(AO), %xmm8
  2052. movsd 8 * SIZE(AO), %xmm10
  2053. movhps 10 * SIZE(AO), %xmm10
  2054. movaps 0 * SIZE(BO), %xmm9
  2055. movaps 16 * SIZE(BO), %xmm11
  2056. movaps 32 * SIZE(BO), %xmm13
  2057. movaps 48 * SIZE(BO), %xmm15
  2058. pxor %xmm0, %xmm0
  2059. pxor %xmm1, %xmm1
  2060. pxor %xmm2, %xmm2
  2061. pxor %xmm3, %xmm3
  2062. #if defined(LT) || defined(RN)
  2063. movq KK, %rax
  2064. #else
  2065. movq K, %rax
  2066. subq KK, %rax
  2067. #endif
  2068. sarq $3, %rax
  2069. je .L75
  2070. ALIGN_4
  2071. .L72:
  2072. mulps %xmm8, %xmm9
  2073. addps %xmm9, %xmm0
  2074. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  2075. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  2076. #endif
  2077. movaps 4 * SIZE(BO), %xmm9
  2078. mulps %xmm8, %xmm9
  2079. movsd 2 * SIZE(AO), %xmm8
  2080. addps %xmm9, %xmm1
  2081. movaps 8 * SIZE(BO), %xmm9
  2082. mulps %xmm8, %xmm9
  2083. addps %xmm9, %xmm2
  2084. movaps 12 * SIZE(BO), %xmm9
  2085. mulps %xmm8, %xmm9
  2086. movsd 4 * SIZE(AO), %xmm8
  2087. addps %xmm9, %xmm3
  2088. movaps 64 * SIZE(BO), %xmm9
  2089. mulps %xmm8, %xmm11
  2090. addps %xmm11, %xmm0
  2091. movaps 20 * SIZE(BO), %xmm11
  2092. mulps %xmm8, %xmm11
  2093. movsd 6 * SIZE(AO), %xmm8
  2094. addps %xmm11, %xmm1
  2095. movaps 24 * SIZE(BO), %xmm11
  2096. mulps %xmm8, %xmm11
  2097. addps %xmm11, %xmm2
  2098. movaps 28 * SIZE(BO), %xmm11
  2099. mulps %xmm8, %xmm11
  2100. movsd 16 * SIZE(AO), %xmm8
  2101. addps %xmm11, %xmm3
  2102. movaps 80 * SIZE(BO), %xmm11
  2103. mulps %xmm10, %xmm13
  2104. addps %xmm13, %xmm0
  2105. movaps 36 * SIZE(BO), %xmm13
  2106. mulps %xmm10, %xmm13
  2107. movsd 10 * SIZE(AO), %xmm10
  2108. addps %xmm13, %xmm1
  2109. movaps 40 * SIZE(BO), %xmm13
  2110. mulps %xmm10, %xmm13
  2111. addps %xmm13, %xmm2
  2112. movaps 44 * SIZE(BO), %xmm13
  2113. mulps %xmm10, %xmm13
  2114. movsd 12 * SIZE(AO), %xmm10
  2115. addps %xmm13, %xmm3
  2116. movaps 96 * SIZE(BO), %xmm13
  2117. mulps %xmm10, %xmm15
  2118. addps %xmm15, %xmm0
  2119. movaps 52 * SIZE(BO), %xmm15
  2120. mulps %xmm10, %xmm15
  2121. movsd 14 * SIZE(AO), %xmm10
  2122. addps %xmm15, %xmm1
  2123. movaps 56 * SIZE(BO), %xmm15
  2124. mulps %xmm10, %xmm15
  2125. addps %xmm15, %xmm2
  2126. movaps 60 * SIZE(BO), %xmm15
  2127. mulps %xmm10, %xmm15
  2128. movsd 24 * SIZE(AO), %xmm10
  2129. addps %xmm15, %xmm3
  2130. movaps 112 * SIZE(BO), %xmm15
  2131. addq $16 * SIZE, AO
  2132. addq $64 * SIZE, BO
  2133. decq %rax
  2134. jne .L72
  2135. ALIGN_4
  2136. .L75:
  2137. #if defined(LT) || defined(RN)
  2138. movq KK, %rax
  2139. #else
  2140. movq K, %rax
  2141. subq KK, %rax
  2142. #endif
  2143. movaps POSINV, %xmm15
  2144. andq $7, %rax # if (k & 1)
  2145. BRANCH
  2146. je .L78
  2147. ALIGN_4
  2148. .L76:
  2149. mulps %xmm8, %xmm9
  2150. addps %xmm9, %xmm0
  2151. movaps 4 * SIZE(BO), %xmm9
  2152. mulps %xmm8, %xmm9
  2153. movsd 2 * SIZE(AO), %xmm8
  2154. addps %xmm9, %xmm1
  2155. movaps 8 * SIZE(BO), %xmm9
  2156. addq $2 * SIZE, AO # aoffset += 4
  2157. addq $8 * SIZE, BO # boffset1 += 8
  2158. decq %rax
  2159. jg .L76
  2160. ALIGN_4
  2161. .L78:
  2162. addps %xmm2, %xmm0
  2163. addps %xmm3, %xmm1
  2164. shufps $0xb1, %xmm1, %xmm1
  2165. #if defined(LN) || defined(LT)
  2166. #ifndef CONJ
  2167. xorps %xmm15, %xmm1
  2168. #else
  2169. xorps %xmm15, %xmm0
  2170. #endif
  2171. #else
  2172. xorps %xmm15, %xmm1
  2173. #endif
  2174. addps %xmm1, %xmm0
  2175. #if defined(LN) || defined(RT)
  2176. movq KK, %rax
  2177. #ifdef LN
  2178. subq $1, %rax
  2179. #else
  2180. subq $1, %rax
  2181. #endif
  2182. movq AORIG, AO
  2183. movq BORIG, B
  2184. leaq BUFFER, BO
  2185. salq $ZBASE_SHIFT, %rax
  2186. leaq (AO, %rax, 1), AO
  2187. leaq (B, %rax, 1), B
  2188. leaq (BO, %rax, 4), BO
  2189. #endif
  2190. #if defined(LN) || defined(LT)
  2191. #ifdef movsd
  2192. xorps %xmm2, %xmm2
  2193. #endif
  2194. movsd 0 * SIZE(B), %xmm2
  2195. subps %xmm0, %xmm2
  2196. #else
  2197. #ifdef movsd
  2198. xorps %xmm1, %xmm1
  2199. #endif
  2200. movsd 0 * SIZE(AO), %xmm1
  2201. subps %xmm0, %xmm1
  2202. #endif
  2203. #if defined(LN) || defined(LT)
  2204. movaps 0 * SIZE(AO), %xmm8
  2205. pshufd $0x44, %xmm8, %xmm9
  2206. pshufd $0x11, %xmm8, %xmm10
  2207. pshufd $0xa0, %xmm2, %xmm0
  2208. pshufd $0xf5, %xmm2, %xmm2
  2209. #ifndef CONJ
  2210. xorps %xmm15, %xmm2
  2211. #else
  2212. xorps %xmm15, %xmm0
  2213. #endif
  2214. mulps %xmm9, %xmm0
  2215. mulps %xmm10, %xmm2
  2216. addps %xmm0, %xmm2
  2217. #endif
  2218. #if defined(RN) || defined(RT)
  2219. movaps 0 * SIZE(B), %xmm8
  2220. pshufd $0x44, %xmm8, %xmm9
  2221. pshufd $0x11, %xmm8, %xmm10
  2222. pshufd $0xa0, %xmm1, %xmm4
  2223. pshufd $0xf5, %xmm1, %xmm1
  2224. #ifndef CONJ
  2225. xorps %xmm15, %xmm1
  2226. #else
  2227. xorps %xmm15, %xmm4
  2228. #endif
  2229. mulps %xmm9, %xmm4
  2230. mulps %xmm10, %xmm1
  2231. addps %xmm4, %xmm1
  2232. #endif
  2233. #ifdef LN
  2234. subq $2 * SIZE, CO1
  2235. #endif
  2236. #if defined(LN) || defined(LT)
  2237. movlps %xmm2, 0 * SIZE(B)
  2238. pshufd $0x00, %xmm2, %xmm0
  2239. pshufd $0x55, %xmm2, %xmm1
  2240. movaps %xmm0, 0 * SIZE(BO)
  2241. movaps %xmm1, 4 * SIZE(BO)
  2242. movlps %xmm2, 0 * SIZE(CO1)
  2243. #else
  2244. movlps %xmm1, 0 * SIZE(AO)
  2245. movlps %xmm1, 0 * SIZE(CO1)
  2246. #endif
  2247. #ifndef LN
  2248. addq $2 * SIZE, CO1
  2249. #endif
  2250. #if defined(LT) || defined(RN)
  2251. movq K, %rax
  2252. subq KK, %rax
  2253. salq $ZBASE_SHIFT, %rax
  2254. leaq (AO, %rax, 1), AO
  2255. #ifdef LT
  2256. addq $2 * SIZE, B
  2257. #endif
  2258. #endif
  2259. #ifdef LN
  2260. subq $1, KK
  2261. movq BORIG, B
  2262. #endif
  2263. #ifdef LT
  2264. addq $1, KK
  2265. #endif
  2266. #ifdef RT
  2267. movq K, %rax
  2268. movq BORIG, B
  2269. salq $ZBASE_SHIFT, %rax
  2270. addq %rax, AORIG
  2271. #endif
  2272. ALIGN_4
  2273. .L60:
  2274. testq $2, M
  2275. je .L70
  2276. #ifdef LN
  2277. movq K, %rax
  2278. salq $1 + ZBASE_SHIFT, %rax
  2279. subq %rax, AORIG
  2280. #endif
  2281. #if defined(LN) || defined(RT)
  2282. movq KK, %rax
  2283. movq AORIG, AO
  2284. salq $ZBASE_SHIFT, %rax
  2285. leaq (AO, %rax, 2), AO
  2286. #endif
  2287. leaq BUFFER, BO
  2288. #if defined(LN) || defined(RT)
  2289. movq KK, %rax
  2290. salq $ZBASE_SHIFT, %rax
  2291. leaq (BO, %rax, 4), BO
  2292. #endif
  2293. movaps 0 * SIZE(AO), %xmm8
  2294. movaps 16 * SIZE(AO), %xmm10
  2295. movaps 0 * SIZE(BO), %xmm9
  2296. movaps 16 * SIZE(BO), %xmm11
  2297. movaps 32 * SIZE(BO), %xmm13
  2298. movaps 48 * SIZE(BO), %xmm15
  2299. pxor %xmm0, %xmm0
  2300. pxor %xmm1, %xmm1
  2301. pxor %xmm2, %xmm2
  2302. pxor %xmm3, %xmm3
  2303. #if defined(LT) || defined(RN)
  2304. movq KK, %rax
  2305. #else
  2306. movq K, %rax
  2307. subq KK, %rax
  2308. #endif
  2309. sarq $3, %rax
  2310. je .L65
  2311. ALIGN_4
  2312. .L62:
  2313. mulps %xmm8, %xmm9
  2314. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  2315. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  2316. #endif
  2317. mulps 4 * SIZE(BO), %xmm8
  2318. addps %xmm9, %xmm0
  2319. movaps 8 * SIZE(BO), %xmm9
  2320. addps %xmm8, %xmm1
  2321. movaps 4 * SIZE(AO), %xmm8
  2322. mulps %xmm8, %xmm9
  2323. mulps 12 * SIZE(BO), %xmm8
  2324. addps %xmm9, %xmm2
  2325. movaps 64 * SIZE(BO), %xmm9
  2326. addps %xmm8, %xmm3
  2327. movaps 8 * SIZE(AO), %xmm8
  2328. mulps %xmm8, %xmm11
  2329. mulps 20 * SIZE(BO), %xmm8
  2330. addps %xmm11, %xmm0
  2331. movaps 24 * SIZE(BO), %xmm11
  2332. addps %xmm8, %xmm1
  2333. movaps 12 * SIZE(AO), %xmm8
  2334. mulps %xmm8, %xmm11
  2335. mulps 28 * SIZE(BO), %xmm8
  2336. addps %xmm11, %xmm2
  2337. movaps 80 * SIZE(BO), %xmm11
  2338. addps %xmm8, %xmm3
  2339. movaps 32 * SIZE(AO), %xmm8
  2340. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  2341. PREFETCH (PREFETCHSIZE + 16) * SIZE(AO)
  2342. #endif
  2343. mulps %xmm10, %xmm13
  2344. mulps 36 * SIZE(BO), %xmm10
  2345. addps %xmm13, %xmm0
  2346. movaps 40 * SIZE(BO), %xmm13
  2347. addps %xmm10, %xmm1
  2348. movaps 20 * SIZE(AO), %xmm10
  2349. mulps %xmm10, %xmm13
  2350. mulps 44 * SIZE(BO), %xmm10
  2351. addps %xmm13, %xmm2
  2352. movaps 96 * SIZE(BO), %xmm13
  2353. addps %xmm10, %xmm3
  2354. movaps 24 * SIZE(AO), %xmm10
  2355. mulps %xmm10, %xmm15
  2356. mulps 52 * SIZE(BO), %xmm10
  2357. addps %xmm15, %xmm0
  2358. movaps 56 * SIZE(BO), %xmm15
  2359. addps %xmm10, %xmm1
  2360. movaps 28 * SIZE(AO), %xmm10
  2361. mulps %xmm10, %xmm15
  2362. mulps 60 * SIZE(BO), %xmm10
  2363. addps %xmm15, %xmm2
  2364. movaps 112 * SIZE(BO), %xmm15
  2365. addps %xmm10, %xmm3
  2366. movaps 48 * SIZE(AO), %xmm10
  2367. addq $32 * SIZE, AO
  2368. addq $64 * SIZE, BO
  2369. decq %rax
  2370. jne .L62
  2371. ALIGN_4
  2372. .L65:
  2373. #if defined(LT) || defined(RN)
  2374. movq KK, %rax
  2375. #else
  2376. movq K, %rax
  2377. subq KK, %rax
  2378. #endif
  2379. movaps POSINV, %xmm15
  2380. andq $7, %rax # if (k & 1)
  2381. BRANCH
  2382. je .L68
  2383. ALIGN_4
  2384. .L66:
  2385. mulps %xmm8, %xmm9
  2386. mulps 4 * SIZE(BO), %xmm8
  2387. addps %xmm9, %xmm0
  2388. movaps 8 * SIZE(BO), %xmm9
  2389. addps %xmm8, %xmm1
  2390. movaps 4 * SIZE(AO), %xmm8
  2391. addq $4 * SIZE, AO # aoffset += 4
  2392. addq $8 * SIZE, BO # boffset1 += 8
  2393. decq %rax
  2394. jg .L66
  2395. ALIGN_4
  2396. .L68:
  2397. addps %xmm2, %xmm0
  2398. addps %xmm3, %xmm1
  2399. shufps $0xb1, %xmm1, %xmm1
  2400. #if defined(LN) || defined(LT)
  2401. #ifndef CONJ
  2402. xorps %xmm15, %xmm1
  2403. #else
  2404. xorps %xmm15, %xmm0
  2405. #endif
  2406. #else
  2407. xorps %xmm15, %xmm1
  2408. #endif
  2409. addps %xmm1, %xmm0
  2410. #if defined(LN) || defined(RT)
  2411. movq KK, %rax
  2412. #ifdef LN
  2413. subq $2, %rax
  2414. #else
  2415. subq $1, %rax
  2416. #endif
  2417. movq AORIG, AO
  2418. movq BORIG, B
  2419. leaq BUFFER, BO
  2420. salq $ZBASE_SHIFT, %rax
  2421. leaq (AO, %rax, 2), AO
  2422. leaq (B, %rax, 1), B
  2423. leaq (BO, %rax, 4), BO
  2424. #endif
  2425. #if defined(LN) || defined(LT)
  2426. movaps %xmm0, %xmm1
  2427. unpcklpd %xmm2, %xmm0
  2428. unpckhpd %xmm2, %xmm1
  2429. #ifdef movsd
  2430. xorps %xmm2, %xmm2
  2431. #endif
  2432. movsd 0 * SIZE(B), %xmm2
  2433. #ifdef movsd
  2434. xorps %xmm3, %xmm3
  2435. #endif
  2436. movsd 2 * SIZE(B), %xmm3
  2437. subps %xmm0, %xmm2
  2438. subps %xmm1, %xmm3
  2439. #else
  2440. movaps 0 * SIZE(AO), %xmm1
  2441. subps %xmm0, %xmm1
  2442. #endif
  2443. #ifdef LN
  2444. movaps 4 * SIZE(AO), %xmm8
  2445. pshufd $0xee, %xmm8, %xmm9
  2446. pshufd $0xbb, %xmm8, %xmm10
  2447. pshufd $0xa0, %xmm3, %xmm0
  2448. pshufd $0xf5, %xmm3, %xmm3
  2449. #ifndef CONJ
  2450. xorps %xmm15, %xmm3
  2451. #else
  2452. xorps %xmm15, %xmm0
  2453. #endif
  2454. mulps %xmm9, %xmm0
  2455. mulps %xmm10, %xmm3
  2456. addps %xmm0, %xmm3
  2457. pshufd $0x44, %xmm8, %xmm9
  2458. pshufd $0x11, %xmm8, %xmm10
  2459. pshufd $0xa0, %xmm3, %xmm0
  2460. pshufd $0xf5, %xmm3, %xmm1
  2461. #ifndef CONJ
  2462. xorps %xmm15, %xmm1
  2463. #else
  2464. xorps %xmm15, %xmm0
  2465. #endif
  2466. mulps %xmm9, %xmm0
  2467. mulps %xmm10, %xmm1
  2468. subps %xmm0, %xmm2
  2469. subps %xmm1, %xmm2
  2470. movaps 0 * SIZE(AO), %xmm8
  2471. pshufd $0x44, %xmm8, %xmm9
  2472. pshufd $0x11, %xmm8, %xmm10
  2473. pshufd $0xa0, %xmm2, %xmm0
  2474. pshufd $0xf5, %xmm2, %xmm2
  2475. #ifndef CONJ
  2476. xorps %xmm15, %xmm2
  2477. #else
  2478. xorps %xmm15, %xmm0
  2479. #endif
  2480. mulps %xmm9, %xmm0
  2481. mulps %xmm10, %xmm2
  2482. addps %xmm0, %xmm2
  2483. #endif
  2484. #ifdef LT
  2485. movaps 0 * SIZE(AO), %xmm8
  2486. pshufd $0x44, %xmm8, %xmm9
  2487. pshufd $0x11, %xmm8, %xmm10
  2488. pshufd $0xa0, %xmm2, %xmm0
  2489. pshufd $0xf5, %xmm2, %xmm2
  2490. #ifndef CONJ
  2491. xorps %xmm15, %xmm2
  2492. #else
  2493. xorps %xmm15, %xmm0
  2494. #endif
  2495. mulps %xmm9, %xmm0
  2496. mulps %xmm10, %xmm2
  2497. addps %xmm0, %xmm2
  2498. pshufd $0xee, %xmm8, %xmm9
  2499. pshufd $0xbb, %xmm8, %xmm10
  2500. pshufd $0xa0, %xmm2, %xmm0
  2501. pshufd $0xf5, %xmm2, %xmm1
  2502. #ifndef CONJ
  2503. xorps %xmm15, %xmm1
  2504. #else
  2505. xorps %xmm15, %xmm0
  2506. #endif
  2507. mulps %xmm9, %xmm0
  2508. mulps %xmm10, %xmm1
  2509. subps %xmm0, %xmm3
  2510. subps %xmm1, %xmm3
  2511. movaps 4 * SIZE(AO), %xmm8
  2512. pshufd $0xee, %xmm8, %xmm9
  2513. pshufd $0xbb, %xmm8, %xmm10
  2514. pshufd $0xa0, %xmm3, %xmm0
  2515. pshufd $0xf5, %xmm3, %xmm3
  2516. #ifndef CONJ
  2517. xorps %xmm15, %xmm3
  2518. #else
  2519. xorps %xmm15, %xmm0
  2520. #endif
  2521. mulps %xmm9, %xmm0
  2522. mulps %xmm10, %xmm3
  2523. addps %xmm0, %xmm3
  2524. #endif
  2525. #if defined(RN) || defined(RT)
  2526. movaps 0 * SIZE(B), %xmm8
  2527. pshufd $0x44, %xmm8, %xmm9
  2528. pshufd $0x11, %xmm8, %xmm10
  2529. pshufd $0xa0, %xmm1, %xmm4
  2530. pshufd $0xf5, %xmm1, %xmm1
  2531. #ifndef CONJ
  2532. xorps %xmm15, %xmm1
  2533. #else
  2534. xorps %xmm15, %xmm4
  2535. #endif
  2536. mulps %xmm9, %xmm4
  2537. mulps %xmm10, %xmm1
  2538. addps %xmm4, %xmm1
  2539. #endif
  2540. #ifdef LN
  2541. subq $4 * SIZE, CO1
  2542. #endif
  2543. #if defined(LN) || defined(LT)
  2544. movlps %xmm2, 0 * SIZE(B)
  2545. movlps %xmm3, 2 * SIZE(B)
  2546. pshufd $0x00, %xmm2, %xmm0
  2547. pshufd $0x55, %xmm2, %xmm1
  2548. movaps %xmm0, 0 * SIZE(BO)
  2549. movaps %xmm1, 4 * SIZE(BO)
  2550. pshufd $0x00, %xmm3, %xmm0
  2551. pshufd $0x55, %xmm3, %xmm1
  2552. movaps %xmm0, 8 * SIZE(BO)
  2553. movaps %xmm1, 12 * SIZE(BO)
  2554. movlps %xmm2, 0 * SIZE(CO1)
  2555. movlps %xmm3, 2 * SIZE(CO1)
  2556. #else
  2557. movaps %xmm1, 0 * SIZE(AO)
  2558. movlps %xmm1, 0 * SIZE(CO1)
  2559. movhps %xmm1, 2 * SIZE(CO1)
  2560. #endif
  2561. #ifndef LN
  2562. addq $4 * SIZE, CO1
  2563. #endif
  2564. #if defined(LT) || defined(RN)
  2565. movq K, %rax
  2566. subq KK, %rax
  2567. salq $ZBASE_SHIFT, %rax
  2568. leaq (AO, %rax, 2), AO
  2569. #ifdef LT
  2570. addq $4 * SIZE, B
  2571. #endif
  2572. #endif
  2573. #ifdef LN
  2574. subq $2, KK
  2575. movq BORIG, B
  2576. #endif
  2577. #ifdef LT
  2578. addq $2, KK
  2579. #endif
  2580. #ifdef RT
  2581. movq K, %rax
  2582. movq BORIG, B
  2583. salq $1 + ZBASE_SHIFT, %rax
  2584. addq %rax, AORIG
  2585. #endif
  2586. ALIGN_4
  2587. .L70:
  2588. movq M, I
  2589. sarq $2, I # i = (m >> 2)
  2590. jle .L79
  2591. ALIGN_4
  2592. .L51:
  2593. #ifdef LN
  2594. movq K, %rax
  2595. salq $2 + ZBASE_SHIFT, %rax
  2596. subq %rax, AORIG
  2597. #endif
  2598. #if defined(LN) || defined(RT)
  2599. movq KK, %rax
  2600. movq AORIG, AO
  2601. salq $ZBASE_SHIFT, %rax
  2602. leaq (AO, %rax, 4), AO
  2603. #endif
  2604. leaq BUFFER, BO
  2605. #if defined(LN) || defined(RT)
  2606. movq KK, %rax
  2607. salq $ZBASE_SHIFT, %rax
  2608. leaq (BO, %rax, 4), BO
  2609. #endif
  2610. movaps 0 * SIZE(AO), %xmm8
  2611. movaps 16 * SIZE(AO), %xmm10
  2612. movaps 32 * SIZE(AO), %xmm12
  2613. movaps 48 * SIZE(AO), %xmm14
  2614. movaps 0 * SIZE(BO), %xmm9
  2615. movaps 16 * SIZE(BO), %xmm11
  2616. movaps 32 * SIZE(BO), %xmm13
  2617. movaps 48 * SIZE(BO), %xmm15
  2618. pxor %xmm0, %xmm0
  2619. pxor %xmm1, %xmm1
  2620. pxor %xmm2, %xmm2
  2621. pxor %xmm3, %xmm3
  2622. pxor %xmm4, %xmm4
  2623. pxor %xmm5, %xmm5
  2624. pxor %xmm6, %xmm6
  2625. pxor %xmm7, %xmm7
  2626. PREFETCHW -8 * SIZE(CO1)
  2627. #if defined(LT) || defined(RN)
  2628. movq KK, %rax
  2629. #else
  2630. movq K, %rax
  2631. subq KK, %rax
  2632. #endif
  2633. sarq $3, %rax
  2634. je .L55
  2635. ALIGN_4
  2636. .L52:
  2637. mulps %xmm8, %xmm9
  2638. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  2639. PREFETCH (PREFETCHSIZE + 0) * SIZE(AO)
  2640. #endif
  2641. mulps 4 * SIZE(BO), %xmm8
  2642. addps %xmm9, %xmm0
  2643. movaps 0 * SIZE(BO), %xmm9
  2644. addps %xmm8, %xmm1
  2645. movaps 4 * SIZE(AO), %xmm8
  2646. mulps %xmm8, %xmm9
  2647. mulps 4 * SIZE(BO), %xmm8
  2648. addps %xmm9, %xmm4
  2649. movaps 8 * SIZE(BO), %xmm9
  2650. addps %xmm8, %xmm5
  2651. movaps 8 * SIZE(AO), %xmm8
  2652. mulps %xmm8, %xmm9
  2653. mulps 12 * SIZE(BO), %xmm8
  2654. addps %xmm9, %xmm0
  2655. movaps 8 * SIZE(BO), %xmm9
  2656. addps %xmm8, %xmm1
  2657. movaps 12 * SIZE(AO), %xmm8
  2658. mulps %xmm8, %xmm9
  2659. mulps 12 * SIZE(BO), %xmm8
  2660. addps %xmm9, %xmm4
  2661. movaps 64 * SIZE(BO), %xmm9
  2662. addps %xmm8, %xmm5
  2663. movaps 64 * SIZE(AO), %xmm8
  2664. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  2665. PREFETCH (PREFETCHSIZE + 16) * SIZE(AO)
  2666. #endif
  2667. mulps %xmm10, %xmm11
  2668. mulps 20 * SIZE(BO), %xmm10
  2669. addps %xmm11, %xmm0
  2670. movaps 16 * SIZE(BO), %xmm11
  2671. addps %xmm10, %xmm1
  2672. movaps 20 * SIZE(AO), %xmm10
  2673. mulps %xmm10, %xmm11
  2674. mulps 20 * SIZE(BO), %xmm10
  2675. addps %xmm11, %xmm4
  2676. movaps 24 * SIZE(BO), %xmm11
  2677. addps %xmm10, %xmm5
  2678. movaps 24 * SIZE(AO), %xmm10
  2679. mulps %xmm10, %xmm11
  2680. mulps 28 * SIZE(BO), %xmm10
  2681. addps %xmm11, %xmm0
  2682. movaps 24 * SIZE(BO), %xmm11
  2683. addps %xmm10, %xmm1
  2684. movaps 28 * SIZE(AO), %xmm10
  2685. mulps %xmm10, %xmm11
  2686. mulps 28 * SIZE(BO), %xmm10
  2687. addps %xmm11, %xmm4
  2688. movaps 80 * SIZE(BO), %xmm11
  2689. addps %xmm10, %xmm5
  2690. movaps 80 * SIZE(AO), %xmm10
  2691. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  2692. PREFETCH (PREFETCHSIZE + 32) * SIZE(AO)
  2693. #endif
  2694. mulps %xmm12, %xmm13
  2695. mulps 36 * SIZE(BO), %xmm12
  2696. addps %xmm13, %xmm0
  2697. movaps 32 * SIZE(BO), %xmm13
  2698. addps %xmm12, %xmm1
  2699. movaps 36 * SIZE(AO), %xmm12
  2700. mulps %xmm12, %xmm13
  2701. mulps 36 * SIZE(BO), %xmm12
  2702. addps %xmm13, %xmm4
  2703. movaps 40 * SIZE(BO), %xmm13
  2704. addps %xmm12, %xmm5
  2705. movaps 40 * SIZE(AO), %xmm12
  2706. mulps %xmm12, %xmm13
  2707. mulps 44 * SIZE(BO), %xmm12
  2708. addps %xmm13, %xmm0
  2709. movaps 40 * SIZE(BO), %xmm13
  2710. addps %xmm12, %xmm1
  2711. movaps 44 * SIZE(AO), %xmm12
  2712. mulps %xmm12, %xmm13
  2713. mulps 44 * SIZE(BO), %xmm12
  2714. addps %xmm13, %xmm4
  2715. movaps 96 * SIZE(BO), %xmm13
  2716. addps %xmm12, %xmm5
  2717. movaps 96 * SIZE(AO), %xmm12
  2718. #if defined(OPTERON) && defined(HAVE_PREFETCH)
  2719. PREFETCH (PREFETCHSIZE + 48) * SIZE(AO)
  2720. #endif
  2721. mulps %xmm14, %xmm15
  2722. mulps 52 * SIZE(BO), %xmm14
  2723. addps %xmm15, %xmm0
  2724. movaps 48 * SIZE(BO), %xmm15
  2725. addps %xmm14, %xmm1
  2726. movaps 52 * SIZE(AO), %xmm14
  2727. mulps %xmm14, %xmm15
  2728. mulps 52 * SIZE(BO), %xmm14
  2729. addps %xmm15, %xmm4
  2730. movaps 56 * SIZE(BO), %xmm15
  2731. addps %xmm14, %xmm5
  2732. movaps 56 * SIZE(AO), %xmm14
  2733. mulps %xmm14, %xmm15
  2734. mulps 60 * SIZE(BO), %xmm14
  2735. addps %xmm15, %xmm0
  2736. movaps 56 * SIZE(BO), %xmm15
  2737. addps %xmm14, %xmm1
  2738. movaps 60 * SIZE(AO), %xmm14
  2739. mulps %xmm14, %xmm15
  2740. mulps 60 * SIZE(BO), %xmm14
  2741. addps %xmm15, %xmm4
  2742. movaps 112 * SIZE(BO), %xmm15
  2743. addps %xmm14, %xmm5
  2744. movaps 112 * SIZE(AO), %xmm14
  2745. addq $64 * SIZE, AO
  2746. addq $64 * SIZE, BO
  2747. decq %rax
  2748. jne .L52
  2749. ALIGN_4
  2750. .L55:
  2751. #if defined(LT) || defined(RN)
  2752. movq KK, %rax
  2753. #else
  2754. movq K, %rax
  2755. subq KK, %rax
  2756. #endif
  2757. movaps POSINV, %xmm15
  2758. andq $7, %rax # if (k & 1)
  2759. BRANCH
  2760. je .L58
  2761. ALIGN_4
  2762. .L56:
  2763. mulps %xmm8, %xmm9
  2764. mulps 4 * SIZE(BO), %xmm8
  2765. addps %xmm9, %xmm0
  2766. movaps 0 * SIZE(BO), %xmm9
  2767. addps %xmm8, %xmm1
  2768. movaps 4 * SIZE(AO), %xmm8
  2769. mulps %xmm8, %xmm9
  2770. mulps 4 * SIZE(BO), %xmm8
  2771. addps %xmm9, %xmm4
  2772. movaps 8 * SIZE(BO), %xmm9
  2773. addps %xmm8, %xmm5
  2774. movaps 8 * SIZE(AO), %xmm8
  2775. addq $ 8 * SIZE, AO # aoffset += 4
  2776. addq $ 8 * SIZE, BO # boffset1 += 8
  2777. decq %rax
  2778. jg .L56
  2779. ALIGN_4
  2780. .L58:
  2781. shufps $0xb1, %xmm1, %xmm1
  2782. shufps $0xb1, %xmm5, %xmm5
  2783. #if defined(LN) || defined(LT)
  2784. #ifndef CONJ
  2785. xorps %xmm15, %xmm1
  2786. xorps %xmm15, %xmm5
  2787. #else
  2788. xorps %xmm15, %xmm0
  2789. xorps %xmm15, %xmm4
  2790. #endif
  2791. #else
  2792. xorps %xmm15, %xmm1
  2793. xorps %xmm15, %xmm5
  2794. #endif
  2795. addps %xmm1, %xmm0
  2796. addps %xmm5, %xmm4
  2797. #if defined(LN) || defined(RT)
  2798. movq KK, %rax
  2799. #ifdef LN
  2800. subq $4, %rax
  2801. #else
  2802. subq $1, %rax
  2803. #endif
  2804. movq AORIG, AO
  2805. movq BORIG, B
  2806. leaq BUFFER, BO
  2807. salq $ZBASE_SHIFT, %rax
  2808. leaq (AO, %rax, 4), AO
  2809. leaq (B, %rax, 1), B
  2810. leaq (BO, %rax, 4), BO
  2811. #endif
  2812. #if defined(LN) || defined(LT)
  2813. movaps %xmm0, %xmm1
  2814. unpcklpd %xmm2, %xmm0
  2815. unpckhpd %xmm2, %xmm1
  2816. movaps %xmm4, %xmm5
  2817. unpcklpd %xmm6, %xmm4
  2818. unpckhpd %xmm6, %xmm5
  2819. #ifdef movsd
  2820. xorps %xmm2, %xmm2
  2821. #endif
  2822. movsd 0 * SIZE(B), %xmm2
  2823. #ifdef movsd
  2824. xorps %xmm3, %xmm3
  2825. #endif
  2826. movsd 2 * SIZE(B), %xmm3
  2827. #ifdef movsd
  2828. xorps %xmm6, %xmm6
  2829. #endif
  2830. movsd 4 * SIZE(B), %xmm6
  2831. #ifdef movsd
  2832. xorps %xmm7, %xmm7
  2833. #endif
  2834. movsd 6 * SIZE(B), %xmm7
  2835. subps %xmm0, %xmm2
  2836. subps %xmm1, %xmm3
  2837. subps %xmm4, %xmm6
  2838. subps %xmm5, %xmm7
  2839. #else
  2840. movaps 0 * SIZE(AO), %xmm1
  2841. movaps 4 * SIZE(AO), %xmm3
  2842. subps %xmm0, %xmm1
  2843. subps %xmm4, %xmm3
  2844. #endif
  2845. #ifdef LN
  2846. movaps 28 * SIZE(AO), %xmm8
  2847. pshufd $0xee, %xmm8, %xmm9
  2848. pshufd $0xbb, %xmm8, %xmm10
  2849. pshufd $0xa0, %xmm7, %xmm0
  2850. pshufd $0xf5, %xmm7, %xmm7
  2851. #ifndef CONJ
  2852. xorps %xmm15, %xmm7
  2853. #else
  2854. xorps %xmm15, %xmm0
  2855. #endif
  2856. mulps %xmm9, %xmm0
  2857. mulps %xmm10, %xmm7
  2858. addps %xmm0, %xmm7
  2859. pshufd $0x44, %xmm8, %xmm9
  2860. pshufd $0x11, %xmm8, %xmm10
  2861. pshufd $0xa0, %xmm7, %xmm0
  2862. pshufd $0xf5, %xmm7, %xmm1
  2863. #ifndef CONJ
  2864. xorps %xmm15, %xmm1
  2865. #else
  2866. xorps %xmm15, %xmm0
  2867. #endif
  2868. mulps %xmm9, %xmm0
  2869. mulps %xmm10, %xmm1
  2870. subps %xmm0, %xmm6
  2871. subps %xmm1, %xmm6
  2872. movaps 24 * SIZE(AO), %xmm8
  2873. pshufd $0xee, %xmm8, %xmm9
  2874. pshufd $0xbb, %xmm8, %xmm10
  2875. pshufd $0xa0, %xmm7, %xmm0
  2876. pshufd $0xf5, %xmm7, %xmm1
  2877. #ifndef CONJ
  2878. xorps %xmm15, %xmm1
  2879. #else
  2880. xorps %xmm15, %xmm0
  2881. #endif
  2882. mulps %xmm9, %xmm0
  2883. mulps %xmm10, %xmm1
  2884. subps %xmm0, %xmm3
  2885. subps %xmm1, %xmm3
  2886. pshufd $0x44, %xmm8, %xmm9
  2887. pshufd $0x11, %xmm8, %xmm10
  2888. pshufd $0xa0, %xmm7, %xmm0
  2889. pshufd $0xf5, %xmm7, %xmm1
  2890. #ifndef CONJ
  2891. xorps %xmm15, %xmm1
  2892. #else
  2893. xorps %xmm15, %xmm0
  2894. #endif
  2895. mulps %xmm9, %xmm0
  2896. mulps %xmm10, %xmm1
  2897. subps %xmm0, %xmm2
  2898. subps %xmm1, %xmm2
  2899. movaps 20 * SIZE(AO), %xmm8
  2900. pshufd $0x44, %xmm8, %xmm9
  2901. pshufd $0x11, %xmm8, %xmm10
  2902. pshufd $0xa0, %xmm6, %xmm0
  2903. pshufd $0xf5, %xmm6, %xmm6
  2904. #ifndef CONJ
  2905. xorps %xmm15, %xmm6
  2906. #else
  2907. xorps %xmm15, %xmm0
  2908. #endif
  2909. mulps %xmm9, %xmm0
  2910. mulps %xmm10, %xmm6
  2911. addps %xmm0, %xmm6
  2912. movaps 16 * SIZE(AO), %xmm8
  2913. pshufd $0xee, %xmm8, %xmm9
  2914. pshufd $0xbb, %xmm8, %xmm10
  2915. pshufd $0xa0, %xmm6, %xmm0
  2916. pshufd $0xf5, %xmm6, %xmm1
  2917. #ifndef CONJ
  2918. xorps %xmm15, %xmm1
  2919. #else
  2920. xorps %xmm15, %xmm0
  2921. #endif
  2922. mulps %xmm9, %xmm0
  2923. mulps %xmm10, %xmm1
  2924. subps %xmm0, %xmm3
  2925. subps %xmm1, %xmm3
  2926. pshufd $0x44, %xmm8, %xmm9
  2927. pshufd $0x11, %xmm8, %xmm10
  2928. pshufd $0xa0, %xmm6, %xmm0
  2929. pshufd $0xf5, %xmm6, %xmm1
  2930. #ifndef CONJ
  2931. xorps %xmm15, %xmm1
  2932. #else
  2933. xorps %xmm15, %xmm0
  2934. #endif
  2935. mulps %xmm9, %xmm0
  2936. mulps %xmm10, %xmm1
  2937. subps %xmm0, %xmm2
  2938. subps %xmm1, %xmm2
  2939. movaps 8 * SIZE(AO), %xmm8
  2940. pshufd $0xee, %xmm8, %xmm9
  2941. pshufd $0xbb, %xmm8, %xmm10
  2942. pshufd $0xa0, %xmm3, %xmm0
  2943. pshufd $0xf5, %xmm3, %xmm3
  2944. #ifndef CONJ
  2945. xorps %xmm15, %xmm3
  2946. #else
  2947. xorps %xmm15, %xmm0
  2948. #endif
  2949. mulps %xmm9, %xmm0
  2950. mulps %xmm10, %xmm3
  2951. addps %xmm0, %xmm3
  2952. pshufd $0x44, %xmm8, %xmm9
  2953. pshufd $0x11, %xmm8, %xmm10
  2954. pshufd $0xa0, %xmm3, %xmm0
  2955. pshufd $0xf5, %xmm3, %xmm1
  2956. #ifndef CONJ
  2957. xorps %xmm15, %xmm1
  2958. #else
  2959. xorps %xmm15, %xmm0
  2960. #endif
  2961. mulps %xmm9, %xmm0
  2962. mulps %xmm10, %xmm1
  2963. subps %xmm0, %xmm2
  2964. subps %xmm1, %xmm2
  2965. movaps 0 * SIZE(AO), %xmm8
  2966. pshufd $0x44, %xmm8, %xmm9
  2967. pshufd $0x11, %xmm8, %xmm10
  2968. pshufd $0xa0, %xmm2, %xmm0
  2969. pshufd $0xf5, %xmm2, %xmm2
  2970. #ifndef CONJ
  2971. xorps %xmm15, %xmm2
  2972. #else
  2973. xorps %xmm15, %xmm0
  2974. #endif
  2975. mulps %xmm9, %xmm0
  2976. mulps %xmm10, %xmm2
  2977. addps %xmm0, %xmm2
  2978. #endif
  2979. #ifdef LT
  2980. movaps 0 * SIZE(AO), %xmm8
  2981. pshufd $0x44, %xmm8, %xmm9
  2982. pshufd $0x11, %xmm8, %xmm10
  2983. pshufd $0xa0, %xmm2, %xmm0
  2984. pshufd $0xf5, %xmm2, %xmm2
  2985. #ifndef CONJ
  2986. xorps %xmm15, %xmm2
  2987. #else
  2988. xorps %xmm15, %xmm0
  2989. #endif
  2990. mulps %xmm9, %xmm0
  2991. mulps %xmm10, %xmm2
  2992. addps %xmm0, %xmm2
  2993. pshufd $0xee, %xmm8, %xmm9
  2994. pshufd $0xbb, %xmm8, %xmm10
  2995. pshufd $0xa0, %xmm2, %xmm0
  2996. pshufd $0xf5, %xmm2, %xmm1
  2997. #ifndef CONJ
  2998. xorps %xmm15, %xmm1
  2999. #else
  3000. xorps %xmm15, %xmm0
  3001. #endif
  3002. mulps %xmm9, %xmm0
  3003. mulps %xmm10, %xmm1
  3004. subps %xmm0, %xmm3
  3005. subps %xmm1, %xmm3
  3006. movaps 4 * SIZE(AO), %xmm8
  3007. pshufd $0x44, %xmm8, %xmm9
  3008. pshufd $0x11, %xmm8, %xmm10
  3009. pshufd $0xa0, %xmm2, %xmm0
  3010. pshufd $0xf5, %xmm2, %xmm1
  3011. #ifndef CONJ
  3012. xorps %xmm15, %xmm1
  3013. #else
  3014. xorps %xmm15, %xmm0
  3015. #endif
  3016. mulps %xmm9, %xmm0
  3017. mulps %xmm10, %xmm1
  3018. subps %xmm0, %xmm6
  3019. subps %xmm1, %xmm6
  3020. pshufd $0xee, %xmm8, %xmm9
  3021. pshufd $0xbb, %xmm8, %xmm10
  3022. pshufd $0xa0, %xmm2, %xmm0
  3023. pshufd $0xf5, %xmm2, %xmm1
  3024. #ifndef CONJ
  3025. xorps %xmm15, %xmm1
  3026. #else
  3027. xorps %xmm15, %xmm0
  3028. #endif
  3029. mulps %xmm9, %xmm0
  3030. mulps %xmm10, %xmm1
  3031. subps %xmm0, %xmm7
  3032. subps %xmm1, %xmm7
  3033. movaps 8 * SIZE(AO), %xmm8
  3034. pshufd $0xee, %xmm8, %xmm9
  3035. pshufd $0xbb, %xmm8, %xmm10
  3036. pshufd $0xa0, %xmm3, %xmm0
  3037. pshufd $0xf5, %xmm3, %xmm3
  3038. #ifndef CONJ
  3039. xorps %xmm15, %xmm3
  3040. #else
  3041. xorps %xmm15, %xmm0
  3042. #endif
  3043. mulps %xmm9, %xmm0
  3044. mulps %xmm10, %xmm3
  3045. addps %xmm0, %xmm3
  3046. movaps 12 * SIZE(AO), %xmm8
  3047. pshufd $0x44, %xmm8, %xmm9
  3048. pshufd $0x11, %xmm8, %xmm10
  3049. pshufd $0xa0, %xmm3, %xmm0
  3050. pshufd $0xf5, %xmm3, %xmm1
  3051. #ifndef CONJ
  3052. xorps %xmm15, %xmm1
  3053. #else
  3054. xorps %xmm15, %xmm0
  3055. #endif
  3056. mulps %xmm9, %xmm0
  3057. mulps %xmm10, %xmm1
  3058. subps %xmm0, %xmm6
  3059. subps %xmm1, %xmm6
  3060. pshufd $0xee, %xmm8, %xmm9
  3061. pshufd $0xbb, %xmm8, %xmm10
  3062. pshufd $0xa0, %xmm3, %xmm0
  3063. pshufd $0xf5, %xmm3, %xmm1
  3064. #ifndef CONJ
  3065. xorps %xmm15, %xmm1
  3066. #else
  3067. xorps %xmm15, %xmm0
  3068. #endif
  3069. mulps %xmm9, %xmm0
  3070. mulps %xmm10, %xmm1
  3071. subps %xmm0, %xmm7
  3072. subps %xmm1, %xmm7
  3073. movaps 20 * SIZE(AO), %xmm8
  3074. pshufd $0x44, %xmm8, %xmm9
  3075. pshufd $0x11, %xmm8, %xmm10
  3076. pshufd $0xa0, %xmm6, %xmm0
  3077. pshufd $0xf5, %xmm6, %xmm6
  3078. #ifndef CONJ
  3079. xorps %xmm15, %xmm6
  3080. #else
  3081. xorps %xmm15, %xmm0
  3082. #endif
  3083. mulps %xmm9, %xmm0
  3084. mulps %xmm10, %xmm6
  3085. addps %xmm0, %xmm6
  3086. pshufd $0xee, %xmm8, %xmm9
  3087. pshufd $0xbb, %xmm8, %xmm10
  3088. pshufd $0xa0, %xmm6, %xmm0
  3089. pshufd $0xf5, %xmm6, %xmm1
  3090. #ifndef CONJ
  3091. xorps %xmm15, %xmm1
  3092. #else
  3093. xorps %xmm15, %xmm0
  3094. #endif
  3095. mulps %xmm9, %xmm0
  3096. mulps %xmm10, %xmm1
  3097. subps %xmm0, %xmm7
  3098. subps %xmm1, %xmm7
  3099. movaps 28 * SIZE(AO), %xmm8
  3100. pshufd $0xee, %xmm8, %xmm9
  3101. pshufd $0xbb, %xmm8, %xmm10
  3102. pshufd $0xa0, %xmm7, %xmm0
  3103. pshufd $0xf5, %xmm7, %xmm7
  3104. #ifndef CONJ
  3105. xorps %xmm15, %xmm7
  3106. #else
  3107. xorps %xmm15, %xmm0
  3108. #endif
  3109. mulps %xmm9, %xmm0
  3110. mulps %xmm10, %xmm7
  3111. addps %xmm0, %xmm7
  3112. #endif
  3113. #if defined(RN) || defined(RT)
  3114. movaps 0 * SIZE(B), %xmm8
  3115. pshufd $0x44, %xmm8, %xmm9
  3116. pshufd $0x11, %xmm8, %xmm10
  3117. pshufd $0xa0, %xmm1, %xmm4
  3118. pshufd $0xf5, %xmm1, %xmm1
  3119. pshufd $0xa0, %xmm3, %xmm6
  3120. pshufd $0xf5, %xmm3, %xmm3
  3121. #ifndef CONJ
  3122. xorps %xmm15, %xmm1
  3123. xorps %xmm15, %xmm3
  3124. #else
  3125. xorps %xmm15, %xmm4
  3126. xorps %xmm15, %xmm6
  3127. #endif
  3128. mulps %xmm9, %xmm4
  3129. mulps %xmm9, %xmm6
  3130. mulps %xmm10, %xmm1
  3131. mulps %xmm10, %xmm3
  3132. addps %xmm4, %xmm1
  3133. addps %xmm6, %xmm3
  3134. #endif
  3135. #ifdef LN
  3136. subq $8 * SIZE, CO1
  3137. #endif
  3138. #if defined(LN) || defined(LT)
  3139. movlps %xmm2, 0 * SIZE(B)
  3140. movlps %xmm3, 2 * SIZE(B)
  3141. movlps %xmm6, 4 * SIZE(B)
  3142. movlps %xmm7, 6 * SIZE(B)
  3143. pshufd $0x00, %xmm2, %xmm0
  3144. pshufd $0x55, %xmm2, %xmm1
  3145. movaps %xmm0, 0 * SIZE(BO)
  3146. movaps %xmm1, 4 * SIZE(BO)
  3147. pshufd $0x00, %xmm3, %xmm0
  3148. pshufd $0x55, %xmm3, %xmm1
  3149. movaps %xmm0, 8 * SIZE(BO)
  3150. movaps %xmm1, 12 * SIZE(BO)
  3151. pshufd $0x00, %xmm6, %xmm0
  3152. pshufd $0x55, %xmm6, %xmm1
  3153. movaps %xmm0, 16 * SIZE(BO)
  3154. movaps %xmm1, 20 * SIZE(BO)
  3155. pshufd $0x00, %xmm7, %xmm0
  3156. pshufd $0x55, %xmm7, %xmm1
  3157. movaps %xmm0, 24 * SIZE(BO)
  3158. movaps %xmm1, 28 * SIZE(BO)
  3159. movlps %xmm2, 0 * SIZE(CO1)
  3160. movlps %xmm3, 2 * SIZE(CO1)
  3161. movlps %xmm6, 4 * SIZE(CO1)
  3162. movlps %xmm7, 6 * SIZE(CO1)
  3163. #else
  3164. movaps %xmm1, 0 * SIZE(AO)
  3165. movaps %xmm3, 4 * SIZE(AO)
  3166. movlps %xmm1, 0 * SIZE(CO1)
  3167. movhps %xmm1, 2 * SIZE(CO1)
  3168. movlps %xmm3, 4 * SIZE(CO1)
  3169. movhps %xmm3, 6 * SIZE(CO1)
  3170. #endif
  3171. #ifndef LN
  3172. addq $8 * SIZE, CO1
  3173. #endif
  3174. #if defined(LT) || defined(RN)
  3175. movq K, %rax
  3176. subq KK, %rax
  3177. salq $ZBASE_SHIFT, %rax
  3178. leaq (AO, %rax, 4), AO
  3179. #ifdef LT
  3180. addq $8 * SIZE, B
  3181. #endif
  3182. #endif
  3183. #ifdef LN
  3184. subq $4, KK
  3185. movq BORIG, B
  3186. #endif
  3187. #ifdef LT
  3188. addq $4, KK
  3189. #endif
  3190. #ifdef RT
  3191. movq K, %rax
  3192. movq BORIG, B
  3193. salq $2 + ZBASE_SHIFT, %rax
  3194. addq %rax, AORIG
  3195. #endif
  3196. decq I # i --
  3197. jg .L51
  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