ChangeLog.lightning 147 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019
  1. 2018-04-20 Paulo Andrade <pcpa@gnu.org>
  2. * include/lightning/jit_private.h: Add new register classes to
  3. flag float registers and double only registers, required for sparc64
  4. where only low 32 bit fpr registers can be used for single precision
  5. operations.
  6. Add new 128 bit jit_regset_t type for sparc64 register set.
  7. * include/lightning/jit_sparc.h, lib/jit_sparc-cpu.c, lib/jit_sparc-fpu.c,
  8. lib/jit_sparc-sz.c, lib/jit_sparc.c: Update for 64 bits sparc.
  9. * lib/lightning.c: Update for new jit_regset_t required for sparc64.
  10. 2018-02-26 Paulo Andrade <pcpa@gnu.org>
  11. * check/lightning.c, include/lightning.h: Add the new jit_va_push
  12. interface. That should be called when passing a va_list to a C
  13. function. This is required because on Alpha a va_list is passed
  14. by value, and lightning does not know about data types, so, cannot
  15. understand it is pushing a va_list as argument.
  16. * lib/jit_names.c, lib/lightning.c: Minor changes for the new
  17. jit_code_va_push.
  18. * check/cva_list.c: Update only test case using jit_va_push, to
  19. pass a va_list to a C function.
  20. doc/body.texi: Better documentation of the varargs interface.
  21. * jit_alpha.c, jit_alpha-cpu.c: Update to properly push a
  22. C va_list and correctly calculate varargs offset.
  23. * lib/jit_aarch64-sz.c, lib/jit_aarch64.c, lib/jit_alpha-sz.c,
  24. lib/jit_arm-sz.c, lib/jit_arm.c, lib/jit_hppa-sz.c, lib/jit_hppa.c,
  25. lib/jit_ia64-sz.c, lib/jit_ia64.c, lib/jit_mips-sz.c, lib/jit_mips.c,
  26. lib/jit_ppc-sz.c, lib/jit_ppc.c, lib/jit_s390-sz.c, lib/jit_s390.c,
  27. lib/jit_sparc-sz.c, lib/jit_sparc.c, lib/jit_x86-sz.c, lib/jit_x86.c:
  28. Update for the new jit_va_push interface.
  29. 2018-02-22 Paulo Andrade <pcpa@gnu.org>
  30. * lib/jit_alpha-cpu.c: Always set t12 to the address of the
  31. current function, to properly work on all systems. Previously
  32. the shortcut did only work on Tru64. For Linux and glibc the
  33. change is required.
  34. 2018-02-22 Paulo Andrade <pcpa@gnu.org>
  35. * lib/jit_aarch64.c, lib/jit_alpha.c, lib/jit_arm.c,
  36. lib/jit_mips.c, lib/jit_ppc.c, lib/jit_sparc.c, lib/jit_x86.c:
  37. Correct wrong logic in usage of jit_live in jit_retr. The
  38. problem is that if a temporary is required during epilog,
  39. the return register might be allocated, so, jit_live must always
  40. be used.
  41. 2018-01-31 Paulo Andrade <pcpa@gnu.org>
  42. * lib/lightning.c: Avoid deep recursions when computing live
  43. register ranges.
  44. 2018-01-31 Paulo Andrade <pcpa@gnu.org>
  45. * lib/jit_mips-cpu.c: Correct frame size and varargs
  46. initialization for the n32 abi.
  47. * lib/jit_mips.c, lib/jit_mips-fpu.c: Correct 32 bit abis
  48. in big-endian.
  49. 2017-09-13 Paulo Andrade <pcpa@gnu.org>
  50. * configure.ac: Add check for binutils 2.29 prototype to the
  51. disassembler function.
  52. * lib/jit_disasm.c: Adapt for binutils 2.29 change.
  53. 2017-06-09 Paulo Andrade <pcpa@gnu.org>
  54. * include/lightning/jit_private.h, lib/lightning.c: Add a
  55. second pass from start when computing register live ranges.
  56. This should be used temporarily, and is required for certain
  57. loop constructs, with several consecutive blocks not referencing
  58. a live register.
  59. 2016-05-05 Paulo Andrade <pcpa@gnu.org>
  60. * lib/lightning.c: Correct wrong movr simplification,
  61. remove no longer needed code to set return registers live
  62. and update live register set when reaching a label boundary,
  63. but do not descend if the block has been already visited.
  64. The later need some tuning for complex code generation, where
  65. it will still have issues.
  66. 2015-11-30 Paulo Andrade <pcpa@gnu.org>
  67. * doc/body.texi: Change documentation to no longer say
  68. it is a variant of the Fibonacci sequence, and document
  69. a proper implementation.
  70. Thanks to Jon Arintok for pointing out that the Fibonacci
  71. sequence generation was incorrect. It was documented, but
  72. still confusing.
  73. * check/fib.tst, check/fib.ok, check/bp.tst, check/bp.ok,
  74. doc/ifib.c, doc/rbif.c: Implement a proper Fibonacci
  75. sequence implementation.
  76. 2015-07-03 Paulo Andrade <pcpa@gnu.org>
  77. * lib/jit_mips-cpu.c: Correct definition of htonr_ul.
  78. Correct prolog/epilog/va* routines to work on o64 abi.
  79. * lib/jit_mips-fpu.c: Correct load of double literal
  80. argument when not using a data buffer.
  81. Remove alignment correction in vaarg_d if using the
  82. new mips abi.
  83. * lib/jit_mips.c: Correct code to allow creating variadic
  84. jit functions when using the new mips abi.
  85. * lib/jit_rewind.c: Minor adjust for rewind when using
  86. the new mips abi, if there are varargs arguments in
  87. registers.
  88. 2015-06-06 Paulo Andrade <pcpa@gnu.org>
  89. * lib/jit_ia64-cpu.c: Search backward for the last output
  90. register used, otherwise would stop too early if a float
  91. argument used the slot.
  92. Correct offset of first va_list argument, and use proper
  93. va_list abi.
  94. * lib/jit_ia64-fpu.c: Add new functions to move a gpr
  95. to a fpr register, to counterpart the ones that move a
  96. fpr to a gpr. These are required to properly implement
  97. jit_getarg*_{f,d} on complex prototypes, or variadic
  98. jit functions.
  99. * lib/jit_ia64-sz.c: Update for support to jit variadic
  100. functions.
  101. * lib/jit_ia64.c: Implement proper abi for variadic
  102. jit functions.
  103. 2015-06-04 Paulo Andrade <pcpa@gnu.org>
  104. * lib/jit_rewind.c: New file implementing generic functions
  105. to "rewind", or rewrite IR code sequences.
  106. * include/lightning.h: Add several new codes, that previously
  107. were a function call, that would synthesize the operation.
  108. Now, there is a code for the operation, and a new flag to
  109. know an operation is synthesized.
  110. * include/lightning/jit_private.h: Add several new macros to
  111. help construct synthesized IR code sequences.
  112. * lib/Makefile.am: Update for lib/jit_rewind.c.
  113. * lib/jit_disasm.c: Update for a small rework on jit_node_t,
  114. so that --enable-devel-disassembler does not need a change
  115. in the layout of jit_node_t.
  116. * lib/jit_names.c: Update for the new codes.
  117. * lib/jit_print.c: Update to print more readable output, and
  118. flag synthesized IR code sequences.
  119. * lib/jit_aarch64-sz.c, lib/jit_aarch64.c,
  120. lib/jit_arm-sz.c, lib/jit_arm.c, lib/jit_x86-sz.c,
  121. lib/jit_x86.c: Update for new synthesized IR code sequences.
  122. * lib/jit_ppc-cpu.c, lib/jit_ppc-fpu., lib/jit_ppc-sz.c,
  123. lib/jit_ppc.c, lib/jit_mips-cpu.c, lib/jit_mips-fpu.c,
  124. lib/jit_mips-sz.c, lib/jit_mips.c, lib/jit_s390-fpu.c,
  125. lib/jit_s390-sz.c, lib/jit_s390.c: Update for new synthesized
  126. IR code sequences and correct bugs in the initial varargs
  127. implementation support.
  128. * lib/jit_alpha-sz.c, lib/jit_alpha.c, lib/jit_hppa-sz.c,
  129. lib/jit_hppa.c, lib/jit_ia64-sz.c, lib/jit_ia64.c,
  130. lib/jit_sparc-sz.c, lib/jit_sparc.c: Add generic, untested
  131. support for the new synthesized IR code sequences. Known
  132. most likely broken right now, and should be corrected once
  133. access to these hosts is available.
  134. * lib/lightning.c: Update for new IR codes, and add support
  135. for not yet existing instructions that change third argument.
  136. * size.c: Change to use different tables for LE and BE PowerPC.
  137. Correct a wrong endif for x32.
  138. 2015-05-25 Paulo Andrade <pcpa@gnu.org>
  139. * check/cva_list.c: New file implementing a test to ensure
  140. the value returned by jit_va_start is a valid C va_list.
  141. * check/va_list.ok: New simple helper file, as now the
  142. va_list.tst test is enabled.
  143. * check/va_list.tst: Rewritten for an extensive variadic
  144. jit functions test.
  145. * check/Makefile.am: Update for the new tests.
  146. * lib/jit_arm-cpu.c, lib/jit_arm-swf.c, lib/jit_arm-vfp.c,
  147. lib/jit_arm.c: Correct broken software float in a previous
  148. commit. Note that the hard float abi implementation is known
  149. broken at this time, for special cases involving variadic
  150. functions, and should be corrected next.
  151. lib/jit_x86-cpu.c, lib/jit_x86-sz.c, lib/jit_x86.c: Correct
  152. the jit_va_list_t semantics to match C va_list.
  153. 2015-05-24 Paulo Andrade <pcpa@gnu.org>
  154. * lib/Makefile.am: Bump library major. This is a preparation
  155. for a rework that was due for quite some time, but that is
  156. now required to properly implement variadic jit functions.
  157. The rework is mainly required to know at prolog parsing, if
  158. a function is variadic or not. This will benefit a few
  159. backends, and is mandatory for the hard float arm abi.
  160. The rework was already planned for quite some time, to
  161. be able to use a variable stack framesize, and for leaf
  162. functions optimization where applicable.
  163. The change will be source compatible, but will change
  164. some internals, and jit_code_t values, as some new will
  165. be added.
  166. The only behavior change is that, jit_arg_register_p may
  167. change return value on hard float arm abi, if called before
  168. or after jit_ellipsis. Common sense anyway, would say to
  169. make that call after jit_ellipsis, but documentation
  170. should be updated for it.
  171. 2015-05-24 Paulo Andrade <pcpa@gnu.org>
  172. * lib/jit_aarch64-fpu.c, lib/jit_aarch64.c: Correct base
  173. aarch64 varargs code.
  174. 2015-05-24 Paulo Andrade <pcpa@gnu.org>
  175. * check/lightning.c: Clearly run check if clang is the system
  176. compiler.
  177. 2015-05-20 Paulo Andrade <pcpa@gnu.org>
  178. * lib/jit_sparc-cpu.c, lib/jit_sparc-fpu.c, lib/jit_sparc.c:
  179. Add base support to jit vararg functions to the sparc backend.
  180. 2015-05-20 Paulo Andrade <pcpa@gnu.org>
  181. * lib/jit_alpha-cpu.c, lib/jit_alpha-fpu.c, lib/jit_alpha.c:
  182. Add base support to jit vararg functions to the alpha backend.
  183. 2015-05-19 Paulo Andrade <pcpa@gnu.org>
  184. * lib/jit_hppa-cpu.c, lib/jit_hppa-fpu.c, lib/jit_hppa.c:
  185. Add base support to jit vararg functions to the hppa backend.
  186. 2015-05-10 Paulo Andrade <pcpa@gnu.org>
  187. * lib/jit_ia64-cpu.c, lib/jit_ia64-fpu.c, lib/jit_ia64.c:
  188. Add base support to jit vararg functions to the ia64 backend.
  189. 2015-05-10 Paulo Andrade <pcpa@gnu.org>
  190. * lib/jit_ia64-fpu.c, lib/jit_ia64.c: Correct movi_d_w
  191. and movi_f_w implementation to work when not using a
  192. data buffer. This causes the check varargs.tst to
  193. work when passing "-d" to the lightning test tool.
  194. 2015-05-10 Paulo Andrade <pcpa@gnu.org>
  195. * lib/jit_ia64.c: Implement inline assembly cache flush,
  196. required on multiprocessor systems.
  197. 2015-05-06 Paulo Andrade <pcpa@gnu.org>
  198. * lib/jit_mips-cpu.c, lib/jit_mips-fpu.c, lib/jit_mips.c:
  199. Add base support to jit vararg functions to the mips backend.
  200. Currently only supported on the o32 abi, until access to a
  201. n32 system is arranged.
  202. 2015-05-05 Paulo Andrade <pcpa@gnu.org>
  203. * lib/jit_ppc-cpu.c, lib/jit_ppc-fpu.c, lib/jit_ppc.c:
  204. Add base support to jit vararg functions to the PowerPC backend.
  205. 2015-05-02 Paulo Andrade <pcpa@gnu.org>
  206. * lib/jit_s390-cpu.c, lib/jit_s390-fpu.c, lib/jit_s390.c:
  207. Add base support to jit vararg functions to the s390 backend.
  208. 2015-05-01 Paulo Andrade <pcpa@gnu.org>
  209. * lib/jit_arm-cpu.c, lib/jit_arm-swf.c, lib/jit_arm-vfp.c,
  210. lib/jit_arm.c: Add base support to jit vararg
  211. functions to the arm backend.
  212. 2015-04-30 Paulo Andrade <pcpa@gnu.org>
  213. * lib/jit_aarch64-cpu.c, lib/jit_aarch64-fpu.c,
  214. lib/jit_aarch64.c: Add base support to jit vararg
  215. functions to the aarch64 backend.
  216. 2015-04-27 Paulo Andrade <pcpa@gnu.org>
  217. * include/lightning.h, include/lightning/jit_private.h,
  218. lib/jit_names.c, lib/lightning.c: Add initial support
  219. for the new jit_va_start, jit_va_arg, jit_va_arg_d, and
  220. jit_va_end interfaces. The jit_va_start call is supposed
  221. to return a va_list compatible pointer, but not yet
  222. decided if it will be "declared" stdarg compatible,
  223. as for now only x86 support has been added (and should
  224. be compatible), but issues may arise on other backends.
  225. * check/lightning.c: Add wrappers to call the new jit_va_*
  226. interfaces.
  227. * lib/jit_x86-cpu.c, lib/jit_x86.c: Implement the new
  228. jit_va_* for x86.
  229. * lib/jit_x86-sz.c: Add fields, but not yet fully updated,
  230. as this is an intermediate commit.
  231. * lib/jit_aarch64-sz.c, lib/jit_aarch64.c,
  232. lib/jit_alpha-sz.c, lib/jit_alpha.c,
  233. lib/jit_arm-sz.c, lib/jit_arm.c,
  234. lib/jit_hppa-sz.c, lib/jit_hppa.c,
  235. lib/jit_ia64-sz.c, lib/jit_ia64.c,
  236. lib/jit_mips-sz.c, lib/jit_mips.c,
  237. lib/jit_ppc-sz.c, lib/jit_ppc.c,
  238. lib/jit_s390-sz.c, lib/jit_s390.c,
  239. lib/jit_sparc-sz.c, lib/jit_sparc.c: Prepare for the
  240. new jit_va_* interfaces. Not yet implemented, and will
  241. cause an assertion if used.
  242. * check/va_list.tst: Simple early test case, that works
  243. on x86_64, x32, ix86, cygwin, and cygwin64.
  244. 2015-02-17 Paulo Andrade <pcpa@gnu.org>
  245. * include/lightning.h, include/lightning/jit_private.h,
  246. lib/jit_aarch64-cpu.c, lib/jit_aarch64.c,
  247. lib/jit_alpha-cpu.c, lib/jit_alpha.c,
  248. lib/jit_arm-cpu.c, lib/jit_arm.c,
  249. lib/jit_hppa-cpu.c, lib/jit_hppa.c,
  250. lib/jit_ia64-cpu.c, lib/jit_ia64.c,
  251. lib/jit_mips-cpu.c, lib/jit_mips.c,
  252. lib/jit_ppc-cpu.c, lib/jit_ppc.c,
  253. lib/jit_s390-cpu.c, lib/jit_s390.c,
  254. lib/jit_sparc-cpu.c, lib/jit_sparc.c,
  255. lib/jit_x86-cpu.c, lib/jit_x86.c: Implement the new
  256. jit_allocar(offs, size) interface, that receives
  257. two integer registers arguments, allocates space
  258. dynamically in the stack, returns the offset in
  259. the first argument, and uses the second argument
  260. for the size in bytes of the memory to be allocated.
  261. * check/allocar.ok, check/allocar.tst: New files
  262. implementing test cases for the new jit_allocar
  263. interface.
  264. * check/Makefile.am, check/lightning.c: Update for
  265. the new test case and interface.
  266. * doc/body.texi: Add documentation of the new
  267. interface.
  268. 2015-02-17 Paulo Andrade <pcpa@gnu.org>
  269. * include/lightning/jit_x86.h, lib/jit_x86-cpu.c,
  270. lib/jit_x86-x87.c: No longer make st(7) available.
  271. Need to keep one x87 slots empty to avoid exceptions.
  272. This has the side effect of no longer needing the
  273. hackish emms instruction before a function call.
  274. 2015-02-16 Paulo Andrade <pcpa@gnu.org>
  275. * lib/lightning.c: Remove the jit_regno_patch bitfield
  276. register fields before actual emit, as it is only really
  277. used before emit, otherwise, on special conditions it
  278. may consider live registers as dead during code emit.
  279. 2015-02-15 Paulo Andrade <pcpa@gnu.org>
  280. * lib/jit_x86-cpu.c, lib/jit_x86-sse.c, lib/jit_x86-x87.c:
  281. Correct encoding of ldxr* stxr* in the x32 abi. If the
  282. displacement register is negative, it would generate
  283. a 64 bit instruction with a 32 bit unsigned displacement.
  284. * check/ranger.tst, check/ranger.ok: New files, implementing
  285. a test case for negative loads and stores. This is range.tst
  286. converted to use registers instead of immediate offsets.
  287. check/Makefile.am: Update for the new test case.
  288. 2015-02-07 Paulo Andrade <pcpa@gnu.org>
  289. * lib/jit_size.c: Preventively use at least 144 bytes
  290. if JIT_INSTR_MAX is less than it. The logic is not
  291. guaranteed to be 100% precise, it is mostly heuristics
  292. to allocate a buffer with as close as possible size,
  293. but a wrong value may cause code generation to write
  294. past the end of the buffer.
  295. 2015-02-03 Paulo Andrade <pcpa@gnu.org>
  296. * lib/lightning.c: Correct the reason the bug in
  297. simplify_stxi was not triggered before, it was due to
  298. incorrectly resetting the value->code field, what was
  299. causing it to never properly optimize:
  300. stxi Im0 Rb0 Rt0
  301. ldxi Rt1 Rb1 Im1
  302. when Rb0 == Rb1, Rt0 == Rt1 and Im0 == Im1
  303. There was another possible issue, that has been also
  304. addressed in this commit, that would be the case of
  305. Rbn == Rtn, where no redundancy removal is possible.
  306. 2015-02-03 Paulo Andrade <pcpa@gnu.org>
  307. * lib/lightning.c: Correct wrong check in simplify_stxi.
  308. The test was incorrectly comparing the target register
  309. and the displacement offset. This was a time bomb bug,
  310. that would trigger in code like:
  311. stxi Im0 Rb0 Rt0
  312. stxi Im1 Rb1 Rt1
  313. if Rb0 == Rb1 && Rt0 == Rt1 && Im0 == Rt1, that is,
  314. the wrong check was Im0 == Rt1, instead of the supposed
  315. Im0 == Imm1 (that was what the code mean't to do). It
  316. was removing the second stxi assuming it was redundantly
  317. generated; as that is not uncommon pattern on
  318. translators generating jit.
  319. 2015-02-02 Paulo Andrade <pcpa@gnu.org>
  320. * configure.ac, include/lightning/jit_private.h,
  321. lib/jit_aarch64.c, lib/jit_alpha.c, lib/jit_arm.c,
  322. lib/jit_disasm.c, lib/jit_hppa.c, lib/jit_ia64.c,
  323. lib/jit_mips.c, lib/jit_ppc.c, lib/jit_print.c,
  324. lib/jit_s390.c, lib/jit_sparc.c, lib/jit_x86.c: Add a new
  325. --enable-devel-disassembler option, that should be used
  326. during development, or lightning debug. This option
  327. intermixes previous jit_print and jit_disassemble
  328. output, making it easier to visualize what lightning
  329. call was used, and what code was generated.
  330. 2015-01-31 Paulo Andrade <pcpa@gnu.org>
  331. * lib/jit_arm-cpu.c, lib/jit_arm.c: Only limit to 24 bit
  332. displacement non conditional jump in the same jit_state_t.
  333. 2015-01-19 Paulo Andrade <pcpa@gnu.org>
  334. * doc/body.texi: Reorder documentation, making jit_frame
  335. and jit_tramp the lightning response to the need of
  336. trampolines, continuations and tail call optimizations.
  337. A pseudo code example of a factorial function was added.
  338. Also added a section for description of the available
  339. predicates.
  340. * doc/fact.c: New file, implementing a simple example of
  341. a translation of a trivial, recursive, tail call optimization
  342. into lightning calls. This is the conversion to functional C
  343. code of the example in doc/body.texi.
  344. * doc/Makefile.am: Update for the next test case.
  345. 2015-01-17 Paulo Andrade <pcpa@gnu.org>
  346. * include/lightning.h, lib/jit_aarch64.c,
  347. lib/jit_alpha.c, lib/jit_arm-vfp.c, lib/jit_arm.c,
  348. lib/jit_hppa.c, lib/jit_ia64.c, lib/jit_mips.c,
  349. lib/jit_ppc.c, lib/jit_s390.c, lib/jit_sparc.c,
  350. lib/jit_x86.c: Add the new jit_arg_register_p predicate.
  351. The predicate is expected to be used to know if an
  352. argument is in a register, what would need special
  353. handling if code that can overwrite non callee save
  354. registers is executed.
  355. * check/carg.c: New test case to check consistency and
  356. expected usage of jit_arg_register_p.
  357. * check/Makefile.am: Update for new test case.
  358. 2015-01-17 Paulo Andrade <pcpa@gnu.org>
  359. * include/lightning/jit_aarch64.h,
  360. include/lightning/jit_alpha.h,
  361. include/lightning/jit_arm.h,
  362. include/lightning/jit_hppa.h,
  363. include/lightning/jit_mips.h,
  364. include/lightning/jit_ppc.h,
  365. include/lightning/jit_s390.h,
  366. include/lightning/jit_sparc.h,
  367. include/lightning/jit_x86.h,
  368. lib/jit_aarch64.c, lib/jit_alpha.c,
  369. lib/jit_arm.c, lib/jit_hppa.c,
  370. lib/jit_ia64.c, lib/jit_mips.c,
  371. lib/jit_ppc.c, lib/jit_s390.c,
  372. lib/jit_sparc.c, lib/jit_x86.c: Remove jit_arg_reg_p and
  373. jit_arg_f_reg_p from a public header, and define it only
  374. on port specific files where an integer offset is used
  375. to qualify an argument identifier. Exported code expects
  376. an opaque pointer (but of jit_node_t* type) to "qualify"
  377. an argument identifier.
  378. This patch, and the code review/simplification done during
  379. it also corrected some bugs:
  380. o Inconsistent jit_arg_d value of double argument after 3
  381. integer arguments in arm for jit_functions; tested, C
  382. functions were being properly called.
  383. o Inconsistent use of getarg_{f,d} and putarg*_{f,d} on
  384. s390 (32-bit) that happened to not have a proper test
  385. case, as it would only happen for jit functions, and
  386. tested, called C functions had proper arguments.
  387. o Corrected a "last minute" correction that did not go
  388. to the committed version, and would not compile on hppa,
  389. due to bad _jit_putargi_d prototype definition.
  390. 2015-01-17 Paulo Andrade <pcpa@gnu.org>
  391. * doc/body.texi: Correct wrong/outdated information for
  392. hton*, pusharg* and ret*, and add missing documentation
  393. for rsb*, qmul*, qdvi* and putarg*.
  394. 2015-01-15 Paulo Andrade <pcpa@gnu.org>
  395. * configure.ac, lib/jit_disasm.c: Rewrite workaround
  396. to apparent problem to initialize powerpc disassembler.
  397. 2015-01-15 Paulo Andrade <pcpa@gnu.org>
  398. * include/lightning.h, lib/jit_aarch64.c,
  399. lib/jit_alpha.c, lib/jit_arm.c, lib/jit_hppa.c,
  400. lib/jit_ia64.c, lib/jit_mips.c, lib/jit_ppc.c,
  401. lib/jit_s390.c, lib/jit_sparc.c, lib/jit_x86.c:
  402. Implement jit_putarg*. It works as a mix of jit_getarg*
  403. and jit_pusharg*, in the way that the first argument is
  404. a register or immediate, and the second is a pointer
  405. returned by jit_arg*. The use of the interface is to change
  406. values of arguments to the current jit function.
  407. * check/put.ok, check/put.tst: New test cases exercising
  408. the new jit_putarg* interface.
  409. * check/Makefile.am, check/lightning.c: Update for the
  410. new test case and interface.
  411. 2015-01-08 Paulo Andrade <pcpa@gnu.org>
  412. * include/lightning/jit_s390.h, lib/jit_s390-cpu.c,
  413. lib/jit_s390-fpu.c, lib/jit_s390-sz.c, lib/jit_s390.c:
  414. Renamed s390x* files to s390*.
  415. * check/float.tst, check/lightning.c, configure.ac,
  416. include/lightning.h, include/lightning/Makefile.am,
  417. lib/Makefile.am, lib/jit_s390.c, lib/jit_size.c,
  418. lib/lightning.c: Update for renamed files.
  419. 2015-01-08 Paulo Andrade <pcpa@gnu.org>
  420. * include/lightning.h, include/lightning/jit_private.h,
  421. include/lightning/jit_s390x.h, lib/jit_disasm.c,
  422. lib/jit_s390x-cpu.c, lib/jit_s390x-fpu.c, lib/jit_s390x-sz.c,
  423. lib/jit_s390x.c, lib/jit_size.c, lib/lightning.c:
  424. Add support for generating jit for s390 32 bit. This change
  425. also removed %f15 from the list of temporaries fpr registers;
  426. it was not being used, but if were, it would corrupt the
  427. stack frame because the spill address would overwrite grp
  428. offsets.
  429. 2014-12-26 Paulo Andrade <pcpa@gnu.org>
  430. * lib/jit_ppc-cpu.c, lib/jit_ppc.c: Correct some endianess issues
  431. on the powerpc le backend.
  432. 2014-12-26 Paulo Andrade <pcpa@gnu.org>
  433. * lib/jit_ppc-cpu.c: Add mcrxr instruction emulation,
  434. as this instruction has been phased out, and should be
  435. implemented as a kernel trap.
  436. 2014-12-26 Paulo Andrade <pcpa@gnu.org>
  437. * lib/jit_arm.c: Better check for need to flush constants
  438. before the pool being no longer reachable.
  439. 2014-12-25 Paulo Andrade <pcpa@gnu.org>
  440. * include/lightning.h: Split jit_htonr in the new 3 interfaces
  441. jit_htonr_us, jit_htonr_ui and jit_htonr_ul, the later only
  442. available on 64 bit. The plain/untyped jit_htonr macro call
  443. maps to the wordsize one.
  444. * lib/jit_aarch64-cpu.c, lib/jit_aarch64-sz.c, lib/jit_aarch64.c,
  445. lib/jit_alpha-cpu.c, lib/jit_alpha-sz.c, lib/jit_alpha.c,
  446. lib/jit_arm-cpu.c, lib/jit_arm-sz.c, lib/jit_arm.c,
  447. lib/jit_hppa-cpu.c, lib/jit_hppa-sz.c, lib/jit_hppa.c,
  448. lib/jit_ia64-cpu.c, lib/jit_ia64-sz.c, lib/jit_ia64.c,
  449. lib/jit_mips-cpu.c, lib/jit_mips-sz.c, lib/jit_mips.c,
  450. lib/jit_ppc-cpu.c, lib/jit_ppc-sz.c, lib/jit_ppc.c,
  451. lib/jit_s390x-cpu.c, lib/jit_s390x-sz.c, lib/jit_s390x.c,
  452. lib/jit_sparc-cpu.c, lib/jit_sparc-sz.c, lib/jit_sparc.c,
  453. lib/jit_x86-cpu.c, lib/jit_x86-sz.c, lib/jit_x86.c:
  454. Update backends for the new jit_htonr*.
  455. * check/lightning.c, lib/jit_names.c, lib/lightning.c:
  456. Update for the new jit_htonr* interfaces.
  457. * check/Makefile.am: Update for new test cases.
  458. * check/hton.ok, check/hton.tst: New test cases.
  459. 2014-12-24 Paulo Andrade <pcpa@gnu.org>
  460. * include/lightning/jit_private.h, include/lightning/jit_x86.h,
  461. lib/jit_disasm.c, lib/jit_x86-cpu.c, lib/jit_x86-sse.c,
  462. lib/jit_x86-sz.c, lib/jit_x86-x87.c, lib/jit_x86.c,
  463. size.c: Implement support for the x32 abi. Built and
  464. tested on Gentoo default/linux/amd64/13.0/x32 profile.
  465. 2014-12-24 Paulo Andrade <pcpa@gnu.org>
  466. * lib/jit_names.c: Add missing rsbi_f and rsbi_d strings.
  467. 2014-12-21 Paulo Andrade <pcpa@gnu.org>
  468. * lib/jit_arm.c: Call __clear_cache for every page.
  469. This should only be required for older boards or
  470. toolchain setup, but has been reported to be required
  471. for lightning at some point.
  472. 2014-12-21 Paulo Andrade <pcpa@gnu.org>
  473. * lib/jit_arm.c: Correct check to guard overflow of index
  474. of constants from program counter.
  475. 2014-11-24 Paulo Andrade <pcpa@gnu.org>
  476. * lib/lightning.c: Remove an optimization to calee save
  477. registers that may incorrectly remove a jit_movr under
  478. special conditions.
  479. 2014-11-20 Paulo Andrade <pcpa@gnu.org>
  480. * include/lightning/jit_ppc.h, lib/jit_ppc-cpu.c,
  481. lib/jit_ppc.c: Add initial powerpc le support.
  482. 2014-11-20 Paulo Andrade <pcpa@gnu.org>
  483. * lib/jit_disasm.c: Change thumb or arm disassemble based on
  484. jit code before disassembly.
  485. * lib/jit_arm-cpu.c: Correct reversed arguments to LDRD and
  486. STRD instructions, and correct checking for support of those.
  487. * lib/jit_arm-swf.c: Correct wrong use of LDRD and STRD and
  488. only use those if the register is even.
  489. * check/check.arm.swf.sh, check/check.arm4.swf.sh: New files
  490. to test LDRD and STRD, as well as the alternate code path
  491. when those are not available, in the .arm4. test case.
  492. * check/Makefile.am: Update for the new test cases.
  493. 2014-11-08 Paulo Andrade <pcpa@gnu.org>
  494. * include/lightning/jit_private.h, lib/jit_aarch64.c,
  495. lib/jit_alpha.c, lib/jit_arm.c, lib/jit_hppa.c,
  496. lib/jit_ia64.c, lib/jit_mips.c, lib/jit_ppc.c,
  497. lib/jit_s390x.c, lib/jit_sparc.c, lib/jit_x86.c:
  498. Implement a private jit_flush call, that flushes
  499. the cache, if applicable, aligning down to the
  500. previous and up to the next page boundary.
  501. 2014-11-08 Paulo Andrade <pcpa@gnu.org>
  502. * check/ctramp.c: New file. It just repeats the test
  503. of tramp.tst, but using two jit_state_t, what should
  504. test possible issues with two contexts, and also validate
  505. jit_tramp works on backends with function descriptions.
  506. * check/Makefile.am: Update for new test case.
  507. 2014-11-03 Paulo Andrade <pcpa@gnu.org>
  508. * include/lightning/jit_mips.h: Do not make the t9 register
  509. JIT_R11 (or JIT_R7 for n32 or n64 abi) available. Previously
  510. it cause problems if one expects it to not be changed in a
  511. function call. For example, calling a jit function, where it
  512. really does not need to be changed.
  513. 2014-10-26 Paulo Andrade <pcpa@gnu.org>
  514. * lib/jit_aarch64.c, lib/jit_alpha.c, lib/jit_arm.c,
  515. lib/jit_hppa.c, lib/jit_ia64.c, lib/jit_mips.c, lib/jit_ppc.c,
  516. lib/jit_s390x.c, lib/jit_sparc.c, lib/jit_x86.c: Add an
  517. assertion to all code generation "drivers" to ensure
  518. _jitc->regarg is empty or in an expected state, after
  519. translation of a lightning instruction to native code.
  520. This change was a brute force test to find out other cases
  521. of a temporary not being release (like was happening with
  522. _bmsi and _bmci on x86), but no other case was found,
  523. after running make check, with assertions enabled, on all
  524. backends.
  525. 2014-10-26 Paulo Andrade <pcpa@gnu.org>
  526. * lib/jit_x86-cpu.c: Correct a register allocation leak in
  527. _bmsi and _bmci.
  528. 2014-10-25 Paulo Andrade <pcpa@gnu.org>
  529. * lib/jit_disasm.c: Do not cause an fatal error if init_jit
  530. fails in the jit_init_debug call.
  531. 2014-10-24 Paulo Andrade <pcpa@gnu.org>
  532. * lib/jit_ia64.c, lib/jit_ppc.c: Correct handling of function
  533. descriptor when first prolog is a jit_tramp prolog. The
  534. test case was using the same jit_context_t, so was not
  535. triggering this condition.
  536. * lib/jit_ppc-cpu.c: Properly handle jump displacements that
  537. do not fit on 24 powerpc. This required changing from previous
  538. "mtlr reg, blr" to "mtctr reg, bctr" to properly handle
  539. the logic to "hide" function descriptors, but that would
  540. also be required as the proper jit_jmpr when/if implementing
  541. optimizations to leaf functions (was working with blr because
  542. it is saved/reloaded in prolog/epilog).
  543. 2014-10-21 Paulo Andrade <pcpa@gnu.org>
  544. * include/lightning.h, lib/lightning.c: Add three predicates
  545. to query information about labels. jit_forward_p(label)
  546. will return non zero if the label is "forward", that is
  547. need a call to jit_link(label), jit_indirect_p(label)
  548. that returns non zero if the label was created with the
  549. jit_indirect() call, and jit_target_p(label) that will
  550. return non zero if there is at least one jump patched
  551. to land at that label.
  552. 2014-10-18 Paulo Andrade <pcpa@gnu.org>
  553. * check/range.ok, check/range.tst: New test case designed
  554. to catch incorrect code generation, usually due to incorrect
  555. test of immediate size. The test checks a large amount of
  556. encodings in "power of two" boundaries. This test exorcises
  557. a significant amount of code paths that was previously not
  558. tested.
  559. * check/Makefile.am: Add range test to make check target.
  560. * lib/jit_aarch64-cpu.c: Correct wrong address calculation
  561. for stxi_c, stxi_s, stxi_i and stxi_l when the offset is
  562. too large.
  563. * lib/jit_mips-fpu.c: Correct wrong size test to check if
  564. an immediate can be encoded in a float or double store.
  565. * lib/jit_s390x-cpu.c: Correct inverted encoding to stxi_s
  566. when the offset cannot be encoded, and fallbacks to an
  567. alternate encoding in 2 instructions.
  568. 2014-10-17 Paulo Andrade <pcpa@gnu.org>
  569. * check/alu_rsb.ok, check/alu_rsb.tst: New files implementing
  570. tests for jit_rsb*.
  571. * check/Makefile.am, check/lightning.c, include/lightning.h,
  572. lib/jit_aarch64-cpu.c, lib/jit_aarch64-fpu.c, lib/jit_aarch64-sz.c,
  573. lib/jit_aarch64.c, lib/jit_alpha-cpu.c, lib/jit_alpha-fpu.c,
  574. lib/jit_alpha-sz.c, lib/jit_alpha.c, lib/jit_arm-cpu.c,
  575. lib/jit_arm-swf.c, lib/jit_arm-sz.c, lib/jit_arm-vfp.c,
  576. lib/jit_arm.c, lib/jit_hppa-cpu.c, lib/jit_hppa-fpu.c,
  577. lib/jit_hppa-sz.c, lib/jit_hppa.c, lib/jit_ia64-cpu.c,
  578. lib/jit_ia64-fpu.c, lib/jit_ia64-sz.c, lib/jit_ia64.c,
  579. lib/jit_mips-cpu.c, lib/jit_mips-fpu.c, lib/jit_mips-sz.c,
  580. lib/jit_mips.c, lib/jit_names.c, lib/jit_ppc-cpu.c,
  581. lib/jit_ppc-fpu.c, lib/jit_ppc-sz.c, lib/jit_ppc.c,
  582. lib/jit_s390x-cpu.c, lib/jit_s390x-fpu.c, lib/jit_s390x-sz.c,
  583. lib/jit_s390x.c, lib/jit_sparc-cpu.c, lib/jit_sparc-fpu.c,
  584. lib/jit_sparc-sz.c, lib/jit_sparc.c, lib/jit_x86-cpu.c,
  585. lib/jit_x86-sse.c, lib/jit_x86-sz.c, lib/jit_x86-x87.c,
  586. lib/jit_x86.c, lib/lightning.c: Implement jit_rsb*. This
  587. was a missing lightning 1.x interface, that on most
  588. backends is synthesized, but on a few backends (hppa and ia64),
  589. it can generate better code as on those there is, or the
  590. only instruction with an immediate is in "rsb" format
  591. (left operand).
  592. 2014-10-17 Paulo Andrade <pcpa@gnu.org>
  593. * lib/jit_names.c: New file with single definition of string
  594. representation of lightning IR codes.
  595. * size.c: Modified to append the code name in a C comment
  596. after the maximum instruction size.
  597. * lib/jit_print.c: Minor change to not duplicate jit_names.c
  598. contents.
  599. * lib/jit_aarch64-sz.c, lib/jit_alpha-sz.c, lib/jit_arm-sz.c,
  600. lib/jit_hppa-sz.c, lib/jit_ia64-sz.c, lib/jit_mips-sz.c,
  601. lib/jit_ppc-sz.c, lib/jit_s390x-sz.c, lib/jit_sparc-sz.c,
  602. lib/jit_x86-sz.c: Rewritten to add string representation of
  603. IR codes in a C comment.
  604. 2014-10-14 Paulo Andrade <pcpa@gnu.org>
  605. * lib/jit_aarch64-cpu.c, lib/jit_alpha-cpu.c, lib/jit_arm-cpu.c,
  606. lib/jit_hppa-cpu.c, lib/jit_mips-cpu.c, lib/jit_ppc-cpu.c,
  607. lib/jit_sparc-cpu.c: Implement or correct the internal
  608. nop(count) call that receives an argument that tells the
  609. modulo bytes to align the code for the next instruction.
  610. * include/lightning.h, lib/lightning.c, lib/jit_aarch64.c,
  611. lib/jit_alpha.c, lib/jit_arm.c, lib/jit_hppa.c, lib/jit_ia64.c,
  612. lib/jit_mips.c, lib/jit_ppc.c, lib/jit_s390x.c, lib/jit_sparc.c,
  613. lib/jit_x86.c: Implement the new jit_align() call that receive
  614. an argument, that tells the modulo, in bytes, to align the
  615. next instruction. In most backends the only value that makes
  616. a difference is a value that matches sizeof(void*), as all
  617. other values usually are already automatically aligned in
  618. labels, but not guaranteed to be aligned at word size bytes.
  619. * check/align.ok, check/align.tst: New files, implementing
  620. a simple test for the new jit_align() interface.
  621. * check/Makefile.am, check/lightning.c, lib/jit_aarch64-sz.c,
  622. lib/jit_alpha-sz.c, lib/jit_arm-sz.c, lib/jit_hppa-sz.c,
  623. lib/jit_ia64-sz.c, lib/jit_mips-sz.c, lib/jit_ppc-sz.c,
  624. lib/jit_print.c, lib/jit_s390x-sz.c, lib/jit_sparc-sz.c,
  625. lib/jit_x86-sz.c: Update for the new jit_code_align code and
  626. the jit_align() interface.
  627. 2014-10-13 Paulo Andrade <pcpa@gnu.org>
  628. * include/lightning.h, lib/jit_size.c, size.c: Use a
  629. symbolic value for the last IR code.
  630. 2014-10-12 Paulo Andrade <pcpa@gnu.org>
  631. * include/lightning.h, include/lightning/jit_private.h,
  632. lib/jit_aarch64-cpu.c, lib/jit_alpha-cpu.c, lib/jit_arm-cpu.c,
  633. lib/jit_hppa-cpu.c, lib/jit_ia64-cpu.c, lib/jit_mips-cpu.c,
  634. lib/jit_ppc-cpu.c, lib/jit_s390x-cpu.c, lib/jit_sparc-cpu.c,
  635. lib/jit_x86-cpu.c, lib/lightning.c: Implement the new
  636. jit_frame and jit_tramp interfaces, that allow writing
  637. trampoline like calls, where a single dispatcher jit buffer
  638. is written, and later other jit buffers are created, with
  639. the same stack frame layout as the dispatcher. This is the
  640. logic that GNU Smalltalk used in lightning 1.x, and is required
  641. to make a sane port for lighting 2.x.
  642. * jit_ia64-cpu.c: Implement support for jit_frame and jit_tramp,
  643. and also correct wrong encoding for B4 instructions, that
  644. implement jmpr, as well as correct reverse logic in _jmpr,
  645. that was moving the branch register to the jump register,
  646. and not vice-versa.
  647. Also, if a stack frame is to be assumed, always assume it may
  648. call a function with up to 8 arguments, regardless of the
  649. hint frame argument.
  650. * lib/jit_arm.c: Add a new must_align_p() interface to ensure
  651. function prologs are always aligned. This condition was
  652. previously always true, somewhat by accident, but with
  653. jit_tramp it is not guaranteed.
  654. * jit_ia64-cpu.c: lib/jit_ppc.c: Add minor special handling
  655. required to implement jit_tramp, where a function descriptor
  656. should not be added before a prolog, as jit_tramp means omit
  657. prolog.
  658. * check/lightning.c: Update test driver for the new interfaces.
  659. * check/Makefile.am, check/tramp.tst, check/tramp.ok: Add
  660. a simple test and example of the jit_frame and jit_tramp
  661. usage implementing a simple Fibonacci function using a
  662. simulation of an interpreter stack and how it would handle
  663. state in language specific variables.
  664. * doc/body.texi: Add documentation for jit_frame and
  665. jit_tramp.
  666. 2014-09-29 Paulo Andrade <pcpa@gnu.org>
  667. * lib/jit_aarch64.c, lib/jit_alpha.c, lib/jit_arm.c,
  668. lib/jit_hppa.c, lib/jit_ia64.c, lib/jit_mips.c,
  669. lib/jit_ppc.c, lib/jit_s390x.c, lib/jit_sparc.c,
  670. lib/jit_x86.c, lib/lightning.c: Allow jit_jmpi on a
  671. target that is not a node. This may lead to hard to
  672. debug code generation, but is a required feature for
  673. certain generators, like the ones that used lightning
  674. 1.2x. Note that previously, but not really well
  675. documented, it was instructed to use:
  676. jit_movi(rn, addr); jit_jmpr(rn);
  677. but now, plain:
  678. jit_patch_abs(jit_jmpi(), addr);
  679. should also work.
  680. 2014-09-24 Paulo Andrade <pcpa@gnu.org>
  681. * lib/jit_x86-sz.c: Generate information about instruction
  682. lengths for more precise calculation of buffer size on
  683. Windows x64. This change is specially important because
  684. the maximum instruction length is larger than other
  685. systems, what could cause an out of bounds write on
  686. special conditions without this update.
  687. 2014-09-24 Paulo Andrade <pcpa@gnu.org>
  688. * check/lightning.c: Add workaround to conflicting global
  689. optind variable in cygwin binutils that have an internal
  690. getopt* implementation.
  691. * lib/jit_x86-cpu.c: Add a simple define ffsl ffs if building
  692. for 32 bit and there is no ffsl function.
  693. 2014-09-24 Paulo Andrade <pcpa@gnu.org>
  694. * check/lightning.c: Add a hopefully temporary kludge to not use
  695. sprintf and sscanf returned by dlsym. This is required to pass
  696. the varargs test.
  697. * include/lightning/jit_private.h: Use symbolic name for first
  698. integer register argument, as this is different in sysv and
  699. win64 abi.
  700. * include/lightning/jit_x86.h: Add conditionals and definitions
  701. for Windows x64 (under __CYGWIN__ preprocessor conditional).
  702. * lib/jit_x86-cpu.c: Correct one instruction encoding bug, that
  703. was working by accident. Only use rax to rdx for some byte
  704. operations to work on compatibility mode (that is, to generate
  705. the proper encoding, instead of actually generating encoding
  706. for high byte registers, e.g. %bh).
  707. Add proper prolog and epilog for windows x64.
  708. * lib/jit_x86-sse.c: Correct a swapped rex prefix for float
  709. operations.
  710. * lib/jit_x86.c: Adjust to support Windows x64 abi.
  711. * check/check.x87.nodata.sh: New file, previously used but that
  712. was missing git.
  713. 2014-09-07 Paulo Andrade <pcpa@gnu.org>
  714. * lib/lightning.c: Mark all registers advertised as live, as
  715. per jit_callee_save_p as live whenever reaching a jump that
  716. cannot be tracked. This is a rethink of the previous commit,
  717. and is a better approach, otherwise there would not be much
  718. sense on relying on jit_callee_save_p if it could not be
  719. trusted.
  720. * check/jmpr.tst, check/jmpr.ok: New files implementing a very
  721. simple test case, that would actually cause an assertion on
  722. code before the change to only mark as live when reaching a
  723. jump that could not tracked, the actually advertised as callee
  724. save registers.
  725. check/Makefile.am: Update for new jmpr test case.
  726. 2014-09-01 Paulo Andrade <pcpa@gnu.org>
  727. * lib/lightning.c: Do not mark all registers in unknown state
  728. as live on jit_jmpr, or jit_jmpi to an absolute address. Instead,
  729. treat it as a function call, and only consider JIT_Vn registers
  730. as possibly live.
  731. 2014-08-29 Paulo Andrade <pcpa@gnu.org>
  732. * doc/body.texi: Add a proper info menu entry for
  733. GNU lightning.
  734. * doc/version.texi: Regenerate.
  735. 2014-08-16 Paulo Andrade <pcpa@gnu.org>
  736. * lib/jit_aarch64-cpu.c, lib/jit_aarch64-fpu.c,
  737. lib/jit_arm-cpu.c, lib/jit_arm-vfp.c,
  738. lib/jit_hppa-cpu.c, lib/jit_hppa-fpu.c,
  739. lib/jit_ia64-cpu.c, lib/jit_ia64-fpu.c,
  740. lib/jit_mips-cpu.c, lib/jit_mips-fpu.c,
  741. lib/jit_ppc-cpu.c, lib/jit_ppc-fpu.c,
  742. lib/jit_s390x-cpu.c, lib/jit_s390x-fpu.c,
  743. lib/jit_s390x.c, lib/jit_sparc-cpu.c,
  744. lib/jit_x86-cpu.c, lib/jit_x86-sse.c,
  745. lib/jit_x86-x87.c: Review generation of all branch
  746. instructions and always adds the jit_class_nospill
  747. bitfield for temporary registers that cannot be spilled
  748. because the reload would be after a conditional jump; the
  749. patch only adds an extra assertion. These conditions do
  750. not happen on documented lightning usage, but can happen
  751. if one uses the not exported jit_get_reg and jit_unget_reg
  752. calls and cause enough register starvation.
  753. 2014-08-16 Paulo Andrade <pcpa@gnu.org>
  754. * lib/jit_alpha.c: Correct wrong bitmask of most argument
  755. float register arguments, that were being set as callee
  756. save instead of argument registers class.
  757. 2014-08-16 Paulo Andrade <pcpa@gnu.org>
  758. * lib/jit_arm-sz.c: Regenerate table of known maximum
  759. instruction sizes for the software float fallback,
  760. that implements "virtual" float registers in the stack
  761. and operations as calls to libgcc.
  762. * size.c: Correct typo in the generated jit_arm-sz.c file.
  763. 2014-08-10 Paulo Andrade <pcpa@gnu.org>
  764. * include/lightning/jit_alpha.h, lib/jit_alpha-cpu.c,
  765. lib/jit_alpha-fpu.c, lib/jit_alpha-sz.c, lib/jit_alpha.c:
  766. New files implementing a lightning Alpha port. Thanks
  767. to Trent Nelson and snakebit.net staff for providing access
  768. to an Alpha system.
  769. * check/float.tst, check/lightning.c, configure.ac,
  770. include/lightning.h, include/lightning/Makefile.am,
  771. include/lightning/jit_private.h, lib/Makefile.am,
  772. lib/jit_disasm.c, lib/jit_size.c, lib/lightning.c:
  773. Minor changes to adapt for the new Alpha port.
  774. 2014-08-10 Paulo Andrade <pcpa@gnu.org>
  775. * lib/lightning.c: Always mark JIT_RET and JIT_FRET as
  776. live in a function epilog. This is required because
  777. on some ports a complex sequence, allocating one or more
  778. registers, may be required to jump from a ret* to the
  779. epilog, and the lightning api does not have annotations
  780. to know if a function returns a value, or the type of
  781. the return value.
  782. 2014-08-10 Paulo Andrade <pcpa@gnu.org>
  783. * lib/lightning.c: Change the correct live bitmask of
  784. return registers after a function call in jit_update.
  785. 2014-08-10 Paulo Andrade <pcpa@gnu.org>
  786. * lib/lightning.c: Change assertions to have an int
  787. result and correct a bad bit mask assertion.
  788. 2014-08-10 Paulo Andrade <pcpa@gnu.org>
  789. * lib/jit_aarch64.c: Correct bad setup for assertion
  790. of consistency before a patch.
  791. 2014-08-10 Paulo Andrade <pcpa@gnu.org>
  792. * lib/jit_mips-cpu.c: Correct typo in the jit_bmsr
  793. implementation that was using the wrong test result
  794. register.
  795. 2014-07-28 Paulo Andrade <pcpa@gnu.org>
  796. * lib/jit_memory.c: Do not call free on NULL pointers.
  797. * include/lightning/jit_private.h, lib/jit_note.c,
  798. lib/lightning.c: Add a wrapper to memcpy and memmove
  799. to not actually call those functions with a zero size
  800. argument, and likely also a null src or dst.
  801. 2014-07-27 Paulo Andrade <pcpa@gnu.org>
  802. * include/lightning/jit_private.h, lib/jit_disasm.c,
  803. lib/lightning.c: Remove the global jit_progname variable.
  804. It was being only used in jit_init_debug, that is called
  805. from init_jit, so, just pass an argument.
  806. 2014-07-27 Paulo Andrade <pcpa@gnu.org>
  807. * doc/body.texi: Add note that jit_set_memory_functions
  808. should be called before init_jit, because init_jit
  809. itself may call the memory wrappers.
  810. 2014-04-22 Paulo Andrade <pcpa@gnu.org>
  811. * lib/jit_arm.c: Do not get confused with default settings
  812. if /proc is not mounted on Linux specific code path.
  813. 2014-04-09 Paulo Andrade <pcpa@gnu.org>
  814. * include/lightning/jit_aarch64.h, include/lightning/jit_arm.h,
  815. include/lightning/jit_hppa.h, include/lightning/jit_ia64.h,
  816. include/lightning/jit_mips.h, include/lightning/jit_ppc.h,
  817. include/lightning/jit_private.h, include/lightning/jit_s390x.h,
  818. include/lightning/jit_sparc.h, include/lightning/jit_x86.h:
  819. Do not add jit_regset_t, JIT_RA0, and JIT_FA0 to the installed
  820. header file. These types and definitions are supposed to be
  821. only used internally.
  822. 2014-04-05 Paulo Andrade <pcpa@gnu.org>
  823. * lib/jit_arm-cpu.c: Only adjust stack pointer in prolog if
  824. need stack space, that is, do not emit a nop instruction
  825. subtracting zero from the stack pointer.
  826. 2014-04-04 Paulo Andrade <pcpa@gnu.org>
  827. * lib/jit_disasm.c: Correct a crash in the doc/printf example
  828. on arm due to releasing the data_info information in
  829. jit_clear_state. This is a special case for arm only, and
  830. actually, only armv5 or older uses the data_info buffer,
  831. or when forcing arm instruction set mode besides thumb
  832. available.
  833. 2014-12-03 Paulo Andrade <pcpa@gnu.org>
  834. * doc/body.texi: Write detailed description and examples for
  835. jit_get_memory_functions, jit_set_memory_functions,
  836. jit_get_code, jit_set_code, jit_get_data and jit_set_data.
  837. 2014-12-03 Paulo Andrade <pcpa@gnu.org>
  838. * include/lightning.h, include/lightning/jit_private.h,
  839. lib/lightning.c: Implement the new jit_set_data() interface,
  840. and the new jit_get_data() helper. Like jit_set_code(),
  841. jit_realize() should be called before jit_set_data().
  842. The most common usage should be jit_set_data(JIT_DISABLE_DATA
  843. | JIT_DISABLE_NOTE), to force synthesize any float/double
  844. constant in the stack and not generate any debug information.
  845. * lib/jit_note.c: Minor change to debug note generation as
  846. now it uses an alternate temporary data buffer during constants
  847. and debug generation to accommodate the possibility of the user
  848. setting an alternate data buffer.
  849. * lib/jit_hppa-fpu.c, lib/jit_s390x.c, lib/jit_s390x-cpu.c,
  850. lib/jit_s390x-fpu.c, lib/jit_sparc.c, lib/jit_sparc-fpu.c,
  851. lib/jit_x86-sse.c, lib/jit_x86-x87.c: Implement jit_set_data.
  852. * lib/jit_hppa-sz.c, lib/jit_sparc-sz.c, lib/jit_x86-sz.c,
  853. lib/jit_s390x-sz.c: Update for several instructions that now
  854. have a different maximum length due to jit_set_data.
  855. * lib/jit_mips-fpu.c: Implement jit_set_data, but missing
  856. validation on n32 and n64 abis (and/or big endian).
  857. * lib/jit_mips-sz.c: Update for changes in o32.
  858. * lib/jit_ppc-fpu.c: Implement jit_set_data, but missing
  859. validation on Darwin PPC.
  860. * lib/jit_ppc-sz.c: Update for changes in powerpc 32 and
  861. 64 bit.
  862. * lib/jit_ia64-fpu.c: Implement untested jit_set_data.
  863. * TODO: Add note to list ports that were not tested for the
  864. new jit_set_data() feature, due to no longer having access
  865. to them.
  866. * check/nodata.c: New file implementing a simple test exercising
  867. several different conditions created by jit_set_data().
  868. * check/check.nodata.sh: New file implementing a wrapper
  869. over the existing *.tst files, that runs all tests without
  870. using a data buffer for constants; only meaningful (and
  871. enabled) on architectures that used to store float/double
  872. constants on a read only data buffer.
  873. * configure.ac, check/Makefile.am: Update for the new test
  874. cases.
  875. * check/lightning.c: Implement the new "-d" option that
  876. sets an internal flag to call jit_set_data() disable
  877. constants and debug, that is, using only a pure code
  878. buffer.
  879. 2014-11-03 Paulo Andrade <pcpa@gnu.org>
  880. * include/lightning.h, include/lightning/jit_private.h,
  881. lib/lightning.c: Implement the new jit_set_code() interface,
  882. that allows instructing lightning to use an alternate code
  883. buffer. The new jit_realize() function should be called
  884. before jit_set_code(), and usually call jit_get_code()
  885. to query the amount of bytes expected to be required for
  886. the code.
  887. * lib/jit_size.c: Minor update to have less chances of
  888. miscalculating the code buffer by starting the counter
  889. with the size of the longest instruction instead of zero,
  890. as code emit fails if at any moment less than the longest
  891. instruction bytes are available.
  892. * check/setcode.c: New file implementing some basic tests
  893. of the new jit_set_code() interface.
  894. * check/Makefile.am: Update for newer test case.
  895. 2014-06-03 Paulo Andrade <pcpa@gnu.org>
  896. * include/lightning.h, lib/lightning.c: Add the new
  897. jit_indirect() call, that returns a special label node,
  898. and tells lightning that the label may be the target of
  899. an indirect jump.
  900. * doc/body.texi: Document the new jit_indirect() call, and
  901. add examples of different ways to create labels and branches.
  902. 2014-23-02 Paulo Andrade <pcpa@gnu.org>
  903. * lib/jit_x86.c: Rewrite previous patch to inline save/restore
  904. because clobbering %ebx in x86 is treated as an error
  905. (jit_x86.c:239:5: error: PIC register clobbered by 'ebx' in 'asm').
  906. 2014-19-02 Paulo Andrade <pcpa@gnu.org>
  907. * lib/jit_x86.c: Rewrite incorrect inline assembly that could
  908. truncate a variable in a callee save register. Now it simply
  909. tells gcc that the register is clobbered, instead of using a
  910. *32 bit* swap with a temporary variable. The problem only
  911. happens when compiling with optimization.
  912. 2014-19-02 Paulo Andrade <pcpa@gnu.org>
  913. * include/lightning/jit_aarch64.h, include/lightning/jit_arm.h,
  914. include/lightning/jit_hppa.h, include/lightning/jit_ia64.h,
  915. include/lightning/jit_mips.h, include/lightning/jit_ppc.h,
  916. include/lightning/jit_s390x.h, include/lightning/jit_sparc.h,
  917. include/lightning/jit_x86.h: Change jit_regset_t to an
  918. unsigned type, to allow safe right shift.
  919. * lib/lightning.c: Rewrite jit_regset_scan1 to allow easier
  920. compiler optimization.
  921. 2013-12-03 Paulo Andrade <pcpa@gnu.org>
  922. * lib/jit_x86-x87.c: Correct wrong optimization when
  923. loading the log(2) constant.
  924. 2013-12-03 Paulo Andrade <pcpa@gnu.org>
  925. * lib/jit_x86-cpu.c: Use the emms instruction before
  926. calling any function. This is particularly important
  927. when using c99 complex functions as it can easily
  928. overflow the x87 stack due to the way lightning uses
  929. the x87 stack as a flat register file.
  930. 2013-12-02 Paulo Andrade <pcpa@gnu.org>
  931. * lib/jit_x86-x87.c: Correct wrong code generation due
  932. to comparing the base and not the value register with
  933. %st(0) in stxi_f.
  934. 2013-12-02 Paulo Andrade <pcpa@gnu.org>
  935. * lib/jit_x86-x87.c, lib/jit_x86.c: Use 8 bytes aligned
  936. stack offset for float/double x87 to/from sse move.
  937. 2013-11-27 Paulo Andrade <pcpa@gnu.org>
  938. * configure.ac, lib/jit_arm-swf.c, lib/jit_arm.c: Add
  939. changes that should at least allow building lightning
  940. on Apple iOS7.
  941. 2013-10-08 Paulo Andrade <pcpa@gnu.org>
  942. * lib/jit_ppc-cpu.c: Correct wrong shortcut for ldxi_l with
  943. a zero offset, that was calling ldr_i instead of ldr_l.
  944. 2013-10-08 Paulo Andrade <pcpa@gnu.org>
  945. * include/lightning/jit_arm.h, lib/jit_arm-cpu.c: Do not use
  946. by default load/store instructions that map to ldrt/strt.
  947. There is already the long displacement version for positive
  948. offsets, and when using a (shorter) negative offset it does
  949. not map to ldrt/strt. At least on qemu strt may cause
  950. reproducible, but unexpected SIGILL.
  951. 2013-10-08 Paulo Andrade <pcpa@gnu.org>
  952. * lib/jit_arm-vfp.c: Correct wrong load/store offset
  953. calculation when the displacement is constant but too
  954. large to use an instruction with an immediate offset.
  955. 2013-10-07 Paulo Andrade <pcpa@gnu.org>
  956. * check/self.c: Extend tests to validate jit_callee_save_p
  957. does not cause an assertion on valid arguments, and test
  958. extra registers defined on some backends.
  959. * configure.ac: Do not ignore environment CFLAGS when
  960. checking if need to test runtime configurable options,
  961. like use x87 when sse2 is available, arm instruction set
  962. instead of thumb, etc.
  963. * include/lightning/jit_arm.h: Correct wrong jit_f macro
  964. definition.
  965. * include/lightning/jit_ia64.h, include/lightning/jit_ppc.h:
  966. Correct wrong jit_r macro definition.
  967. * lib/jit_x86-x87.c, lib/jit_x86.c: Actually use the
  968. reserved stack space for integer to/from float conversion.
  969. The stack space was also changed to ensure it is 8 bytes
  970. aligned. Also, for Solaris x86 in 32 bit mode, an alternate
  971. truncr_d was implemented because for some reason it is
  972. failing with SIGILL if using the "fisttpl" instructions,
  973. that must be available on p6 or newer, but for the sake of
  974. making all tests pass, implement a 486 or newer sequence
  975. if "sun" is defined.
  976. 2013-10-03 Paulo Andrade <pcpa@gnu.org>
  977. * include/lightning/jit_mips.h, lib/jit_mips-cpu.c,
  978. lib/jit_mips-sz.c, lib/jit_mips.c, size: Build and
  979. pass all test cases on Irix big endian mips using
  980. the 64 bit abi.
  981. 2013-10-02 Paulo Andrade <pcpa@gnu.org>
  982. * include/lightning/jit_mips.h: Add proper mips abi detection.
  983. 2013-09-30 Paulo Andrade <pcpa@gnu.org>
  984. * lib/jit_print.c: Do not crash if calling jit_print from
  985. gdb before actually emitting code.
  986. * lib/lightning.c: Correct misplaced check for already
  987. visited blocks on conditional branches, what was preventing
  988. proper merge live bit masks of forward blocks.
  989. 2013-09-30 Paulo Andrade <pcpa@gnu.org>
  990. * lib/jit_x86-cpu.c: Correct not properly tested case of using
  991. %r12 as index register, what was causing an invalid assertion.
  992. %r12 is mapped to the "extra" JIT_R3 register, and test cases
  993. only test "standard" lightning registers.
  994. 2013-09-28 Paulo Andrade <pcpa@gnu.org>
  995. * lib/jit_ia64.c: Minor change to force collecting the maximum
  996. instruction length in the --enable-devel-get-jit-size build
  997. mode. The actual generated file did not change because the
  998. sampling was large enough that it had already collected proper
  999. information in the previously slightly buggy code (not forcing
  1000. a sync of the instructions that could be combined).
  1001. 2013-09-27 Paulo Andrade <pcpa@gnu.org>
  1002. * lib/jit_arm.c: Correct build when disassembler is
  1003. disabled.
  1004. 2013-09-25 Paulo Andrade <pcpa@gnu.org>
  1005. * lib/jit_ia64-cpu.c, lib/jit_ia64-fpu.c: Correct some
  1006. off by one range checks (that were only accepting values
  1007. one less than the maximum allowed) and an invalid test
  1008. condition check that was forcing it to always use
  1009. indirect jumps even when reachable with an immediate
  1010. displacement.
  1011. 2013-09-24 Paulo Andrade <pcpa@gnu.org>
  1012. * lib/jit_aarch64-sz.c, lib/jit_arm-sz.c, lib/jit_hppa-sz.c,
  1013. lib/jit_ia64-sz.c, lib/jit_mips-sz.c, lib/jit_ppc-sz.c,
  1014. lib/jit_s390x-sz.c, lib/jit_size.c, lib/jit_sparc-sz.c,
  1015. lib/jit_x86-sz.c: New files implementing static tables
  1016. with longest known instructions length generated to match
  1017. a lightning instruction. These tables should make it easier
  1018. to make it very unlikely to ever miscalculate, or by too
  1019. much, the size of a code buffer.
  1020. * lib/jit_size.c: New file that aids to either collect
  1021. jit code size information, or use the information depending
  1022. on build options.
  1023. * size.c: New helper file that parses input for, and create
  1024. an initial jit_$arch-sz.c file, that needs some minor edit
  1025. for arches with multiple configurations.
  1026. * configure.ac, Makefile.am: Add the new, devel mode only
  1027. --enable-devel-get-jit-size configure option, that sets
  1028. compile time flags to collect jit code size information,
  1029. that will be used as input for the "noinst size program".
  1030. * lib/jit_aarch64.c, lib/jit_arm.c, lib/jit_disasm.c,
  1031. lib/jit_hppa.c, lib/jit_ia64.c, lib/jit_memory.c,
  1032. lib/jit_mips.c, lib/jit_ppc.c, lib/jit_s390x.c,
  1033. lib/jit_sparc.c, lib/jit_x86.c, lib/lightning.c: Minor
  1034. changes for the --enable-devel-get-jit-size build mode,
  1035. as well as the "production build mode" with jit code
  1036. size information.
  1037. 2013-09-14 Paulo Andrade <pcpa@gnu.org>
  1038. * include/lightning.h, lib/lightning.c: Add the new
  1039. jit_pointer_p interface, that returns a boolean value
  1040. telling if the pointer argument is inside the jit
  1041. code buffer. This is useful to avoid the need to add
  1042. extra labels and calls to jit_address to figure bounds
  1043. of code buffer, and still keep internal data private.
  1044. 2013-09-13 Paulo Andrade <pcpa@gnu.org>
  1045. * include/lightning.h, include/lightning/jit_private.h,
  1046. lib/jit_note.c: Change the code argument of jit_get_note
  1047. to a jit_pointer_t and make jit_get_note a public interface.
  1048. It was intended so since start, as a way to map an offset
  1049. in the code to a function name, file name and line number
  1050. mapping.
  1051. 2013-09-11 Paulo Andrade <pcpa@gnu.org>
  1052. * doc/body.texi: Correct reversed arguments in example of
  1053. usage in a (possibly) multi threaded, multiple jit_state_t
  1054. environments.
  1055. * include/lightning/jit_arm.h, include/lightning/jit_private.h,
  1056. lib/jit_arm-cpu.c, lib/jit_arm.c: Make a previously, non
  1057. documented, global state private to the related jit_state_t
  1058. generating code.
  1059. 2013-09-10 Paulo Andrade <pcpa@gnu.org>
  1060. * check/self.c, check/self.ok: New files implementing simple
  1061. consistency check assertions. At first validating some macros
  1062. that use values from different sources agree.
  1063. * check/Makefile.am: Update for the new test case.
  1064. * include/lightning.h, lib/lightning.c: Add the new
  1065. jit_callee_save_p() call, that is intended to be used when
  1066. writing complex code using lightning, so that one does not
  1067. need to verify what backend is being used, or have access to
  1068. private data, to query if a register is callee save or not;
  1069. on several backends the scratch registers are actually callee
  1070. save.
  1071. * include/lightning/jit_aarch64.h, include/lightning/jit_arm.h,
  1072. include/lightning/jit_hppa.h, include/lightning/jit_mips.h,
  1073. include/lightning/jit_ppc.h, include/lightning/jit_sparc.h,
  1074. include/lightning/jit_x86.h: Add an explicit definition for
  1075. JIT_R3-JIT_Rn, JIT_V3-JIT_Vn and JIT_F6-JIT_Fn when applicable.
  1076. This allows one to write code based on "#if defined(JIT_XN)"
  1077. and therefore, not need to check what is the current backend
  1078. or have access to private data structures. This is particularly
  1079. useful when writing virtual machines with several specialized,
  1080. global registers.
  1081. * lib/jit_ia64.c: Properly flag the callee save general
  1082. purpose registers as such, so that jit_callee_save_p() works
  1083. as intended.
  1084. 2013-09-10 Paulo Andrade <pcpa@gnu.org>
  1085. * check/lightning.c, configure.ac: Conditionally use the
  1086. code written to workaround a bug in the Hercules emulator,
  1087. as isnan and isinf are not available at least on HP-UX ia64.
  1088. 2013-09-10 Paulo Andrade <pcpa@gnu.org>
  1089. * lib/jit_s390x-cpu.c: Spill/reload correct callee save
  1090. float registers.
  1091. 2013-09-10 Paulo Andrade <pcpa@gnu.org>
  1092. * lib/jit_hppa-cpu.c: Correct code to call a function stored
  1093. in a register or a patched function address.
  1094. 2013-09-10 Paulo Andrade <pcpa@gnu.org>
  1095. * lib/jit_ia64-cpu.c: Correct incorrect logic when restoring
  1096. the value of the "r2" callee save register.
  1097. 2013-08-29 Paulo Andrade <pcpa@gnu.org>
  1098. * lib/jit_arm-cpu.c, lib/jit_arm.c: Correct wrong test and update
  1099. of the thumb offset information, when checking if needing to
  1100. patch a jump from arm to thumb mode. The problem would happen when
  1101. remapping the code buffer, and the new address being lower than
  1102. the previous one.
  1103. 2013-08-26 Paulo Andrade <pcpa@gnu.org>
  1104. * configure.ac: Extend FreeBSD test to also handle NetBSD.
  1105. * lib/jit_x86-cpu.c: Correct wrongly defined offset type of
  1106. ldxi_ui. Problem detected when building on NetBSD.
  1107. * lib/lightning.c: Adjust code to handle NetBSD mremap,
  1108. where arguments do not match Linux mremap.
  1109. 2013-08-26 Paulo Andrade <pcpa@gnu.org>
  1110. * lib/jit_ppc.c: Correct C sequence point problem miscalculating
  1111. the actual function address in a function descriptor. Problem
  1112. happens with gcc 4.8.1 at least.
  1113. 2013-08-11 Paulo Andrade <pcpa@gnu.org>
  1114. * lib/jit_s390x-cpu.c: Correct code checking if immediate
  1115. fits instruction, but using the negated value.
  1116. 2013-07-28 Paulo Andrade <pcpa@gnu.org>
  1117. * include/lightning/jit_s390x.h, lib/jit_s390x-cpu.c,
  1118. lib/jit_s390x-fpu.c, lib/jit_s390x.c: New files
  1119. implementing the new s390x port.
  1120. * configure.ac, include/lightning.h,
  1121. include/lightning/Makefile.am,
  1122. include/lightning/jit_private.h,
  1123. lib/Makefile.am, lib/jit_disasm.c, lib/lightning.c:
  1124. Minor adaptation for the new s390x backend.
  1125. * check/float.tst: Update for the s390x result of
  1126. truncating +Inf to integer.
  1127. * check/qalu_mul.tst: Add extra test cases to better test
  1128. high word of signed multiplication as the result is
  1129. adjust from unsigned multiplication on s390x.
  1130. 2013-07-28 Paulo Andrade <pcpa@gnu.org>
  1131. * check/lightning.c: Do not assume casting a double NaN or
  1132. Inf to float will produce the expected float NaN or Inf.
  1133. This is not true at least under s390x.
  1134. 2013-07-28 Paulo Andrade <pcpa@gnu.org>
  1135. * check/check.arm.sh, check/check.sh, check/check.swf.sh,
  1136. check/check.x87.sh: Properly check test programs output,
  1137. not just rely on the test program self testing the results
  1138. and not crashing.
  1139. 2013-07-28 Paulo Andrade <pcpa@gnu.org>
  1140. * lib/jit_aarch64.c: Remove unused macros left from cut&paste
  1141. of jit_arm.c.
  1142. 2013-07-16 Paulo Andrade <pcpa@gnu.org>
  1143. * include/lightning/jit_aarch64.h, lib/jit_aarch64-cpu.c,
  1144. lib/jit_aarch64-fpu.c, lib/jit_aarch64.c: New files
  1145. implementing the new aarch64 port, as a new architecture,
  1146. not as an expansion of the existing armv[4-7] port.
  1147. * check/lightning.c: Add aarch64 support and a small
  1148. change to recognize character constants as immediate
  1149. values.
  1150. * check/float.tst: Add aarch64 preprocessor conditionals
  1151. to select proper expected value when converting [+-]Inf
  1152. and NaN to integer.
  1153. * include/lightning/jit_arm.h, lib/jit_arm.c: Minor changes
  1154. to better match the new aarch64 files.
  1155. * configure.ac, include/lightning.h,
  1156. include/lightning/Makefile.am, include/lightning/jit_private.h,
  1157. lib/Makefile.am, lib/lightning.c: Minor adjustments
  1158. for the aarch64 port.
  1159. 2013-07-08 Paulo Andrade <pcpa@gnu.org>
  1160. * NEWS, THANKS, configure.ac, doc/version.texi: Update for
  1161. the 1.99a second alpha release.
  1162. 2013-06-25 Paulo Andrade <pcpa@gnu.org>
  1163. * lib/jit_mips.c: Correct cut&paste error that caused wrong
  1164. stack offset calculation for double arguments in stack in
  1165. the o32 abi.
  1166. Correct typo in the __LITTLE_ENDIAN macro name, that came
  1167. from cut&paste error in the original typo in lib/jit_ppc.c.
  1168. * lib/jit_ia64.c, lib/jit_ppc.c: Correct typo in the
  1169. __LITTLE_ENDIAN macro name.
  1170. 2013-06-22 Paulo Andrade <pcpa@gnu.org>
  1171. * check/lightning.c, configure.ac, include/lightning.h,
  1172. lib/lightning.c: Add tests and quirks to build/detect
  1173. and/or work on Irix.
  1174. * include/lightning/jit_mips.h, lib/jit_mips-cpu.c,
  1175. lib/jit_mips-fpu.c, lib/jit_mips.c: Adapt code to run
  1176. in big endian mips, using the n32 abi.
  1177. 2013-06-18 Paulo Andrade <pcpa@gnu.org>
  1178. * include/lightning.h: Minor extra preprocessor testing
  1179. to "detect" byte order on x86 solaris, that now builds
  1180. and pass all test cases.
  1181. 2013-06-18 Paulo Andrade <pcpa@gnu.org>
  1182. * lib/jit_sparc-cpu.c: Correct compiler warning of value
  1183. used before assignment. The usage is bogus as the api
  1184. requires always patching jumps, but the random value used
  1185. could cause an assertion due to invalid displacement.
  1186. * lib/jit_sparc.c: Always load and store double arguments
  1187. in stack as 2 float loads or stores, for safety, as unaligned
  1188. access is not allowed in Sparc Solaris.
  1189. 2013-06-14 Paulo Andrade <pcpa@gnu.org>
  1190. * configure.ac: Force -mlp64 to CFLAGS on HP-UX ia64 port.
  1191. It is the only supported mode, and expects gcc as C compiler.
  1192. * include/lightning.h, lib/jit_ia64-cpu.c, lib/jit_ia64.c:
  1193. Correct ia64 port to work on HP-UX that runs it in big endian
  1194. mode.
  1195. 2013-06-10 Paulo Andrade <pcpa@gnu.org>
  1196. * lib/jit_hppa.c: Sanitize the cache synchronization inline
  1197. assembly code that was doing twice the work and redundantly
  1198. flushing the end address every loop iteration.
  1199. 2013-06-09 Paulo Andrade <pcpa@gnu.org>
  1200. * configure.ac, check/Makefile.am, doc/Makefile.am: Do not
  1201. explicitly link to -ldl, but instead autodetect the library
  1202. with dlopen, dlsym, etc.
  1203. * check/lightning.c: Add workaround to apparently buggy
  1204. getopt in HP-UX that sets optind to the wrong index, and
  1205. use RTLD_NEXT on HP-UX instead of RTLD_DEFAULT to dlsym
  1206. global symbols.
  1207. * include/lightning.h: Rework definitions of wordsize and
  1208. byte order to detect proper values on HP-UX.
  1209. * lib/lightning.c: Minor correction to use MAP_ANONYMOUS
  1210. instead of MAP_ANON on HP-UX.
  1211. * lib/jit_hppa.c: Float arguments must be passed on integer
  1212. registers on HP-UX, not only for varargs functions.
  1213. Add code to properly clear instruction cache. This was
  1214. not required on Debian hppa port, but may have been working
  1215. by accident.
  1216. * lib/jit_hppa-cpu.c: Follow pattern of HP-UX binaries and
  1217. use bve,n instead of bv,n to return from functions.
  1218. * lib/jit_hppa-fpu.c: For some reason "fst? frX,rX,(rY)" did
  1219. not work on the tested computer (HP-UX B.11.23 U 9000/785 HP-UX)
  1220. so the code was changed, at first for __hpux only to add the
  1221. base and offset register and use the instruction with an
  1222. immediate (zero) offset.
  1223. 2013-06-07 Paulo Andrade <pcpa@gnu.org>
  1224. * check/lightning.c, lib/jit_disasm.c, lib/jit_ppc-cpu.c,
  1225. lib/jit_ppc-fpu.c, lib/jit_ppc.c, include/lightning.h,
  1226. include/lightning/jit_ppc.h, include/lightning/jit_private.h:
  1227. Adapt code to work on 32 bit AIX ppc using gcc. Most changes
  1228. are basically to adapt the elf64 logic to 32 bit, as it does
  1229. not use the same convention of 32 bit Darwin ppc.
  1230. * check/stack.tst: Add a fake memcpy function to the test
  1231. case if running under AIX, as it is not available to dlsym.
  1232. * configure.ac: Check for getopt.h header, not available in
  1233. AIX.
  1234. 2013-06-01 Paulo Andrade <pcpa@gnu.org>
  1235. * include/lightning/jit_hppa.h, lib/jit_hppa-cpu.c,
  1236. lib/jit_hppa-fpu.c, lib/jit_hppa.c: New files implementing
  1237. the hppa port. Built on Debian Linux PA-RISC 2.0, 32 bit.
  1238. * check/float.tst: Add preprocessor for hppa expected
  1239. values when converting NaN and +-Inf to an integer.
  1240. * check/ldst.inc: Ensure double load/store tests use an
  1241. 8 byte aligned address by default.
  1242. * lib/lightning.c: Correct a bug found during tests in
  1243. the new port, where qmul* and qdiv* were not properly
  1244. setting one of the result registers as modified in the
  1245. function, what would be a problem if the only "write"
  1246. usage were the qmul* or qdiv*.
  1247. * check/varargs.tst, check/varargs.ok: Add one extra
  1248. interleaved integer/double test to validate proper code
  1249. generation in the extra case.
  1250. * check/lightning.c, configure.ac, include/lightning.h,
  1251. include/lightning/Makefile.am,
  1252. include/lightning/jit_private.h, lib/Makefile.am,
  1253. lib/jit_disasm.c: Update for the hppa port.
  1254. 2013-04-27 Paulo Andrade <pcpa@gnu.org>
  1255. * check/varargs.tst: Correct misplaced .align directive
  1256. that was causing the double buffer to not be aligned at
  1257. 8 bytes.
  1258. * lib/jit_ia64-cpu.c:
  1259. Properly implement abi for excess arguments passed on
  1260. stack.
  1261. Simplify load/store with immediate displacement argument
  1262. with zero value.
  1263. Simplify some calls to "subi" changing to "addi" with
  1264. a negative argument.
  1265. Remove some #if 0'ed code, that could be useful in
  1266. special conditions, but the most useful one would be
  1267. to "optimize" "static" jit functions, but for the sake
  1268. of simplicity, jit functions are implemented in a way
  1269. that can be passed back to C code as C function pointers.
  1270. Add an attribute to prototypes of several unused functions.
  1271. These functions are defined for the sake of implementing all
  1272. Itanium documented instructions, but a significant amount of
  1273. them is not used by lightning.
  1274. * lib/jit_ia64-fpu.c: Simplify load/store with zero immediate
  1275. displacement and add unused attribute for functions not used
  1276. by lightning, but required to provide macros implementing all
  1277. Itanium documented instructions.
  1278. * lib/jit_ia64.c: Update for the properly implemented abi
  1279. for stack arguments.
  1280. * lib/lightning.c: Mark an unused function as such.
  1281. 2013-04-27 Paulo Andrade <pcpa@gnu.org>
  1282. lib/jit_ia64-cpu.c:
  1283. Correct immediate range check of integer comparisons when
  1284. inverting arguments.
  1285. Correct gei_u that was not decrementing immediate when
  1286. inverting arguments.
  1287. Correct b?add* and b?sub* that were not properly updating
  1288. the result register.
  1289. 2013-04-27 Paulo Andrade <pcpa@gnu.org>
  1290. * lib/jit_ia64-cpu.c: Correct wrong mapping of 2 instructions
  1291. in "M-, stop, M-, stop" translation, that was ignoring the
  1292. last stop (implemented as a nop I- stop).
  1293. * lib/jit_ia64-fpu.c: Properly implement fnorm.s and fnorm.d,
  1294. as well as the proper integer to float or double conversion.
  1295. 2013-04-27 Paulo Andrade <pcpa@gnu.org>
  1296. * lib/jit_ia64-cpu.c: Correct bogus implementation of ldr_T
  1297. for signed integers, that was using ld1.s, ld2.s and ld4.s.
  1298. The ".s" stands for speculative load, not sign extend.
  1299. * lib/jit_ia64-fpu.c: Correct bogus implementation of ldxr_T
  1300. for float and double. The third (actually, second) argument
  1301. is indeed added to the base register, but the base register
  1302. is modified. The actual M7 implementation was already correct,
  1303. just the ldxr_f and ldxr_d implementation that was kept in
  1304. a prototype state, misinterpreting what M7 does.
  1305. 2013-04-27 Paulo Andrade <pcpa@gnu.org>
  1306. * lib/jit_ia64-cpu.c: Correct X2 pattern matching by preventing
  1307. it to attempt to require a stop between the L and the X
  1308. instruction; that is, check the registers and predicates
  1309. before emitting the L instruction, not after.
  1310. * lib/jit_ia64-fpu.c: Slightly simplify and correct
  1311. divr_f and divrd_d implementation.
  1312. * check/lightning.c: Add __ia64__ preprocessor define
  1313. on Itanium.
  1314. * check/alu.inc, check/clobber.tst, check/float.tst: Define
  1315. several macros conditionally to __ia64__. This is required
  1316. because __ia64__ jit generation can use way too many memory,
  1317. due to not implementing instruction reordering to avoid
  1318. as much as possible "stops", what causes way too many nops
  1319. to be generated, as well as the fact that division and
  1320. remainder requires function calls, and float division
  1321. requires significant code to implement.
  1322. 2013-04-27 Paulo Andrade <pcpa@gnu.org>
  1323. * include/lightning.h: Add new backend specific movr_w_d,
  1324. movr_d_w and movi_d_w codes as helpers to ia64 varargs
  1325. functions arguments.
  1326. * lib/jit_ia64-cpu.c:
  1327. Correct wrong encoding of A5 small integers.
  1328. Correct define of "mux" instruction modifiers.
  1329. Correct ordering of arguments and predicates of cmp_xy
  1330. implementation with immediate arguments; like most other
  1331. codes with an immediate, the immediate is the second, not
  1332. the third argument.
  1333. * lib/jit_ia64-fpu.c: Actual implementation of the code
  1334. to move to/from gpr to/from fpr, to implement varargs abi.
  1335. * lib/jit_ia64.c: Make fpr argument registers not allocatable
  1336. as temporaries, no need for the extra checks when there are
  1337. plenty registers.
  1338. * lib/jit_print.c, lib/lightning.c: Minor updates for the
  1339. new movr_w_d, movr_d_w and movi_d_w codes.
  1340. 2013-04-26 Paulo Andrade <pcpa@gnu.org>
  1341. * lib/jit_ia64-cpu.c, lib/jit_ia64-fpu.c: Correct code to
  1342. also insert a stop to break an instruction group if a
  1343. register is written more than once in the same group.
  1344. This may happen if a register is argument and result of
  1345. some lightning call (not a real instruction). The most
  1346. common case should be code in the pattern:
  1347. movl rn=largenum
  1348. ...
  1349. mov rn=smallnum
  1350. where "rn" would end up holding "largenum".
  1351. But the problem possibly could happen in other circumstances.
  1352. 2013-04-26 Paulo Andrade <pcpa@gnu.org>
  1353. * include/lightning/jit_ia64.h, lib/jit_ia64-cpu.c,
  1354. lib/jit_ia64-fpu.c, lib/jit_ia64.c:
  1355. Relocate JIT_Rn registers to the local registers, as, like
  1356. float registers, div/rem and sqrt are implemented as function
  1357. calls, and may overwrite non saved scratch registers.
  1358. Change patch_at to receive a jit_code_t instead of a
  1359. jit_node_t, so that it is easier to "inline" patches when
  1360. some instruction requires complex code to implement, e.g.
  1361. uneq and ltgt.
  1362. Correct arguments to FMA and FMA like instructions that,
  1363. due to a cut&paste error were passing the wrong argument
  1364. to the related F- implementation function.
  1365. Rewrite ltgt to return the proper result if one (or both)
  1366. of the arguments is unordered.
  1367. 2013-04-26 Paulo Andrade <pcpa@gnu.org>
  1368. * include/lightning/jit_ia64.h, include/lightning/jit_private.h,
  1369. lib/jit_ia64-cpu.c, lib/jit_ia64-fpu.c, lib/jit_ia64.c,
  1370. lib/lightning.c: Rework code to detect need of a "stop" to
  1371. also handle predicates, as if a predicate is written, it
  1372. cannot be read in the same instruction group.
  1373. Use a single jit_regset_t variable for all registers when
  1374. checking need for a stop (increment value by 128 for
  1375. float registers).
  1376. Correct wrong "subi" implementation, as the code executed
  1377. is r0=im-r1, not r0=r1-im.
  1378. Use standard lightning 6 fpr registers, and rework to
  1379. use callee save float registers, that may be spill/reloaded
  1380. in prolog/epilog. This is required because some jit
  1381. instructions implementations need to call functions; currently
  1382. integer div/mod and float sqrt, what may change the value of
  1383. scratch float registers.
  1384. Rework point of "sync" of branches that need to return a
  1385. patch'able address, because the need for a "stop" before a
  1386. predicate read causes all branches to be the instruction
  1387. in slot 0, as there is no template to "stop" and branch
  1388. in the same instruction "bundle".
  1389. 2013-04-25 Paulo Andrade <pcpa@gnu.org>
  1390. * include/lightning/jit_ia64.h, lib/jit_ia64-cpu.c,
  1391. lib/jit_ia64-fpu.c, lib/jit_ia64.c: New files implementing
  1392. the basic infrastructure of an Itanium port. The code
  1393. compiles and can generate jit for basic hello world like
  1394. functions.
  1395. * check/lightning.c, configure.ac, include/lightning.h,
  1396. include/lightning/Makefile.am, include/lightning/jit_private.h,
  1397. lib/Makefile.am, lib/lightning.c: Update for the Itanium
  1398. port.
  1399. * lib/jit_mips-cpu.c, lib/jit_mips.c: Correct typo and
  1400. make the jit_carry register local to the jit_state_t.
  1401. This matches code reviewed in the Itanium port, that
  1402. should use the same base logic to handle carry/borrow.
  1403. 2013-04-10 Paulo Andrade <pcpa@gnu.org>
  1404. * include/lightning/jit_private.h, lib/jit_arm.c,
  1405. lib/jit_mips-cpu.c, lib/jit_mips.c, lib/jit_ppc-cpu.c,
  1406. lib/jit_ppc.c, lib/jit_print.c, lib/jit_sparc-cpu.c,
  1407. lib/jit_sparc.c, lib/jit_x86-cpu.c, lib/jit_x86.c,
  1408. lib/lightning.c: Change all jit_regset macros to take
  1409. a pointer argument, to avoid structure copies when
  1410. adding a port to an architecture with more than 64
  1411. registers.
  1412. 2013-04-08 Paulo Andrade <pcpa@gnu.org>
  1413. * lib/jit_arm.c, lib/jit_ppc.c: Do not rely on __clear_cache
  1414. aligning to the next page boundary the end argument. It may
  1415. actually truncate it.
  1416. 2013-03-29 Paulo Andrade <pcpa@gnu.org>
  1417. * include/lightning/jit_private.h, lib/jit_arm.c, lib/jit_memory.c,
  1418. lib/jit_mips.c, lib/jit_ppc.c, lib/jit_sparc.c, lib/jit_x86.c,
  1419. lib/lightning.c: Do not start over jit generation if can grow
  1420. the code buffer with mremap without moving the base pointer.
  1421. 2013-03-29 Paulo Andrade <pcpa@gnu.org>
  1422. * lib/jit_memory.c: Implement a simple memory allocation wrapper
  1423. to allow overriding calls to malloc/calloc/realloc/free, as well
  1424. as ensuring all memory containing pointers is zero or points to
  1425. allocated memory.
  1426. * include/lightning.h, include/lightning/jit_private.h: Definitions
  1427. for the memory allocation wrapper.
  1428. * lib/Makefile.am: Update for new jit_memory.c file.
  1429. * lib/jit_arm.c, lib/jit_disasm.c, lib/jit_mips.c, lib/jit_note.c,
  1430. lib/jit_ppc.c, lib/jit_sparc.c, lib/jit_x86.c, lib/lightning.c:
  1431. Use the new memory allocation wrapper code.
  1432. 2013-03-22 Paulo Andrade <pcpa@gnu.org>
  1433. * configure.ac, include/lightning/jit_private.h, lib/lightning.c:
  1434. Remove dependency on gmp. Only a simple bitmap was required, and
  1435. that was not enough reason to force linking to gmp and possible
  1436. complications caused by it.
  1437. 2013-03-10 Paulo Andrade <pcpa@gnu.org>
  1438. * include/lightning.h: Add check for __powerpc__ defined
  1439. in Linux, while Darwin defines __ppc__.
  1440. * include/lightning/jit_ppc.h: Adjust register definitions
  1441. for Darwin 32 bit and Linux 64 bit ppc usage and/or ABI.
  1442. * include/lightning/jit_private.h: Add proper check for
  1443. Linux __powerpc__ and an data definition for an workaround
  1444. to properly handle code that starts with a jump to a "main"
  1445. label.
  1446. * lib/jit_disasm.c: Add extra disassembler initialization
  1447. for __powerpc64__.
  1448. * lib/jit_ppc-cpu.c: Add extra macros and functions, and
  1449. correct/adapt previous ones to handle powerpc64.
  1450. * lib/jit_ppc-fpu.c: Adapt for 64 bit wordsize. Basically
  1451. add conversion from/to int32/int64 and proper handling of
  1452. load/store offsets too large for 32 bit.
  1453. * lib/jit_ppc.c: Add calls to 64 bit codes and adaptation
  1454. for the PowerPC 64 bit Linux ABI.
  1455. * lib/jit_arm.c, lib/jit_mips.c, lib/jit_sparc, lib/jit_x86.c,
  1456. lib/lightning.c: Correct off by one error when restarting jit
  1457. of a function due to finding too late that needs to spill/reload
  1458. some register. Problem was found by accident on a very special
  1459. condition during PowerPC 64 code adaptation.
  1460. 2013-03-08 Paulo Andrade <pcpa@gnu.org>
  1461. * check/lightning.c: Add missing ppc preprocessor definition.
  1462. 2013-03-06 Paulo Andrade <pcpa@gnu.org>
  1463. * check/float.tst: Comment out the int to negative infinity
  1464. test in mips for the moment because not all Loongson agrees
  1465. on the result.
  1466. * lib/jit_disasm.c: Add a test instead of an assertion
  1467. when loading symbols for disassembly due to a failure with
  1468. a simple binutils build in Debian mipsel64.
  1469. 2013-03-06 Paulo Andrade <pcpa@gnu.org>
  1470. * include/lightning/jit_private.h, lib/jit_arm-cpu.c,
  1471. lib/jit_arm.c, lib/jit_disasm.c, lib/jit_mips-cpu.c,
  1472. lib/jit_mips.c, lib/jit_note.c, lib/jit_ppc-cpu.c,
  1473. lib/jit_ppc.c, lib/jit_print.c, lib/jit_sparc-cpu.c,
  1474. lib/jit_sparc.c, lib/jit_x86-cpu.c, lib/jit_x86.c,
  1475. lib/lightning.c: Add an extra structure for data storage
  1476. during jit generation, and release it after generating
  1477. jit, to reduce a bit memory usage, and also to make it
  1478. easier to understand what data is available during
  1479. jit runtime.
  1480. 2013-03-06 Paulo Andrade <pcpa@gnu.org>
  1481. * lib/lightning.c: Make data and code buffer readonly.
  1482. 2013-02-20 Paulo Andrade <pcpa@gnu.org>
  1483. * doc/body.texi: Fool proof validate the examples of what
  1484. an assembly-language programmer would write and correct the
  1485. wrong sparc example.
  1486. 2013-02-19 Paulo Andrade <pcpa@gnu.org>
  1487. * doc/body.texi: Add back the SPARC code generation example.
  1488. 2013-02-19 Paulo Andrade <pcpa@gnu.org>
  1489. * check/lightning.c: Remove state flag to work with partial
  1490. sparc port, by just disassembling if there was incomplete
  1491. code generation.
  1492. * jit_sparc-cpu.c: Correct wrong range check for immediate
  1493. integer constants (off by one bit shift).
  1494. Correct macro implementing equivalent "rd %y, rd" assembly.
  1495. Implement qmul* and qdiv*.
  1496. * jit_sparc.c: Update for qmul* and qdiv* and remove logic
  1497. to handle incomplete code generation during sparc port.
  1498. 2013-02-18 Paulo Andrade <pcpa@gnu.org>
  1499. * check/float.tst: Add sparc to list of known NaN and +-Inf
  1500. to integer conversion.
  1501. * check/lightning.c: Define __sparc__ to preprocessor in
  1502. the sparc backend.
  1503. * include/lightning/jit_private.h: Correct wrong definition
  1504. of emit_stxi_d, that has lived for a long time, but would
  1505. cause problems whenever needing to spill/reload a float
  1506. register.
  1507. * include/lightning/jit_sparc.h: Can only use %g2,%g3,%g4
  1508. for scratch variables, as other "global" registers are
  1509. reserved for the system, e.g. libc.
  1510. Reorder float register naming to make it easier to
  1511. access odd float registers, so that generating code for
  1512. pusharg and getarg is easier for the IR.
  1513. * lib/jit_mips-cpu.c, lib/jit_ppc-cpu.c: Update to match
  1514. new code in jit_sparc-cpu.c. It must call jit_get_reg
  1515. with jit_class_nospill if using the register to move
  1516. an unconditional branch address to it, as the reload
  1517. will not happen (actually could happen in the delay
  1518. slot...)
  1519. * lib/jit_sparc-cpu.c: Correct wrong macro definition for
  1520. ldxr_s.
  1521. Properly implement div* and implement rem. Div* needs
  1522. to use the y register, and rem* needs to be synthesized.
  1523. Correct b?sub* macro definitions.
  1524. * lib/jit_sparc-fpu.c: Correct reversed float to/from double
  1525. conversion.
  1526. Correct wrong jit_get_reg call asking for a gpr and then
  1527. using the fpr with that number.
  1528. Correct wrong branch displacement computation for
  1529. conditional branches.
  1530. * lib/jit_sparc.c: Correct getarg_d and pushargi_d implementation.
  1531. Add rem* entries to the switch converting IR to machine code.
  1532. * lib/lightning.c: Correct a problem detected when adding
  1533. the jit_class_nospill flag to jit_get_reg, that was caused
  1534. when having a branch to an "epilog" node, what would cause
  1535. the code to think all registers in unknown state were live,
  1536. while in truth, all registers in unknown state in the
  1537. "just after return" point are actually dead.
  1538. 2013-02-17 Paulo Andrade <pcpa@gnu.org>
  1539. * include/lightning/jit_sparc.h, lib/jit_sparc-cpu.c,
  1540. lib/jit_sparc-fpu.c, lib/jit_sparc.c: New files implementing
  1541. the basic framework of the sparc port.
  1542. * configure.ac, include/lightning.h, include/lightning/Makefile.am,
  1543. include/lightning/jit_private.h, lib/jit_disasm.c: Update
  1544. for the sparc port framework.
  1545. * lib/jit_mips.c: Correct reversed retr/reti logic.
  1546. * lib/jit_ppc.c: Correct misspelled __LITTLE_ENDIAN.
  1547. * lib/lightning.c: Always do byte hashing in hash_data, because
  1548. the logic to "compress" strings causes large pointers to not
  1549. be guaranteed aligned at 4 byte boundaries.
  1550. Update for the sparc port framework.
  1551. 2013-02-11 Paulo Andrade <pcpa@gnu.org>
  1552. * lib/jit_arm.c: Correct jit_pushargi_f in the arm hardfp abi.
  1553. Most of the logic uses even numbered register numbers, so that
  1554. a float and a double can be used in the same register, but
  1555. the abi requires packing the float arguments, so jit_pushargi_f
  1556. needs to allocate a temporary register to modify only the
  1557. proper register argument (or be very smart to push two
  1558. immediate arguments if applicable).
  1559. 2013-02-11 Paulo Andrade <pcpa@gnu.org>
  1560. * include/lightning.h, lib/lightning.c: Implement the new
  1561. jit_clear_state and jit_destroy_state calls. jit_clear_state
  1562. releases all memory not required during jit_execution; that
  1563. is, leaves only the mmap'ed data and code buffers allocated.
  1564. jit_destroy_state releases the mmap'ed buffers as well as
  1565. the jit_state_t object itself, that holds pointers to the
  1566. code and data buffers, as well as annotation pointers (for
  1567. disassembly or backtrace) in the data buffer.
  1568. * lib/jit_note.c: Correct invalid vector offset access.
  1569. * check/ccall.c, check/lightning.c, doc/ifib.c, doc/incr.c,
  1570. doc/printf.c, doc/rfib.c, doc/rpn.c: Use the new jit_clear_state
  1571. and jit_destroy_state calls, to demonstrate the new code to
  1572. release all jit memory.
  1573. * doc/body.texi: Add basic documentation and usage description
  1574. of jit_clear_state and jit_destroy_state.
  1575. 2013-02-11 Paulo Andrade <pcpa@gnu.org>
  1576. * include/lightning/jit_private.h, lib/jit_note.c, lib/lightning.c:
  1577. Store all annotation information in the mmap'ed area reserved for
  1578. read only data. This adds code to not allocate memory for jit_note_t
  1579. objects, and to relocate jit_line_t objects and its contents after
  1580. calculating annotation information. The jit_line_t objects are
  1581. relocated because it is not possible to always calculate before
  1582. hand data layout because note information may be extended or
  1583. redundant entries removed, as well as allowed to be added in
  1584. non sequential order.
  1585. A bug was also corrected in _jit_set_note, that was causing it
  1586. to allocate new jit_line_t objects when not needed. It was still
  1587. working correctly, but allocating way more memory than required.
  1588. 2013-02-05 Paulo Andrade <pcpa@gnu.org>
  1589. *include/lightning.h, lib/lightning.c: Add the new jit_live code
  1590. to explicitly mark a register as live. It is required to avoid
  1591. assuming functions always return a value in the gpr and fpr return
  1592. register, and to avoid the need of some very specialized codes
  1593. that vary too much from backend to backend, to instruct the
  1594. optimization code the return register is live.
  1595. * lib/jit_arm.c, lib/jit_mips.c, lib/jit_ppc.c, lib/jit_print.c,
  1596. lib/jit_x86.c: Update for the new jit_live code.
  1597. * check/ret.ok, check/ret.tst: New files implementing a simple
  1598. test case that would previously fail at least in ix86/x86_64.
  1599. * check/Makefile.am: Update for new "ret" test case.
  1600. 2013-02-05 Paulo Andrade <pcpa@gnu.org>
  1601. * lib/jit_ppc-cpu.c, lib/jit_ppc.c: Validate and correct
  1602. problems in the qmul and qdiv ppc implementation.
  1603. 2013-02-04 Paulo Andrade <pcpa@gnu.org>
  1604. * include/lightning.h, include/lightning/jit_private.h,
  1605. lib/jit_arm-cpu.c, lib/jit_arm.c, lib/jit_mips-cpu.c,
  1606. lib/jit_mips.c, lib/jit_ppc-cpu.c, lib/jit_ppc.c,
  1607. lib/jit_x86-cpu.c, lib/jit_x86.c, lib/lightning.c:
  1608. Implement the new qmul and qdiv instructions that return signed
  1609. and unsigned lo/hi multiplication result and div/rem division result.
  1610. These should be useful for jit translation of code that needs to
  1611. know if a multiplication overflows (no branch opcode added) or if
  1612. a division is exact (easy check if remainder is zero).
  1613. * check/lightning.c, lib/jit_print.c, check/Makefile.am,
  1614. check/all.tst: Update for the new qmul and qdiv instructions.
  1615. * check/qalu.inc, check/qalu_div.ok, check/qalu_div.tst,
  1616. check/qalu_mul.ok, check/qalu_mul.tst: New files implementing
  1617. simple test cases for qmul and qdiv.
  1618. 2013-01-30 Paulo Andrade <pcpa@gnu.org>
  1619. * doc/body.texi: Correct "jmpi" description that incorrectly
  1620. told it was possible to pass any address as jump target. The
  1621. only way to do that is "movi+jmpr".
  1622. 2013-01-30 Paulo Andrade <pcpa@gnu.org>
  1623. * lib/jit_x86-cpu.c: Correct undefined behavior code.
  1624. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56143
  1625. 2013-01-29 Paulo Andrade <pcpa@gnu.org>
  1626. * configure.ac: Use AC_CONFIG_HEADERS instead of AC_CONFIG_HEADER
  1627. to have HAVE_CONFIG_H defined with latest aclocal.
  1628. * include/lightning/jit_private.h, lib/lightning.c: Add new
  1629. abstraction to use an heuristic to calculate amount of space
  1630. required for jit generation, and code to reallocate buffer if
  1631. did miscalculate it.
  1632. * lib/jit_arm.c, lib/jit_mips.c, lib/jit_ppc.c, lib/jit_x86.c:
  1633. Update to use new code to estimate and resize of required buffer
  1634. for jit code.
  1635. * lib/jit_x86-cpu.c: Minor cosmetic change to avoid adding a
  1636. non required rex prefix when calling a function pointer stored
  1637. in a register.
  1638. 2013-01-24 Paulo Andrade <pcpa@gnu.org>
  1639. * check/Makefile.am: "make debug" target should pass only
  1640. the main test tool program as argument for running gdb
  1641. * configure.ac: Add the --enable-assertions options.
  1642. * doc/Makefile.am, doc/body.texi, doc/lightning.texi:
  1643. Major rewrite of the documentation to match the current
  1644. implementation.
  1645. * doc/version.texi: Automatic date update.
  1646. * doc/ifib.c, doc/incr.c, doc/printf.c, doc/rfib.c, doc/rpn.c:
  1647. Implementation of the documentation examples, that are also
  1648. compiled during a normal build.
  1649. * doc/p-lightning.texi, doc/porting.texi, doc/toc.texi,
  1650. doc/u-lightning.texi, doc/using.texi: These files were
  1651. renamed in the documentation rewrite, as the documentation
  1652. was significantly trimmed due to full removal of the porting
  1653. chapters. Better porting documentation should be added but
  1654. for the moment it was just removed the documentation not
  1655. matching the implementation.
  1656. 2013-01-18 Paulo Andrade <pcpa@gnu.org>
  1657. * lib/jit_note.c: Correct bounds check and wrong code keeping
  1658. a pointer that could be changed after a realloc call.
  1659. 2013-01-18 Paulo Andrade <pcpa@gnu.org>
  1660. * check/3to2.tst, check/add.tst, check/allocai.tst, check/bp.tst,
  1661. check/call.tst, check/ccall.c, check/clobber.tst, check/divi.tst,
  1662. check/fib.tst, check/ldsti.tst, check/ldstr-c.tst, check/ldstr.tst,
  1663. check/ldstxi-c.tst, check/ldstxi.tst, check/ldstxr-c.tst,
  1664. check/ldstxr.tst, check/lightning.c, check/rpn.tst, check/stack.tst,
  1665. check/varargs.tst, include/lightning.h,
  1666. include/lightning/jit_private.h, lib/jit_arm.c, lib/jit_disasm.c,
  1667. lib/jit_mips.c, lib/jit_note.c, lib/jit_ppc.c, lib/jit_print.c,
  1668. lib/jit_x86.c, lib/lightning.c: Extend the "jit_note" abstraction
  1669. with the new "jit_name" call, that receives a string argument, and
  1670. should usually be called to mark boundaries of functions of code
  1671. generating jit (that is, it is not expected that the language
  1672. generating jit map its functions to jit functions).
  1673. 2013-01-17 Paulo Andrade <pcpa@gnu.org>
  1674. * check/add.tst, check/allocai.tst, check/bp.tst, check/divi.tst,
  1675. check/fib.tst, check/lightning.c, include/lightning/jit_arm.h,
  1676. include/lightning/jit_mips.h, include/lightning/jit_ppc.h,
  1677. include/lightning/jit_private.h, include/lightning/jit_x86.h:
  1678. Make JIT_RET, JIT_FRET and JIT_SP private. These should not be
  1679. used in any operations due to frequently having special
  1680. constraints (usually JIT_FRET). JIT_FP must be made available
  1681. because it must be used as the base register to access stack
  1682. space allocated with jit_allocai.
  1683. 2013-01-14 Paulo Andrade <pcpa@gnu.org>
  1684. * include/lightning.h, lib/lightning.c: Add an extra align
  1685. argument to the jit_data call (that should be made private),
  1686. so that it should not align strings at 8 bytes.
  1687. Correct the jit_note call to include the null ending byte
  1688. when adding label/note names to the "jit data section".
  1689. 2013-01-11 Paulo Andrade <pcpa@gnu.org>
  1690. * lib/jit_note.c: New file implementing a simple string+integer
  1691. annotation, that should be used to map filename and line number
  1692. to offsets in the generated jit.
  1693. * include/lightning.h, lib/lightning.c: Update for the new
  1694. note code.
  1695. Add an extra mandatory argument to init_jit, that is used
  1696. as argument to bfd_openr.
  1697. Change from generic void* to char* the argument to jit_note
  1698. and add an extra integer argument, to map to filename and
  1699. line number.
  1700. * check/ccall.c, check/lightning.c, include/lightning/jit_private.h,
  1701. lib/jit_arm.c, lib/jit_disasm.c, lib/jit_mips.c, lib/jit_ppc.c,
  1702. lib/jit_print.c, lib/jit_x86.c: lib/Makefile.am: Update for the
  1703. new annotation code.
  1704. * configure.ac, check/Makefile.am: Update to work with latest
  1705. automake.
  1706. 2013-01-09 Paulo Andrade <pcpa@gnu.org>
  1707. * include/lightning.h, lib/jit_arm.c, jit_mips-fpu.c,
  1708. lib/jit_mips.c, lib/jit_print.c, lib/jit_x86.c, lib/lightning.c:
  1709. Remove the jit_code_getarg_{f,d} and jit_code_pusharg{i,r}_{f,d}
  1710. calls, replacing them with the new, internal only, jit_movr_w_f,
  1711. jit_mov{r,i}_f_w, jit_movr_ww_d, and jit_mov{i,r}_d_ww, that
  1712. better describe the operation being done, and allow removing
  1713. the hackish code to detect special conditions for arm when
  1714. moving from/to vfp from/to a grp register pair.
  1715. Rename jit_code_retval_{f,d} to jit_code_x86_retval_{f,d} as
  1716. it is specific to 32 bit x86, and used to move abi return
  1717. value in x87 register to a sse register.
  1718. 2013-01-05 Paulo Andrade <pcpa@gnu.org>
  1719. * check/cccall.c, check/ccall.ok: New test case to validate
  1720. interleaved calls from/to C code and jit.
  1721. * check/Makefile.am: Update for the new ccall test case.
  1722. * include/lightning.h, lib/lightning.c: Add the new jit_address
  1723. call that returns the real/final address of a "note" in the
  1724. generated jit. It requires a jit_node_t as returned by the
  1725. jit_note call, and is only valid after calling jit_emit.
  1726. Add an intermediate solution to properly handle arm
  1727. soft and softfp modes that move a double to an integer register
  1728. pair. Currently it just adds extra tests for the condition,
  1729. but the proper solution should be to have extra lightning
  1730. codes for these conditions, codes which should be only used
  1731. by the backends that need it, and merged with the existing
  1732. jit_pusharg*_{f,d}.
  1733. * include/lightning/jit_private.h: Add new jit_state_t flag
  1734. to know it finished jit_emit, so that calls to jit_address
  1735. are valid.
  1736. * lib/jit_mips.c: Correct abi implementation so that the
  1737. new ccall test case pass. Major problem was using
  1738. _jit->function.self.arg{i,f} as boolean values, but that
  1739. would cause lightning.c:patch_registers() to incorrectly
  1740. assume only one register was used as argument when calling
  1741. jit_regarg_p(); _jit->function.self.arg{i,f} must be the
  1742. number of registers used as arguments (in all backends).
  1743. * lib/jit_x86.c: Add workaround, by marking %rax as used,
  1744. to a special condition, when running out of registers and the
  1745. allocator trying to spill and reload %rax, but %rax was used
  1746. as a pointer to a function, what would cause the reload to
  1747. destroy the return value. This condition can be better
  1748. generalized, but the current solution is good enough.
  1749. * include/lightning/jit_ppc.h, lib/jit_ppc-cpu.c, lib/jit_ppc.c:
  1750. Rewrite logic to handle arguments, as the original code was
  1751. written based on a SysV pdf about the generic powerpc ABI,
  1752. what did "invent" a new abi for the previous test cases, but
  1753. failed in the new ccall test in Darwin PPC. Now it properly
  1754. handles 13 float registers for arguments, as well as proper
  1755. computation of stack offsets when running out of registers
  1756. for arguments.
  1757. 2013-01-02 Paulo Andrade <pcpa@gnu.org>
  1758. * check/float.tst: Correct test case to match ppc also
  1759. converting positive infinity to 0x7fffffff.
  1760. * lib/jit_arm-swf.c: Correct typos with double underscores.
  1761. * lib/lightning.c: Correct remaining wrong reverse jump logic.
  1762. 2012-12-29 Paulo Andrade <pcpa@gnu.org>
  1763. * lib/lightning.c: Correct both, wrong and confusing logic
  1764. to compute the reverse of a jump. Now it properly matches
  1765. C semantics for "eq" (==) and "ne" (!=) and correct computation
  1766. of reverse of "uneq" as "gt".
  1767. * check/branch.tst: Update "ne" float branch check that
  1768. previously happened to be wrongly tested with a NaN argument.
  1769. 2012-12-29 Paulo Andrade <pcpa@gnu.org>
  1770. * check/float.ok, check/float.tst: New test cases implementing
  1771. extensive validation of float comparison and branch code
  1772. generation as well as integer conversion, involving NaN and
  1773. [+-]Inf.
  1774. * lib/jit_arm-swf.c, lib/jit_x86-sse.c, lib/jit_x86-x87.c:
  1775. Correct bugs found by new float test case.
  1776. * lib/jit_x86.c: Correct cut&paste error added in commit to
  1777. convert jit_arg* return value to a jit_node_t*, that would
  1778. cause it to not properly handle double arguments in ix86.
  1779. * check/Makefile.am: Update for the new test case.
  1780. 2012-12-28 Paulo Andrade <pcpa@gnu.org>
  1781. * check/lightning.c, include/lightning.h, lib/jit_arm.c,
  1782. lib/jit_mips.c, lib/jit_ppc.c, lib/jit_print.c, lib/jit_x86.c,
  1783. lib/lightning.c: Change return value of jit_arg{,_f,_d} to
  1784. a jit_node_t* object, that should be used as argument to
  1785. jit_getarg_{c,uc,s,us,i,ui,l,f,d}. This just requires changing
  1786. from jit_int32_t to jit_pointer_t (or jit_node_t*) the "handle"
  1787. for the getarg calls, with the benefit that it makes it easy
  1788. to implement patching of the stack address of non register
  1789. arguments, this way allowing to implement variable size stack
  1790. frames if applicable; useful if there are too many registers and
  1791. jit functions uses only a few callee save registers.
  1792. 2012-12-27 Paulo Andrade <pcpa@gnu.org>
  1793. * lib/jit_arm.c, lib/jit_mips-cpu.c, lib/jit_mips.c: Correct
  1794. regressions when patching jit_calli for a forward function.
  1795. * lib/jit_ppc-cpu.c: Correct wrong arguments to ANDI opcode
  1796. in jit_getarg_u{c,s} implementation.
  1797. 2012-12-23 Paulo Andrade <pcpa@gnu.org>
  1798. * check/call.ok, check/call.tst: New test cases to validate
  1799. simple typed argument and return values in function calls.
  1800. * check/lightning.c: Properly handle jit_movi of labels for
  1801. backward and forward code labels.
  1802. * check/Makefile.am: Update for new test case.
  1803. 2012-12-23 Paulo Andrade <pcpa@gnu.org>
  1804. * check/carry.ok, check/carry.tst: New test case to validate
  1805. carry condition handling.
  1806. * check/Makefile.am: Update for new test case.
  1807. 2012-12-22 Paulo Andrade <pcpa@gnu.org>
  1808. * lib/jit_ppc-cpu.c, lib/jit_ppc.c: Implement logic for
  1809. jit_htonr for big endian, so that ppc (big endian) pass the
  1810. new clobber.tst test case.
  1811. 2012-12-22 Paulo Andrade <pcpa@gnu.org>
  1812. * lib/jit_arm.c: Correct use of wrong argument offset
  1813. variable in armv7l or float/double argument for varargs
  1814. function in armv7hl.
  1815. Correct jit_getarg* logic in software float mode to
  1816. match expected behavior in other backends, that is, if
  1817. a function is not called, it is safe to use a few lightning
  1818. calls before a next jit_getarg* call, as done in the test
  1819. case check/stack.tst. The proper solution should be to
  1820. extend the parser in lib/lightning.c to check if there is
  1821. some float operation that will call some (libgcc?) function,
  1822. but software float arm should be a very uncommon backend for
  1823. lightning, so, just load the already in place arguments
  1824. saved to stack, assuming the register argument was clobbered
  1825. (what should not be the case most times...).
  1826. 2012-12-22 Paulo Andrade <pcpa@gnu.org>
  1827. * check/clobber.ok, check/clobber.tst: New test case doing
  1828. extensive validation tests to ensure registers not used in
  1829. a operation are not clobbered.
  1830. * check/Makefile.am: Update for new test case.
  1831. 2012-12-21 Paulo Andrade <pcpa@gnu.org>
  1832. * lib/lightning.c: Partially rewrite/revert code to compute
  1833. initial register live state at the start of a basic block.
  1834. The original logic was corrupted when adding optimizations
  1835. to do as few computations as possible in jit_update. The
  1836. reglive field must be always a known set of live registers
  1837. at the start of a basic block. The value that was incorrect
  1838. was the regmask field, that must be the set of registers
  1839. that are in unknown state, because they are not known live,
  1840. neither set (or possibly not set) in the basic block, and
  1841. *must* store the state at the start of the basic block.
  1842. 2012-12-20 Paulo Andrade <pcpa@gnu.org>
  1843. * include/lightning/jit_ppc.h: Correct mismatch of JIT_F{1,5}
  1844. with enum codes, that were correct, and returned by jit_f().
  1845. * lib/jit_ppc-cpu.c, lib/jit_ppc-fpu.c, lib/jit_ppc.c: Properly
  1846. implement and better describe values when generating stack
  1847. frames.
  1848. 2012-12-18 Paulo Andrade <pcpa@gnu.org>
  1849. * check/stack.ok, check/stack.tst: New files to test data
  1850. integrity on a deep chain of stack frames.
  1851. * lib/jit_arm.c, lib/jit_arm-cpu.c, lib/jit_mips.c,
  1852. lib/jit_mips-cpu.c, lib/jit_ppc.c, lib/jit_ppc-cpu.c,
  1853. lib/jit_x86.c, lib/jit_x86-cpu.c: Calculate _jit->function->stack
  1854. in the emit stage, otherwise it will calculate it wrong if
  1855. need to jit_allocai space to spill registers.
  1856. * lib/lightning.c: Correct wrong offset when updating the
  1857. "current" jit function pointer in the code that may need to
  1858. allocate stack space to spill registers.
  1859. * check/lightning.c: Correct off by one data space check.
  1860. * check/Makefile.am: Update for new test case.
  1861. 2012-12-17 Paulo Andrade <pcpa@gnu.org>
  1862. * check/fop_abs.ok, check/fop_abs.tst, check/fop_sqrt.ok,
  1863. check/fop_sqrt.tst: New files implementing simple test cases
  1864. for the extra float operations.
  1865. * check/Makefile.am: Update for new test cases.
  1866. * check/alu.inc: Add an extra macro to check for unordered
  1867. equality on tests where it is expected to use NaN as an
  1868. argument.
  1869. * check/lightning.c: Minor change for proper/common argument
  1870. syntax handling ommiting arguments to options.
  1871. 2012-12-17 Paulo Andrade <pcpa@gnu.org>
  1872. * check/Makefile.am: Automatically generate pattern list
  1873. of tests with alternate jit generation options. This should
  1874. prevent typos and needing to change multiple places after
  1875. a change.
  1876. 2012-12-14 Paulo Andrade <pcpa@gnu.org>
  1877. * check/lightning.c: Remove the ".cpu name value" syntax,
  1878. as it was not able to do proper changes before the jit
  1879. internal data structure was initialized. Now it supports
  1880. several getopt options to force using different jit
  1881. generation options, effectively replacing the previous
  1882. syntax.
  1883. * check/run-test: Add simple extra logic to handle differently
  1884. named test scripts, used to test things like x87 coprocessor
  1885. in ix86, and arm instruction set or software float in armv7l.
  1886. * configure.ac: Add some AC_RUN_IFELSE calls to figure at
  1887. compile time if can test different code generation options,
  1888. and update Makefile generation accordingly.
  1889. * check/Makefile.am, lib/jit_arm.c, lib/jit_x86.c: Update to
  1890. properly work with the test tool updating the jit_cpu global
  1891. information.
  1892. * check/check.arm.sh, check/check.swf.sh, check/check.x87.sh:
  1893. New wrapper files passing -mthumb=0, mvfp=0 and -mx87=1 to
  1894. the test tool, if applicable, so that it can validate alternate
  1895. code generation options on test hosts that support them.
  1896. 2012-12-14 Paulo Andrade <pcpa@gnu.org>
  1897. * lib/jit_x86-x87.c, lib/jit_x86.c: Correct test cases in ix86
  1898. when using the x87 coprocessor instead of sse2+.
  1899. 2012-12-14 Paulo Andrade <pcpa@gnu.org>
  1900. * include/lightning.h, include/lightning/jit_private.h,
  1901. lib/jit_arm.c, lib/jit_mips.c, lib/jit_ppc.c, lib/jit_x86.c,
  1902. lib/lightning.c: Make jit_ellipsis implementation not
  1903. backend specific. It is not intended to handle va_list
  1904. like objects at runtime, as jit_arg* and jit_getarg*
  1905. return constant values resolved at parse time, so, effectively
  1906. it is not possible to create printf like jit functions, as
  1907. there is no va_start, va_arg, va_end, etc, abstraction. This
  1908. limitation should be kept for the sake of making new ports
  1909. easier.
  1910. 2012-12-14 Paulo Andrade <pcpa@gnu.org>
  1911. * include/lightning.h, lib/lightning.c: Add two extra wrapper
  1912. functions to avoid need for excess pointer to/from word casts.
  1913. * check/lightning.c: Only need for pointer to/from word cast
  1914. now is jit_movi, update accordingly.
  1915. 2012-12-13 Paulo Andrade <pcpa@gnu.org>
  1916. * check/varargs.ok, check/varargs.tst: New test cases implementing
  1917. simple varargs calls with a large amount of arguments to exercise
  1918. excess arguments on stack.
  1919. * include/lightning.h: Include config.h if HAVE_CONFIG_H is
  1920. defined.
  1921. * lib/jit_arm.c: Allocate a fpr register, not a gpr one for
  1922. temporary when pushing varargs arguments in the stack.
  1923. * lib/jit_arm-swf.c: Correct code changing the wrong offset
  1924. in jit_absr_d and jit_negr_d in software float.
  1925. * lib/jit_mips.c: Correct calculation of offsets of arguments
  1926. on stack.
  1927. * lib/jit_ppc.c: Correct bogus logic for "next" offset of arguments
  1928. on stack and adjust for fixed offset of stack arguments.
  1929. 2012-12-12 Paulo Andrade <pcpa@gnu.org>
  1930. * include/lightning.h, lib/jit_arm.c, lib/jit_mips.c,
  1931. lib/jit_ppc.c, lib/jit_x86.c, lib/lightning.c: Change jit_prepare
  1932. to no longer receive an argument. If receiving an argument, it
  1933. should be an ABI specifier, not a boolean if varargs or not,
  1934. and add the new jit_ellipsis call, to specify where the
  1935. ellipsis is in the C prototype of the function being called.
  1936. Note that currently it is not supported to define varargs
  1937. functions and it will be ignored if calling jit_ellipsis not
  1938. in a prepare/finish* block, but this should be addressed.
  1939. * check/allocai.tst, check/alu_add.tst, check/alu_and.tst,
  1940. check/alu_com.tst, check/alu_div.tst, check/alu_lsh.tst,
  1941. check/alu_mul.tst, check/alu_neg.tst, check/alu_or.tst,
  1942. check/alu_rem.tst, check/alu_rsh.tst, check/alu_sub.tst,
  1943. check/alu_xor.tst, check/alux_add.tst, check/alux_sub.tst,
  1944. check/bp.tst, check/branch.tst, check/cvt.tst, check/divi.tst,
  1945. check/fib.tst, check/ldsti.tst, check/ldstr-c.tst,
  1946. check/ldstr.tst, check/ldstxi-c.tst, check/ldstxi.tst,
  1947. check/ldstxr-c.tst, check/ldstxr.tst, check/rpn.tst,
  1948. check/lightning.c: Update for the change to jit_prepare and
  1949. addition of jit_ellipsis.
  1950. 2012-12-11 Paulo Andrade <pcpa@gnu.org>
  1951. * lib/jit_ppc-cpu.c: Make movr a function that checks arguments
  1952. so that other code can safely assume it is a noop if src and dst
  1953. are the same register.
  1954. Implement rem{r,i}{,_u} as a div{,u}/mul/sub.
  1955. Correct ANDIS, ORIS and XORIS calls to cast the argument to
  1956. unsigned before the shift to avoid an assertion if the argument
  1957. had the topmost bit set.
  1958. Implement lshi, rshi and rshi_u as functions to test for a
  1959. zero argument, that would otherwise trigger an assertion when
  1960. computing the shift value.
  1961. Do a simple implementation of bm{s,c}{r,i} with a temporary,
  1962. "andr" of arguments and jump based on comparison with zero.
  1963. Correct typo in ldxi_c.
  1964. * lib/jit_ppc-fpu.c: Correct wrong arguments to FDIV* and STF*.
  1965. * lib/jit_ppc.c: Correct wrong check for 6 instead of 8 integer
  1966. arguments in registers. If calling a varargs function and
  1967. passing a float or double argument, also either store the
  1968. value in the stack or in integer registers, as varargs functions
  1969. do not fetch it from float registers.
  1970. Add "case" for new functions and incorrectly missing ones.
  1971. Call libgcc's __clear_cache, that should know what to do
  1972. if the hardware needs flushing cache before execution.
  1973. * lib/lightning.c: Do a simple/trivial logic in jit_regset_scan1,
  1974. that should make it easier for the compiler to optimize it, and
  1975. that also corrects the previously wrong code for big endian, and
  1976. that was causing problems in ppc due to not saving all callee save
  1977. registers as it was not "finding" them in the regset due to the
  1978. little endian assumption bug.
  1979. 2012-12-11 Paulo Andrade <pcpa@gnu.org>
  1980. * configure.ac: Only default to using the builtin disassembler
  1981. if on GNU/Linux. This should be temporary, due to requiring
  1982. /proc/self/exe.
  1983. Correctly check $target_cpu for powerpc.
  1984. * include/lightning/jit_ppc.h: Correctly implement jit_v_num.
  1985. * include/lightning/jit_private.h: Declare proper prototype
  1986. for jit_init_debug and jit_finish_debug.
  1987. * lib/jit_ppc-cpu.c: Remove code to save/restore callee save
  1988. float registers, as it is not required since those float
  1989. registers are not usable currently.
  1990. Change prolog and epilog generation to, at least comparing
  1991. code, match what gcc generates in "gcc -O0", but it is still
  1992. failing in Darwin PPC, apparently due to the __clear_cache
  1993. call not being enough, as frequently it will also fail to
  1994. execute, and the code buffer is all zeroes.
  1995. * lib/lightning.c: Do not fail in jit_regset_scan1 calls due
  1996. to passing 64 as argument on computers with 64 registers.
  1997. 2012-12-10 Paulo Andrade <pcpa@gnu.org>
  1998. * lib/jit_mips-cpu.c: Correct all current test cases.
  1999. Call the "xori" not the "XORI" macro for jit_xori implementation,
  2000. as the XORI macro handles only 16 bit unsigned values.
  2001. Call the "movr" macro, not the "movi" macro in the special
  2002. case of adding or subtracting zero.
  2003. Use the proper temporary register in the jit_andr implementation.
  2004. 2012-12-09 Paulo Andrade <pcpa@gnu.org>
  2005. * check/alu.inc, check/alu_add.ok, check/alu_add.tst,
  2006. check/alu_and.ok, check/alu_and.tst, check/alu_com.ok,
  2007. check/alu_com.tst, check/alu_div.ok, check/alu_div.tst,
  2008. check/alu_lsh.ok, check/alu_lsh.tst, check/alu_mul.ok,
  2009. check/alu_mul.tst, check/alu_neg.ok, check/alu_neg.tst,
  2010. check/alu_or.ok, check/alu_or.tst, check/alu_rem.ok,
  2011. check/alu_rem.tst, check/alu_rsh.ok, check/alu_rsh.tst,
  2012. check/alu_sub.ok, check/alu_sub.tst, check/alu_xor.ok,
  2013. check/alu_xor.tst, check/alux_add.ok, check/alux_add.tst,
  2014. check/alux_sub.ok, check/alux_sub.tst, check/branch.ok,
  2015. check/branch.tst: New test cases for arithmetic and branch
  2016. tests.
  2017. * check/Makefile.am: Update for new test cases.
  2018. * include/lightning/jit_private.h: Make the jit_reg_free_p
  2019. macro shared by all backends. Previously was added for the
  2020. arm backend, but is useful in the x86_64 backend when checking
  2021. state of "special purpose register".
  2022. Also add the new jit_class_named register class, that must be
  2023. or'ed with the register value if calling jit_get_reg expecting
  2024. an specific value, because the specific register value may be
  2025. zero, that previously was treated as no register requested.
  2026. * lib/jit_arm-cpu.c: Correct argument order for T2_MVN.
  2027. * lib/jit_arm-swf.c: Call the proper function for double
  2028. divide. The "software float" implementation just calls
  2029. libgcc functions.
  2030. * lib/jit_arm.c: Return float/double values in the float
  2031. register if using the hard float ABI.
  2032. * lib/jit_x86-cpu.c: Change the can_sign_extend_int_p macro
  2033. to not include -0x80000000L, because there is code that
  2034. "abuses" it and thinks it can negate the immediate value
  2035. after calling that macro.
  2036. Correct implementation of jit_subi that had a wrong code
  2037. patch logic doing subtraction with reversed arguments.
  2038. Correct REX prefix calculation in the jit_muli implementation.
  2039. Correct logic to get/unget %*ax and %*dx registers in divremr
  2040. and divremi.
  2041. Correct divremi that was using the symbolic, unique %*ax
  2042. value in on place (not using the _REGNO name suffix).
  2043. Correct cut&paste error causing it to use "xor" instead of
  2044. "or" in one code path of the jit_ori implementation.
  2045. Correct several flaws when clobbering registers and/or when
  2046. one of the arguments was %*cx in the rotshr wrapper function
  2047. implementing most shift operations.
  2048. * lib/lightning.c: No longer expect that the backend be smart
  2049. enough to know what to do when asking for a named register
  2050. if that register is already an argument or is live. It fails
  2051. if it is an argument, or if register is live, fails if cannot
  2052. spill.
  2053. No longer incorrectly assume that eqr_{f,d} and ltgr_{f,d} are
  2054. safe to inverse value tests in jump thread optimization.
  2055. 2012-12-05 Paulo Andrade <pcpa@gnu.org>
  2056. * check/Makefile.am, check/cvt.ok, check/cvt.tst: Add new
  2057. "cvt" test case to test conversion from/to int/float types.
  2058. * check/lightning.c: Only define truncr_{f,d}_l in 64 bit mode.
  2059. * include/lightning.h: Correct typo that caused it to define
  2060. jit_truncr_{f,d}_l in 32 bit mode.
  2061. * lib/jit_arm-cpu.c: Avoid assertion failure in the signed/unsigned
  2062. extend opcodes generation as it shares an interface for 3 argument
  2063. opcode generation.
  2064. * lib/jit_x86-cpu.c: Correct wrong argument passed to
  2065. jit_unget_reg in the andi implementation and wrong byte
  2066. unsigned extend code generation.
  2067. * lib/jit_x86-sse.c: Correct conversion from "word" to float or
  2068. double as is dependent on wordsize.
  2069. 2012-12-05 Paulo Andrade <pcpa@gnu.org>
  2070. * check/ldstr-c.ok, check/ldstr-c.tst, check/ldstxi-c.ok,
  2071. check/ldstxi-c.tst, check/ldstxr-c.ok, check/ldstxr-c.tst:
  2072. New test case files testing load clobbering the base and/or
  2073. index register;
  2074. * check/ldst.inc: New file with common definition for all the
  2075. ldst* test cases.
  2076. check/Makefile.am, check/ldsti.tst, check/ldstr.tst,
  2077. check/ldstxi.tst, check/ldstxr.tst: Update for new common
  2078. definitions file and new register clobber ldst tests.
  2079. 2012-12-05 Paulo Andrade <pcpa@gnu.org>
  2080. * lib/jit_mips-fpu.c: Correct wrong register order in stxr_{f,d}
  2081. in the mips backend.
  2082. 2012-12-05 Paulo Andrade <pcpa@gnu.org>
  2083. * lib/jit_arm-vfp.c: Correct regression found in armv7l with
  2084. latest test cases.
  2085. 2012-12-05 Paulo Andrade <pcpa@gnu.org>
  2086. * check/ldstxi.tst, check/ldstxr.tst: Correct wrong argument
  2087. order for 32 bit mode tests.
  2088. * configure.ac: Correct check for ix86 target_cpu.
  2089. 2012-12-05 Paulo Andrade <pcpa@gnu.org>
  2090. * check/ldstr.ok, check/ldstr.tst, check/ldsti.ok,
  2091. check/ldsti.tst, check/ldstxr.ok, check/ldstxr.tst,
  2092. check/ldstxi.ok, check/ldstxi.tst:
  2093. New test case files exercising a very large amount of
  2094. register combinations to verify load/store implementation.
  2095. * check/Makefile.am: Update for new test cases.
  2096. * lib/jit_x86-cpu.c: Correct wrong argument order when
  2097. computing REX prefix for {ld,st}r_T codes;
  2098. 2012-12-04 Paulo Andrade <pcpa@gnu.org>
  2099. * lib/jit_mips-fpu.c, lib/jit_mips.c: Implement missing mips
  2100. jit_sqrtr_{f,d} codes.
  2101. * check/all.tst, include/lightning.h, lib/jit_print.c: Change
  2102. declaration order and call order in all.tst of {add,sub}c and
  2103. {add,sub}x. *c must be called before to set the carry and *x
  2104. second to use the carry and keep it set. The wrong call order
  2105. was causing all.tst to fail in mips, where a register is
  2106. allocated to keep a global carry state.
  2107. 2012-12-04 Paulo Andrade <pcpa@gnu.org>
  2108. * include/lightning/jit_mips.h, lib/jit_mips-cpu.c,
  2109. lib/jit_mips-fpu.c, lib/jit_mips.c: Correct float/double
  2110. argument handling and make the mips backend pass the initial
  2111. test cases.
  2112. * include/lightning.h, ib/jit_print.c, lib/lightning.c:
  2113. Add extra enum values for argument handling functions that
  2114. could not be abstracted to the current codes, that is, when
  2115. float values need to move from/to gpr from/to fpr. It would
  2116. be more tempting to add such primitives, but they would have
  2117. wordsize limitations, and it is not expected to add codes
  2118. with one gpr argument for 64 bit and two for 32 bit.
  2119. * lib/jit_ppc.c: Check _jit->function before calling jit_epilog()
  2120. to avoid a runtime exception.
  2121. 2012-12-04 Paulo Andrade <pcpa@gnu.org>
  2122. * include/lightning/jit_mips.h, lib/jit_mips.c: Update to
  2123. make the mips backend compile in a qemu image.
  2124. * lib/jit_ppc.c: Minor adaptations to help in having the
  2125. ppc backend compilable.
  2126. 2012-12-03 Paulo Andrade <pcpa@gnu.org>
  2127. * configure.ac, include/lightning/jit_private.h, lib/jit_arm-cpu.c,
  2128. lib/jit_arm-swf.c, lib/jit_arm.c, check/Makefile.am: Correct
  2129. implementation of the arm backend port to build and pass the
  2130. current test cases. Tested on armv7 with softfp abi.
  2131. * lib/jit_disasm.c: Rename and change prototype of static
  2132. disassemble function as in the arm backend it is required
  2133. to access state information stored in the jit_state_t object.
  2134. * check/3to2.tst, check/add.tst: Correct test case code assuming
  2135. JIT_RO and JIT_RET are the same, and even if they are the same,
  2136. the logic was incorrect because it must always call jit_retval*
  2137. to fetch a function call return before any other instruction.
  2138. The arm backend hash a special condition if jit_retval is not
  2139. called, because "r0" is not JIT_R0, but is JIT_RET and *also*
  2140. the first argument for a called function, so JIT_RET must be
  2141. only used as an argument to jit_retval.
  2142. 2012-12-03 Paulo Andrade <pcpa@gnu.org>
  2143. * check/all.tst, check/lightning.c: Only declare or use 64 bit
  2144. interfaces on 64 bit builds.
  2145. * check/fib.tst: Use simpler logic to not need preprocessor
  2146. conditionals for 32 or 64 bit.
  2147. * include/lightning.h: Only declare 64 bit macros on a 64 bit
  2148. build. Code using lightning must know about wordsize and the
  2149. jit generation limitations, also, this way it generates a
  2150. compile time failure, not a runtime assertion.
  2151. * include/lightning/jit_x86.h: Correct typo in macro name.
  2152. * lib/jit_arm.c, lib/jit_arm-cpu.c, lib/jit_mips.c,
  2153. lib/jit_mips-cpu.c, lib/jit_ppc.c, lib/jit_ppc-cpu.c,
  2154. lib/jit_x86.c, lib/jit_x86-cpu.c: Correct wrong code to get
  2155. current jit function pointer.
  2156. * lib/lightning.c: Move call to the simplify() optimization
  2157. to after register liveness is known. Previous code did work
  2158. by accident but now with proper test cases the problem was
  2159. noticed.
  2160. * lib/jit_disasm.c: Always cast bfd_vma to long long when
  2161. passing it as printf argument.
  2162. 2012-12-03 Paulo Andrade <pcpa@gnu.org>
  2163. * configure.ac, check/Makefile.am, check/check.sh,
  2164. doc/Makefile.am, include/lightning/Makefile.am,
  2165. lib/Makefile.am: Correct make distcheck.
  2166. 2012-12-02 Paulo Andrade <pcpa@gnu.org>
  2167. * lib/jit_ppc.c: Assign copyright ownership to FSF.
  2168. * lib/jit_x86-cpu.c: Correct integer multiplication that was
  2169. generating code with reversed register arguments.
  2170. * check/rpn.ok, check/rpn.tst: New test case file.
  2171. 2012-12-02 Paulo Andrade <pcpa@gnu.org>
  2172. * lib/jit_x86-cpu.c, lib/jit_x86-sse.c, lib/jit_x86-x87.c:
  2173. Actually change copyright owner to FSF as avertised.
  2174. * lib/jit_arm-cpu.c, lib/jit_arm-swf.c,
  2175. lib/jit_arm-vfp.c, lib/jit_arm.c,
  2176. lib/jit_mips-cpu.c, lib/jit_mips-fpu.c, lib/jit_mips.c,
  2177. lib/jit_ppc-cpu.c, lib/jit_ppc-fpu.c, lib/jit_ppc.c: New
  2178. files implementing initial code different jit backends.
  2179. * include/lightning/jit_private.h: Add extra field to the
  2180. private jit_patch_t type, required by the arm port.
  2181. * lib/Makefile.am: Update for the new backend implementation
  2182. files.
  2183. 2012-12-02 Paulo Andrade <pcpa@gnu.org>
  2184. * check/Makefile.am: Add proper "make clean" rule and missing
  2185. check.sh to EXTRA_DIST.
  2186. 2012-12-02 Paulo Andrade <pcpa@gnu.org>
  2187. * .gitignore: Update pattern of ignored files.
  2188. * check/Makefile.am: Add rule to build liblightning.la dependency
  2189. in case of running "make check" before building the library.
  2190. 2012-12-02 Paulo Andrade <pcpa@gnu.org>
  2191. * lightning/Makefile.am, lightning/asm-common.h,
  2192. lightning/core-common.h, lightning/fp-common.h,
  2193. lightning/funcs-common.h, lightning/i386/Makefile.frag,
  2194. lightning/i386/asm-32.h, lightning/i386/asm-64.h,
  2195. lightning/i386/asm.h, lightning/i386/core-32.h,
  2196. lightning/i386/core-64.h, lightning/i386/core.h,
  2197. lightning/i386/fp-32.h, lightning/i386/fp-64.h,
  2198. lightning/i386/fp.h, lightning/i386/funcs.h,
  2199. lightning/ppc/asm.h, lightning/ppc/core.h,
  2200. lightning/ppc/fp.h, lightning/ppc/funcs.h,
  2201. lightning/sparc/asm.h, lightning/sparc/core.h,
  2202. lightning/sparc/fp.h, lightning/sparc/funcs.h:
  2203. Removed. The core logic is used in the new code, and new mips
  2204. and arm ports will be added. At first, sparc will not be
  2205. supported as it has not yet been ported to the new engine.
  2206. 2012-12-02 Paulo Andrade <pcpa@gnu.org>
  2207. * tests/Makefile.am, tests/3to2.c, tests/3to2.ok, tests/add.c,
  2208. tests/add.ok, tests/allocai.c, tests/allocai.ok, tests/bp.c,
  2209. tests/bp.ok, tests/divi.c, tests/divi.ok, tests/fib.c, tests/fib.ok,
  2210. tests/fibdelay.c, tests/fibdelay.ok, tests/fibit.c, tests/fibit.ok,
  2211. tests/funcfp.c, tests/funcfp.ok, tests/incr.c, tests/incr.ok,
  2212. tests/ldst.c, tests/ldst.ok, tests/ldxi.c, tests/ldxi.ok,
  2213. tests/modi.c, tests/modi.ok, tests/movi.c, tests/movi.ok,
  2214. tests/printf.c, tests/printf.ok, tests/printf2.c, tests/printf2.ok,
  2215. tests/ret.c, tests/ret.ok, tests/rpn.c, tests/rpn.ok, tests/rpnfp.c,
  2216. tests/rpnfp.ok, tests/sete.c, tests/sete.ok, tests/testfp.c,
  2217. tests/testfp.ok, tests-run-test: Removed previous test suite, in
  2218. favor of a newer one in the check subdirectory.
  2219. * check/3to2.ok, check/3to2.tst, check/add.ok, check/add.tst,
  2220. check/allocai.ok, check/allocai.tst, check/bp.ok, check/bp.tst,
  2221. check/divi.ok, check/divi.tst, check/fib.ok, check/fib.tst:
  2222. New sample input for the new test program, loosely matching
  2223. several of the previous test cases.
  2224. * check/Makefile.am: New test suite makefile.
  2225. * check/check.sh, check/run-test: New wrapper files for the
  2226. new test suite.
  2227. * check/lightning.c: New file. The main driver of the new test
  2228. suite, that compiles to a parser of a very simple assembly like
  2229. language, generates jit and executes it.
  2230. * check/all.tst: New file. A generic debug and sample test file
  2231. with a directive to prevent it from being executed, and useful to
  2232. read disassembly of all possible instructions, using a fixed set
  2233. of registers.
  2234. * include/Makefile.am, include/lightning.h,
  2235. include/lightning/Makefile.am, include/lightning/jit_arm.h,
  2236. include/lightning/jit_mips.h, include/lightning/jit_ppc.h,
  2237. include/lightning/jit_private.h, include/lightning/jit_x86.h,
  2238. lib/Makefile.am, lib/jit_disasm.c, lib/jit_print.c,
  2239. lib/jit_x86-cpu.c, lib/jit_x86-sse.c, lib/jit_x86-x87.c,
  2240. lib/jit_x86.c, lib/lightning.c: New files. These files are
  2241. written from scratch, only by <pcpa@gnu.org>, and have now
  2242. copyright assignment to the FSF. This is the core of the new
  2243. lightning rework. Previously it was integrated in code with
  2244. a garbage collector and several custom types like vectors and
  2245. hash tables, so this first code merge with lightning converts
  2246. that code into a library extracting only the jit bits, and at
  2247. first only for x86_64 GNU/Linux.
  2248. * lightning.h, m4/lightning.m4: Removed. These are no longer
  2249. required in the new lightning code.
  2250. .gitignore, Makefile.am, configure.ac: Update for the new
  2251. lightning code.
  2252. 2012-12-02 Paulo Andrade <pcpa@gnu.org>
  2253. * .cvsignore: Removed for extra cleanup.
  2254. * build-aux: Rename directory to m4.
  2255. * m4: Renamed to "default" name and for consistency with merge
  2256. with code rework to be imported in lightning.
  2257. * .gitignore, configure.ac, Makefile.am, doc/Makefile.am:
  2258. Update for build-aux to m4 rename.
  2259. 2012-12-01 Paulo Andrade <pcpa@gnu.org>
  2260. * opcode/Makefile.am, opcode/Makefile.in, opcode/ansidecl.h,
  2261. opcode/bfd.h, opcode/dis-asm.h, opcode/dis-buf.c, opcode/disass.c,
  2262. opcode/i386-dis.c, opcode/i386.h, opcode/ppc-dis.c, opcode/ppc-opc.c,
  2263. opcode/ppc.h, opcode/sparc-dis.c, opcode/sparc-opc.c, opcode/sparc.h,
  2264. opcode/sysdep.h: Removed. Do not bundle GNU binutils files.
  2265. * aclocal.m4, configure, Makefile.in, config.h.in, doc/Makefile.in,
  2266. lightning/Makefile.in, tests/Makefile.in: Removed. Do not maintain
  2267. autogenerated files that also generate too much diff noise when
  2268. regenerated in git.
  2269. * build-aux/help2man, build-aux/texinfo.tex, build-aux/texi2dvi:
  2270. Removed. Buildenvironment must have an up to date version from
  2271. upstream installed.
  2272. * build-aux/config.guess, build-aux/config.sub, build-aux/depcomp,
  2273. build-aux/install-sh build-aux/mdate-sh build-aux/missing: Removed.
  2274. Do not maintain a copy of automake files in git. Release tarballs
  2275. must use an up to date version.
  2276. * lightningize.in, doc/lightningize.1: Removed. Do not encourage
  2277. bundling lightning in other packages. It should use a system package
  2278. or a proper thirdy part subdirectory.
  2279. * INSTALL: Removed. Autoreconf removes it and creates a symlink
  2280. when regenerating files, so, avoid conflicts in git and let
  2281. automake create the symlink.
  2282. * .gitignore: Add INSTALL and autogenerated files.
  2283. * configure.ac, Makefile.am: Update for removal of opcode subdir,
  2284. auto generated files and lightningize.
  2285. * tests/Makefile.am, tests/3to2.c, tests/add.c, tests/bp.c,
  2286. tests/fib.c, tests/fibdelay.c, tests/fibit.c, tests/funcfp.c,
  2287. tests/incr.c, tests/printf.c, tests/rpn.c, tests/rpnfp.c,
  2288. tests/sete.c, tests/testfp.c: Update for removal of opcode subdir.
  2289. * doc/Makefile.am: Update for removal of lightningize.
  2290. * configure.ac, lightning/ppc/funcs.h, lightning/sparc/funcs.h,
  2291. lightning/i386/fp.h, lightning/i386/core.h, lightning/i386/asm.h,
  2292. tests/3to2.c, tests/add.c, tests/bp.c, tests/fib.c, tests/fibdelay.c,
  2293. tests/fibit.c, tests/funcfp.c, tests/incr.c, tests/printf.c,
  2294. tests/rpn.c, tests/rpnfp.c, tests/sete.c, tests/testfp.c:
  2295. Remove LIGHTNING_CROSS, it is half supported and incomplete.
  2296. * tests/3to2.c, tests/funcfp.c, tests/rpnfp.c: Remove preprocessor
  2297. check on JIT_FPR. If no hardware registers are available, the backend
  2298. must provide an alternative for software float.
  2299. * lightning/ppc/core.h, lightning/sparc/core.h, tests/Makefile.am:
  2300. Remove JIT_NEED_PUSH_POP. It is absolutely not trivial to implement
  2301. properly on some backends due to stack alignment constraints, and
  2302. whenever it is required, using jit_allocai and using a properly
  2303. aligned stack vector, or a heap buffer, is better.
  2304. * tests/push-pop.c, tests/push-pop.ok: Removed due to
  2305. JIT_NEED_PUSH_POP no longer available.
  2306. 2011-02-28 Paolo Bonzini <bonzini@gnu.org>
  2307. * lightning/i386/core-64.h: Add jit_add{c,x}{i,r}_l, jit_mulr_{l,ul}_,
  2308. fix jit_mul{i,r}_{l,ul}.
  2309. 2010-08-20 Paolo Bonzini <bonzini@gnu.org>
  2310. * lightning/i386/fp-64.h: Return patch address from jit_bXYr_{f,d}.
  2311. Reported by Paulo César Pereira de Andrade.
  2312. * lightning/ppc/fp.h: Likewise.
  2313. * lightning/sparc/fp.h: Implement FP branches.
  2314. 2010-08-18 Paolo Bonzini <bonzini@gnu.org>
  2315. * lightning/i386/fp-64.h: Fix jp in jit_bner_{f,d}.
  2316. 2010-08-18 Paolo Bonzini <bonzini@gnu.org>
  2317. * lightning/i386/fp-32.h: Fix -D_ASM_SAFETY compilation.
  2318. Reported by Paulo César Pereira de Andrade.
  2319. 2010-08-15 Paolo Bonzini <bonzini@gnu.org>
  2320. * tests/ldst.c: Update.
  2321. * tests/Makefile.am: Use -ffloat-store to compile it.
  2322. 2010-08-15 Paolo Bonzini <bonzini@gnu.org>
  2323. * lightning/i386/core.h (jit_ldr_c, jit_ldxr_c, jit_ldr_s,
  2324. jit_ldxr_s): Move...
  2325. * lightning/i386/core-32.h: ... here.
  2326. * lightning/i386/core-64.h (jit_ldr_c, jit_ldxr_c, jit_ldr_s,
  2327. Use movsbq and movswq.
  2328. 2010-08-10 Paulo César Pereira de Andrade <pcpa@mandriva.com.br>
  2329. * lightning/i386/core-32.h (jit_replace): Use MOVLrr, not MOVLir.
  2330. (jit_movbrm): Check index register as well.
  2331. * lightning/i386/fp-64.h: Add jit_extr_f_d and jit_extr_d_f.
  2332. * lightning/fp-common.h: Add jit_extr_f_d and jit_extr_d_f.
  2333. 2010-07-28 Paolo Bonzini <bonzini@gnu.org>
  2334. * tests/Makefile.am: Add ldst test.
  2335. * tests/Makefile.in: Regenerate.
  2336. * tests/ldst.c: New.
  2337. * tests/ldst.ok: New.
  2338. 2010-07-28 Paolo Bonzini <bonzini@gnu.org>
  2339. * THANKS: Add Paulo Cesar Pereira de Andrade.
  2340. * doc/porting.texi: Fix ordering of arguments in jit_stxi.
  2341. * lightning/i386/core-32.h (jit_replace): Remove cmp argument.
  2342. * lightning/i386/fp-64.h (jit_movi_f): Fix.
  2343. 2010-07-26 Paolo Bonzini <bonzini@gnu.org>
  2344. * lightning/i386/core-32.h (jit_replace): Move here (removed
  2345. 2009-03-01).
  2346. 2010-07-19 Paolo Bonzini <bonzini@gnu.org>
  2347. * build-aux/lightning.m4: Always set and replace lightning_frag.
  2348. * Makefile.in: Regenerate.
  2349. * aclocal.m4: Regenerate.
  2350. * config.h.in: Regenerate.
  2351. * configure: Regenerate.
  2352. * doc/Makefile.in: Regenerate.
  2353. * doc/lightningize.1: Regenerate.
  2354. * doc/version.texi: Regenerate.
  2355. * lightning/Makefile.in: Regenerate.
  2356. * opcode/Makefile.in: Regenerate.
  2357. * tests/Makefile.in: Regenerate.
  2358. 2009-03-01 Paolo Bonzini <bonzini@gnu.org>
  2359. * lightning/i386/core-64.h: Use Mike's macros for x86-64 too.
  2360. * lightning/i386/core.h: Remove jit_replace.
  2361. 2009-02-27 Mike Spivey <mike@comlab.ox.ac.uk>
  2362. * lightning/i386/core.h: Rewrite shift-handling macros.
  2363. * lightning/fp-common.h: Fix jit_extr_{f_d,d_f}.
  2364. 2009-02-17 Mike Spivey <mike@comlab.ox.ac.uk>
  2365. * lightning/i386/core.h: Fix blunder in operand order.
  2366. 2009-02-17 Paolo Bonzini <bonzini@gnu.org>
  2367. * lightning/i386/fp-32.h: Another fix to jit_fp_btest.
  2368. 2009-02-17 Paolo Bonzini <bonzini@gnu.org>
  2369. * lightning/fp-common.h: Define double branches if missing.
  2370. * lightning/i386/asm.h: Define JC and JNC mnemonics.
  2371. * lightning/i386/fp-32.h: Fix jit_fp_btest. All reported
  2372. by Mike Spivey.
  2373. 2008-10-09 Paolo Bonzini <bonzini@gnu.org>
  2374. * lightning/ppc/funcs.h (jit_flush_code): Subtract 1 from end.
  2375. Reported by Eli Barzilay and Matthew Flatt.
  2376. 2008-08-23 Nix <nix@esperi.org.uk>
  2377. * lightning/i386/Makefile.frag: fp-32.h and fp-64.h are target files.
  2378. 2008-07-02 Laurent Michel <ldm@engr.uconn.edu>
  2379. * lightning/ppc/funcs.h (jit_flush_code): modified the computation
  2380. of start/end. The pointer arithmetic was done without casting. It
  2381. prevented compilation with recent gcc versions.
  2382. * lightning/ppc/core.h (jit_pushr_i): The offset for the store was
  2383. incorrect. Should have been 4 bytes below SP (not above).
  2384. * lightning/ppc/core.h (jit_popr_i): The offset for the load was
  2385. incorrect. Should have been 0 (not +8).
  2386. 2008-06-17 Paolo Bonzini <bonzini@gnu.org>
  2387. * lightning/i386/asm-64.h: Forward IMULQir to IMULQirr,
  2388. fix REXQ order for IMULQirr.
  2389. 2008-06-17 Paolo Bonzini <bonzini@gnu.org>
  2390. * lightning/i386/core.h: Fix _rN vs. _rR.
  2391. 2008-06-16 Paolo Bonzini <bonzini@gnu.org>
  2392. * lightning/i386/core.h: Use jit_save in jit_replace. Move JIT_R
  2393. definition...
  2394. * lightning/i386/core-32.h: ... here; define jit_save so that
  2395. the core.h has no effect on the 32-bit backend.
  2396. * lightning/i386/core-64.h: Place JIT_R1/JIT_R2 in R10/R11,
  2397. place outgoing arguments in the right spot from the beginning,
  2398. define jit_save, fix jit_reg8/jit_reg16.
  2399. 2008-06-15 Paolo Bonzini <bonzini@gnu.org>
  2400. * lightning/i386/core-64.h: Rewrite argument passing to
  2401. support up to 6 arguments and generate less code.
  2402. 2008-06-14 Laurent Michel <ldm@thorgal.homelinux.org>
  2403. * lightning/i386/core-64.h (jit_movi_l): When the operand is 0,
  2404. the XOR should be on a quadword.
  2405. * lightning/i386/core-64.h (jit_prolog): Keep 16-byte stack
  2406. alignment.
  2407. (jit_ret): Always use LEAVE.
  2408. 2008-06-13 Laurent Michel <ldm@thorgal.homelinux.org>
  2409. * lightning/i386/core-64.h: Add (void) casts for C++ compatibility.
  2410. * lightning/i386/asm.h: Likewise.
  2411. 2008-06-12 Paolo Bonzini <bonzini@gnu.org>
  2412. * lightning/i386/core.h: Move JIT_V definition...
  2413. * lightning/i386/core-32.h: ... here.
  2414. * lightning/i386/core-64.h: ... and here. Avoid dancing between
  2415. RSI/RDI and R12/R13, and place JIT_V1/JIT_V2 in R12/R13.
  2416. 2008-06-11 Paolo Bonzini <bonzini@gnu.org>
  2417. * build-aux/lightning.m4: Adjust LIGHTNING_BACKENDS, don't
  2418. use suffix support to distinguish i386/x86_64.
  2419. * lightning/i386/Makefile.frag: Use LIGHTNING_TARGET_FILES
  2420. to distribute *-32.h and *-64.h files now.
  2421. * lightning/i386/asm-i386: Moved to...
  2422. * lightning/i386/asm.h: Include the appropriate subtarget file.
  2423. * lightning/i386/core-i386: Moved to...
  2424. * lightning/i386/core.h: Include the appropriate subtarget file.
  2425. * lightning/i386/fp.h: New, include the appropriate subtarget file.
  2426. * lightning/i386/asm-32: Do not include asm-i386.h.
  2427. * lightning/i386/asm-64.h: Likewise.
  2428. * lightning/i386/core-32: Do not include core-i386.h.
  2429. * lightning/i386/core-64.h: Likewise.
  2430. * lightning/Makefile.am: Adjust for renamed files.
  2431. * configure.ac: Define LIGHTNING_TARGET here.
  2432. * opcode/disass.c: Change list of valid LIGHTNING_TARGET values.
  2433. * lightningize.in: Robustify against missing subtarget files.
  2434. 2008-06-11 Paolo Bonzini <bonzini@gnu.org>
  2435. * lightning/i386/core-32.h: Use MOVLir instead of jit_movi_l
  2436. to implement jit_movi_p.
  2437. 2008-06-11 Paolo Bonzini <bonzini@gnu.org>
  2438. * lightning/i386/core-32.h: Use separate __APPLE__ and SysV
  2439. prolog/ret macros. Subtract 12 bytes in __APPLE__ case to
  2440. keep stack aligned, and always use LEAVE in the epilog.
  2441. 2008-06-11 Paolo Bonzini <bonzini@gnu.org>
  2442. * lightning/i386/core-i386.h: Fix C++ incompatibility.
  2443. 2008-06-10 Laurent Michel <ldm@engr.uconn.edu>
  2444. * lightning/i386/core-i386.h: Fix jit_replace8 for
  2445. case when one of the operands is _EAX.
  2446. 2008-05-19 Paolo Bonzini <bonzini@gnu.org>
  2447. * tests/run-test: Avoid CRLF issues on mingw.
  2448. 2008-03-21 Paolo Bonzini <bonzini@gnu.org>
  2449. * lightning/i386/core-64.h: Fix jit_{ld,st}{,x}i_{i,l}.
  2450. Remove jit_ld{,x}i_ul.
  2451. * lightning/core-common.h: Make jit_ld{,x}{i,r}_ul
  2452. always a synonym of the _l variant.
  2453. * doc/porting.texi: Document this.
  2454. 2008-03-19 Paolo Bonzini <bonzini@gnu.org>
  2455. * lightning/i386/core-64.h: Fix uses of jit_qop_.
  2456. 2008-03-19 Paolo Bonzini <bonzini@gnu.org>
  2457. * lightning/i386/core-64.h: Add boolean operations.
  2458. 2008-03-19 Paolo Bonzini <bonzini@gnu.org>
  2459. * lightning/i386/asm-64.h: Add LEAQmr.
  2460. 2008-03-19 Paolo Bonzini <bonzini@gnu.org>
  2461. * lightning/i386/core-64.h: Misc bugfixes.
  2462. 2008-03-19 Paolo Bonzini <bonzini@gnu.org>
  2463. * lightning/i386/core-i386.c: Remove jit_ldr_i, jit_ldxr_i.
  2464. * lightning/i386/core-32.h: Add jit_ldr_i, jit_ldxr_i.
  2465. * lightning/i386/core-64.h: Add jit_ld{r,xr,i,xi}_{ui,l,ul};
  2466. move jit_ldr_i, jit_ldxr_i, jit_str_l, jit_stxr_l with others.
  2467. 2008-03-19 Paolo Bonzini <bonzini@gnu.org>
  2468. * lightning/asm-common.h: Add _s32P.
  2469. 2008-03-19 Paolo Bonzini <bonzini@gnu.org>
  2470. * lightning/i386/core-64.h: Implement long mul/div/mod.
  2471. 2008-03-19 Paolo Bonzini <bonzini@gnu.org>
  2472. * lightning/i386/asm-i386.h: Cast memory address to long for JCCim.
  2473. 2008-03-15 Paolo Bonzini <bonzini@gnu.org>
  2474. * lightning/asm-common.h: Add underscores around __unused__
  2475. attribute.
  2476. 2008-03-15 Paolo Bonzini <bonzini@gnu.org>
  2477. * lightning/ppc/core.h: Avoid some "value computed is not used"
  2478. warnings.
  2479. * lightnings/tests/allocai.c: Silence other warnings.
  2480. 2008-03-14 Paolo Bonzini <bonzini@gnu.org>
  2481. * lightningize.in: Fix some problems (not all).
  2482. 2008-03-14 Paolo Bonzini <bonzini@gnu.org>
  2483. * lightning/i386/core-32.h: Avoid some "value computed is not used"
  2484. warnings; reported by Sam Steingold.
  2485. 2008-03-08 Paolo Bonzini <bonzini@gnu.org>
  2486. * lightning/i386/core-32.h: Fix stxr_c(_EAX, _EBX, _ESI).
  2487. 2008-02-13 Paolo Bonzini <bonzini@gnu.org>
  2488. * lightning/i386/asm-32.h: Avoid redefinition of _r1, reported by
  2489. Sam Steingold.
  2490. * lightning/i386/asm-64.h: Likewise.
  2491. 2008-02-08 Paolo Bonzini <bonzini@gnu.org>
  2492. * lightning/i386/asm-i386.h: Don't define _VOID, reported
  2493. by Reini Urban.
  2494. 2008-02-03 Paolo Bonzini <bonzini@gnu.org>
  2495. * build-aux/lightning.m4: Add --with-lightning-prefix option, suggested
  2496. by Sam Steingold.
  2497. 2008-01-14 Paolo Bonzini <bonzini@gnu.org>
  2498. * lightning/i386/core-64.h: Use CALLsr, not CALLLsr.
  2499. 2008-01-13 Paolo Bonzini <bonzini@gnu.org>
  2500. * lightning/i386/core-i386.h: Move jit_calli and jit_callr...
  2501. * lightning/i386/core-32.h: ... here.
  2502. * lightning/i386/core-64.h: Redefine them.
  2503. 2008-01-05 Paolo Bonzini <bonzini@gnu.org>
  2504. * lightning/i386/fp-32.h: Fix sub(a,0,a).
  2505. * lightning/tests/3to2.c: Add new testcases.
  2506. * lightning/tests/3to2.ok: Add new testcases.
  2507. 2008-01-02 Paolo Bonzini <bonzini@gnu.org>
  2508. * lightning/i386/fp-32.h: Fix sub(a,b,a) with a ~= JIT_FPR0.
  2509. * lightning/tests/3to2.c: New.
  2510. * lightning/tests/3to2.ok: New.
  2511. 2007-11-07 Paolo Bonzini <bonzini@gnu.org>
  2512. * opcode/Makefile.am: Fix AM_CPPFLAGS.
  2513. 2007-08-12 Paolo Bonzini <bonzini@gnu.org>
  2514. * lightning/i386/core-i386.h: Improve encoding of set* instructions.
  2515. * lightning/i386/core-64.h: Fix jit_bra_l.
  2516. * tests/sete.c: New.
  2517. * tests/sete.ok: New.
  2518. 2007-06-29 Paolo Bonzini <bonzini@gnu.org>
  2519. * tests/bp.c: Upgrade to GPL/LGPLv3.
  2520. * lightning/i386/asm-32.h: Upgrade to GPL/LGPLv3.
  2521. * lightning/i386/asm-64.h: Upgrade to GPL/LGPLv3.
  2522. * lightning/i386/core-32.h: Upgrade to GPL/LGPLv3.
  2523. * lightning/i386/core-64.h: Upgrade to GPL/LGPLv3.
  2524. * lightning/i386/fp-64.h: Upgrade to GPL/LGPLv3.
  2525. * lightning/sparc/asm.h: Upgrade to GPL/LGPLv3.
  2526. * lightning/sparc/core.h: Upgrade to GPL/LGPLv3.
  2527. * lightning/sparc/fp.h: Upgrade to GPL/LGPLv3.
  2528. * lightning/sparc/funcs.h: Upgrade to GPL/LGPLv3.
  2529. * lightning/i386/asm-i386.h: Upgrade to GPL/LGPLv3.
  2530. * lightning/i386/core-i386.h: Upgrade to GPL/LGPLv3.
  2531. * lightning/i386/fp-32.h: Upgrade to GPL/LGPLv3.
  2532. * lightning/i386/funcs.h: Upgrade to GPL/LGPLv3.
  2533. * lightning/ppc/asm.h: Upgrade to GPL/LGPLv3.
  2534. * lightning/ppc/core.h: Upgrade to GPL/LGPLv3.
  2535. * lightning/ppc/fp.h: Upgrade to GPL/LGPLv3.
  2536. * lightning/ppc/funcs.h: Upgrade to GPL/LGPLv3.
  2537. * lightning.h: Upgrade to GPL/LGPLv3.
  2538. * tests/add.c: Upgrade to GPL/LGPLv3.
  2539. * tests/fib.c: Upgrade to GPL/LGPLv3.
  2540. * tests/testfp.c: Upgrade to GPL/LGPLv3.
  2541. * tests/fibdelay.c: Upgrade to GPL/LGPLv3.
  2542. * tests/fibit.c: Upgrade to GPL/LGPLv3.
  2543. * tests/funcfp.c: Upgrade to GPL/LGPLv3.
  2544. * tests/incr.c: Upgrade to GPL/LGPLv3.
  2545. * tests/printf.c: Upgrade to GPL/LGPLv3.
  2546. * tests/printf2.c: Upgrade to GPL/LGPLv3.
  2547. * tests/rpn.c: Upgrade to GPL/LGPLv3.
  2548. * tests/rpnfp.c: Upgrade to GPL/LGPLv3.
  2549. * lightning/asm-common.h: Upgrade to GPL/LGPLv3.
  2550. * lightning/core-common.h: Upgrade to GPL/LGPLv3.
  2551. * lightning/fp-common.h: Upgrade to GPL/LGPLv3.
  2552. * lightning/funcs-common.h: Upgrade to GPL/LGPLv3.
  2553. * opcode/dis-buf.c: Upgrade to GPL/LGPLv3.
  2554. * opcode/disass.c: Upgrade to GPL/LGPLv3.
  2555. * opcode/i386-dis.c: Upgrade to GPL/LGPLv3.
  2556. * opcode/sparc-dis.c: Upgrade to GPL/LGPLv3.
  2557. * opcode/sparc-opc.c: Upgrade to GPL/LGPLv3.
  2558. * lightningize.in: Upgrade to GPL/LGPLv3.
  2559. * opcode/bfd.h: Upgrade to GPL/LGPLv3.
  2560. * opcode/i386.h: Upgrade to GPL/LGPLv3.
  2561. * opcode/sparc.h: Upgrade to GPL/LGPLv3.
  2562. 2007-01-26 Thomas Girard <thomas.g.girard@free.fr>
  2563. * lightning/Makefile.am: Add clean-local target.
  2564. 2006-12-02 Paolo Bonzini <bonzini@gnu.org>
  2565. * lightning/i386/asm-i386.h: Add CVTTS?2SIL.
  2566. * lightning/i386/asm-64.h: Add CVTTS?2SIQ.
  2567. * lightning/i386/fp-64.h: Use it.
  2568. * lightning/Makefile.am: Place files in nodist_lightning_HEADERS.
  2569. 2006-11-23 Paolo Bonzini <bonzini@gnu.org>
  2570. * lightning/core-common.h: Add casts in "*i_p" variants.
  2571. * lightning/i386/asm-32.h: Add _r1.
  2572. * lightning/i386/asm-64.h: Likewise, and add SSE instructions.
  2573. * lightning/i386/asm-i386.h: Merge SSE instructions from Gwenole.
  2574. Use short form for 16-bit AX instructions. Remove _r1
  2575. * lightning/i386/core-64.h: Add FP ABI support in its infancy.
  2576. * lightning/i386/core-i386.h: Move jit_arg_f and jit_arg_d...
  2577. * lightning/i386/core-32.h: ... and jit_prepare_f and jit_prepare_d...
  2578. * lightning/i386/fp-32.h: ... here.
  2579. * lightning/i386/fp-64.h: Write the code.
  2580. * lightning/sparc/fp.h: Fix jit_extr_{f_d,d_f} register order.
  2581. 2006-11-22 Paolo Bonzini <bonzini@gnu.org>
  2582. * lightning/i386/asm-i386.h: Move x86-64 instructions...
  2583. * lightning/i386/asm-64.h: ... here.
  2584. * lightning/i386/fp-32.h: Fix bugfixes worked around in froofyJIT.
  2585. Add JIT_FPRET.
  2586. * lightning/sparc/fp.h: Likewise.
  2587. * lightning/ppc/fp.h: Likewise.
  2588. * lightning/fp-common.h: Adjust for JIT_FPRET.
  2589. * tests/funcfp.c: Adjust for JIT_FPRET.
  2590. * tests/rpnfp.c: Adjust for JIT_FPRET.
  2591. 2006-11-20 Paolo Bonzini <bonzini@gnu.org>
  2592. * lightning/i386/asm-i386.h: Add an underscore to macros without
  2593. a parameter.
  2594. 2006-11-20 Paolo Bonzini <bonzini@gnu.org>
  2595. * lightning/i386/core-i386.h: Move jit_movip, jit_check8, jit_reg8,
  2596. jit_reg16, jit_movbrm...
  2597. * lightning/i386/core-32.h: ... here.
  2598. * lightning/i386/core-64.h: Redefine them. Fix other bugs.
  2599. * tests/printf.c: Do not do a varargs call.
  2600. 2006-11-20 Paolo Bonzini <bonzini@gnu.org>
  2601. * lightning/i386/asm-i386.h: Check in rewrite from Basilisk II.
  2602. * lightning/i386/asm-32.h: Adjust.
  2603. * lightning/i386/asm-64.h: Adjust.
  2604. * lightning/i386/fp-32.h: Adjust.
  2605. * lightning/i386/core-32.h: Adjust. Add jit_{ld,ldx,st,stx}i*.
  2606. * lightning/i386/core-64.h: Adjust. Add jit_{ld,ldx,st,stx}i*.
  2607. * lightning/i386/core-i386.h: Adjust. Remove these patterns.
  2608. 2006-11-20 Paolo Bonzini <bonzini@gnu.org>
  2609. * lightning/i386/asm-i386.h: Merge 64-bit cleanliness changes from
  2610. mzscheme.
  2611. Add SSE.
  2612. * lightning/i386/asm-64.h: Likewise.
  2613. 2006-11-20 Paolo Bonzini <bonzini@gnu.org>
  2614. Ludovic Courtes <ludo@chbouib.org>
  2615. * lightning/i386/core-32.h: Disable jit_push and jit_pop if stack not
  2616. needed.
  2617. * lightning/i386/core-64.h: Disable jit_push and jit_pop if stack not
  2618. needed.
  2619. * lightning/sparc/core.h: Merge final implementation of jit_pushr and
  2620. jit_popr.
  2621. * lightning/ppc/core.h: Fix implementation of jit_pushr and jit_popr to
  2622. work (more or less) across function calls.
  2623. * tests/push-pop.c, tests/push-pop.ok: New test.
  2624. * tests/Makefile.am: Run it.
  2625. 2006-11-20 Paolo Bonzini <bonzini@gnu.org>
  2626. * lightning/asm-common.h: Make 64-bit safe.
  2627. * lightning/i386/funcs.h: Make 64-bit safe.
  2628. * lightning/i386/asm-64.h: More merge from mzscheme.
  2629. * lightning/i386/asm-i386.h: More merge from mzscheme.
  2630. * lightning/i386/core-32.h: More merge from mzscheme.
  2631. * lightning/i386/core-64.h: More merge from mzscheme.
  2632. * lightning/i386/core-i386.h: More merge from mzscheme.
  2633. * tests/rpnfp.c, tests/testfp.c, tests/funcfp.c: Skip if no
  2634. floating-point support.
  2635. 2006-11-04 Paolo Bonzini <bonzini@gnu.org>
  2636. * tests/rpn.c: Remove pushr/popr.
  2637. 2006-11-04 Paolo Bonzini <bonzini@gnu.org>
  2638. * lightning/ppc/core.h: Implement jit_allocai, define JIT_FP to be R1.
  2639. * lightning/ppc/funcs.h: Store frame size into _jitl. Store R1 before
  2640. the STMW, so that the offset is unchanged when we patch the STMW.
  2641. * lightning/i386/core.h: Define JIT_FP to be EBP.
  2642. * lightning/i386/core-32.h: Implement jit_allocai, put LEAVE in the
  2643. epilog if jit_allocai was used.
  2644. * lightning/i386/core-64.h: Implement jit_allocai, put LEAVE in the
  2645. epilog if jit_allocai was used.
  2646. 2006-11-04 Ludovic Courtes <ludo@chbouib.org>
  2647. * lightning/sparc/core.h: Implement jit_allocai.
  2648. * tests/allocai.c: New.
  2649. * tests/Makefile.am: Point to new tests.
  2650. 2006-11-03 Paolo Bonzini <bonzini@gnu.org>
  2651. * lightning/ppc/core.h: Fix jit_bms using BNE rather than BGT.
  2652. "AND." does signed comparisons.
  2653. 2006-10-31 Paolo Bonzini <bonzini@gnu.org>
  2654. * doc/porting.texi: Rename JIT_FP to JIT_AP.
  2655. * lightning/core-common.h: Likewise.
  2656. * lightning/i386/core-i386.h: Likewise.
  2657. * lightning/fp-common.h: Provide default versions of jit_getarg_[fd].
  2658. * lightning/i386/fp-32.h: Don't provide jit_getarg_[fd].
  2659. * lightning/ppc/fp.h: Likewise.
  2660. 2006-10-31 Ludovic Courtes <ludo@chbouib.org>
  2661. * doc/using.texi (The instruction set): Clarified the use of `JIT_RET' and
  2662. documented `jit_retval'.
  2663. * tests/ret.c (generate_function_proxy): After `jit_finish', use
  2664. `jit_retval_i' to move FUNC's return value into the correct register.
  2665. 2006-10-31 Paolo Bonzini <bonzini@gnu.org>
  2666. Ludovic Courtes <ludo@chbouib.org>
  2667. * tests/divi.c, tests/divi.ok, tests/movi.c, tests/movi.ok: New.
  2668. * tests/ldxi.c: Ensure large pointer is generated.
  2669. * tests/Makefile.am: Point to new tests.
  2670. * lightning.h: Include funcs-common.h before funcs.h.
  2671. * lightning/sparc/core.h: Fix bugs in modi/divi.
  2672. 2006-10-30 Paolo Bonzini <bonzini@gnu.org>
  2673. * lightning/Makefile.am: Use "ln -sf".
  2674. * lightning/core-common.h: Define jit_negr_l if necessary.
  2675. 2006-10-30 Paolo Bonzini <bonzini@gnu.org>
  2676. * lightning/i386/asm.h (MOVS*, MOVZ*): Use correct _r[124] macros.
  2677. 2006-10-29 Paolo Bonzini <bonzini@gnu.org>
  2678. * configure.ac: Use lightning.m4 macros.
  2679. * lightning.m4: Refactor to use common code in configure.ac. Move...
  2680. * build-aux/lightning.m4: ... here.
  2681. * lightningize.in: Support suffixes.
  2682. * opcode/disass.in: Adapt to changes in configure.ac.
  2683. * lightning/ppc/funcs.h: Use __APPLE__ instead of _CALL_DARWIN.
  2684. * lightning/i386/core-32.h: Likewise.
  2685. 2006-10-26 Paolo Bonzini <bonzini@gnu.org>
  2686. * configure.ac: Fix compilation test.
  2687. * lightning/Makefile.am: Symlink LIGHTNING_TARGET_FILES in
  2688. non-distribution mode.
  2689. * lightning/i386/Makefile.frag: Use LIGHTNING_TARGET_FILES.
  2690. 2006-10-26 Paolo Bonzini <bonzini@gnu.org>
  2691. * configure.ac: Subst cpu.
  2692. * lightning/core-common.h: Make tests pass on i386.
  2693. * lightning/i386/asm-32.h: Make tests pass on i386.
  2694. * lightning/i386/asm-64.h: Make tests pass on i386.
  2695. * lightning/i386/asm-i386.h: Make tests pass on i386.
  2696. * lightning/i386/core-32.h: Make tests pass on i386.
  2697. * lightning/i386/core-64.h: Make tests pass on i386.
  2698. * lightning/i386/core-i386.h: Make tests pass on i386.
  2699. * tests/Makefile.am: Include files from cpu directory.
  2700. 2006-10-26 Paolo Bonzini <bonzini@gnu.org>
  2701. * lightning/i386/asm.h: Move to asm-i386.h
  2702. * lightning/i386/asm-32.h: New, from Matthew Flatt.
  2703. * lightning/i386/asm-64.h: New, from Matthew Flatt.
  2704. * lightning/i386/core.h: Move to core-i386.h
  2705. * lightning/i386/core-32.h: New, from Matthew Flatt.
  2706. * lightning/i386/core-64.h: New, from Matthew Flatt.
  2707. * lightning/i386/fp.h: Move to fp-32.h
  2708. * lightning/i386/fp-64.h: New, dummy.
  2709. * lightning/i386/Makefile.frag: New.
  2710. * lightning/Makefile.am: Support per-target Makefile fragments.
  2711. * configure.ac: Support per-target Makefile fragments and CPU suffixes.
  2712. 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
  2713. * lightning/i386/i386.h (jit_flush_code): Fix syntax error. :-(
  2714. 2006-07-06 Paolo Bonzini <bonzini@gnu.org>
  2715. Ludovic Courtes <ludovic.courtes@laas.fr>
  2716. * doc/using.texi: Clarify "Using autoconf" section
  2717. and rename it to "Bundling lightning"
  2718. * lightning.m4: Work also if lightning is not bundled.
  2719. 2006-07-06 Paolo Bonzini <bonzini@gnu.org>
  2720. Ludovic Courtes <ludovic.courtes@laas.fr>
  2721. * lightning/ppc/core.h (_jit_mod): Replace with...
  2722. (_jit_mod_big, _jit_mod_small): ... these.
  2723. (jit_modi_i, jit_modi_ui): Rewrite.
  2724. * tests/modi.c, tests/modi.ok: New tests.
  2725. 2006-05-18 Matthew Flatt <mflatt@cs.utah.edu>
  2726. * lightning/i386/asm.h: Fix test for extending the mprotect area
  2727. towards lower addresses.
  2728. 2006-05-16 Bruno Haible <bruno@clisp.org>
  2729. * lightning/asm-common.h: Don't use __func__ nor __FUNCTION__ if
  2730. not compiling with GNU C.
  2731. 2006-02-16 Paolo Bonzini <bonzini@gnu.org>
  2732. * lightning/ppc/core.h: Fix jit_ldxi_* with big displacement.
  2733. 2006-01-23 Paolo Bonzini <bonzini@gnu.org>
  2734. * configure.ac: Fix comments in config.h.in.
  2735. 2005-11-25 Paolo Bonzini <bonzini@gnu.org>
  2736. * lightning/sparc/fp.h: Fix header comment.
  2737. * lightning/ppc/fp.h: Fix header comment.
  2738. 2005-04-27 Paolo Bonzini <bonzini@gnu.org>
  2739. * lightning/i386/asm.h (JCm, JCSm, JNCm, JNCSm): New.
  2740. 2004-11-26 Paolo Bonzini <bonzini@gnu.org>
  2741. * lightning/ppc/funcs.h (_jit_epilog): Remove unused variable.
  2742. 2004-11-13 Paolo Bonzini <bonzini@gnu.org>
  2743. * lightning/i386/funcs.h [__linux__]: Include sys/mman.h.
  2744. 2004-11-09 Paolo Bonzini <bonzini@gnu.org>
  2745. * lightning/sparc/fp.h: Fix fp-to-integer conversions.
  2746. * lightning/ppc/testfp.c: Test fp-to-integer conversions
  2747. of integer numbers.
  2748. * lightning/ppc/testfp.ok: Adjust for the above.
  2749. 2004-11-08 Paolo Bonzini <bonzini@gnu.org>
  2750. * lightning/ppc/testfp.c: Always flush code before
  2751. testing it.
  2752. 2004-11-08 Paolo Bonzini <bonzini@gnu.org>
  2753. * lightning/ppc/fp.h: Do not clobber f31.
  2754. 2004-11-08 Paolo Bonzini <bonzini@gnu.org>
  2755. * lightning.h: New name of...
  2756. * lightning-inst.h: ... this file.
  2757. * lightning.h.in: Removed.
  2758. * opcodes/disass.c: Include config.h.
  2759. * tests/add.c: Include config.h.
  2760. * tests/bp.c: Include config.h.
  2761. * tests/fib.c: Include config.h.
  2762. * tests/fibdelay.c: Include config.h.
  2763. * tests/fibit.c: Include config.h.
  2764. * tests/funcfp.c: Include config.h.
  2765. * tests/incr.c: Include config.h.
  2766. * tests/printf.c: Include config.h.
  2767. * tests/printf2.c: Include config.h.
  2768. * tests/rpn.c: Include config.h.
  2769. * tests/rpnfp.c: Include config.h.
  2770. * tests/testfp.c: Include config.h.
  2771. 2004-10-12 Paolo Bonzini <bonzini@gnu.org>
  2772. * lightning/i386/fp.h: Fix bugs in conditional branches.
  2773. 2004-10-10 Paolo Bonzini <bonzini@gnu.org>
  2774. * lightning/i386/funcs.h: Fix pasto in jit_flush_code.
  2775. 2004-10-08 Paolo Bonzini <bonzini@gnu.org>
  2776. * lightning/ppc/fp.h: Optimized conditional branches.
  2777. 2004-09-20 Paolo Bonzini <bonzini@gnu.org>
  2778. * lightning/ppc/asm.h: Fix more typos.
  2779. 2004-09-20 Paolo Bonzini <bonzini@gnu.org>
  2780. * lightning/ppc/asm.h: Fix typos, replace `26' with JIT_AUX.
  2781. 2004-09-20 Paolo Bonzini <bonzini@gnu.org>
  2782. * lightning/ppc/fp.h: Added conditional branches.
  2783. 2004-09-18 Laurent Michel <ldm@thorgal.homelinux.org>
  2784. * lightning/ppc/fp.h (jit_unler_d, jit_unltr_d, jit_unger_d,
  2785. jit_ungtr_d, jit_ltgt_d, jit_uneq_d): Implemented missing tests
  2786. to fully support testfp.
  2787. (jit_floorr_d_i, jit_ceilr_d_i, jit_roundr_d_i, jit_truncr_d_i):
  2788. New macros.
  2789. * lightning/ppc/asm.h: Added missing opcodes FCTIWZ and MTFSFI.
  2790. * lightning/ppc/funcs.h (_jit_prolog): Fixed minor mistake in
  2791. the initialization of _jitl.nextarg_geti, relying on the
  2792. JIT_AUX macro as well to get the register offset.
  2793. 2004-09-07 Paolo Bonzini <bonzini@gnu.org>
  2794. * lightning/ppc/funcs.h: Fix typo.
  2795. 2004-09-06 Paolo Bonzini <bonzini@gnu.org>
  2796. * tests/funcfp.c: Use %g. Remove C99 variable declarations.
  2797. * tests/testfp.c: Don't use __builtin_nan.
  2798. * lightning/ppc/core.h: Add three V registers.
  2799. * lightning/ppc/funcs.h: Adjust.
  2800. * lightning/sparc/core.h: Some fixes related to FP argument passing.
  2801. Move R0 to %g2, use %o7 for JIT_BIG2.
  2802. * lightning/sparc/fp.h: Some fixes related to FP argument passing.
  2803. 2004-09-02 Paolo Bonzini <bonzini@gnu.org>
  2804. * lightning/sparc/core.h: Add another V register,
  2805. move R0 to %o7.
  2806. 2004-07-15 Paolo Bonzini <bonzini@gnu.org>
  2807. * lightning/i386/funcs.h: Implement jit_flush_code,
  2808. in order to support Fedora's exec-shield.
  2809. 2004-07-14 Paolo Bonzini <bonzini@gnu.org>
  2810. * lightning/core-common.h: Add more jit_extr_*_* macros.
  2811. * lightning/doc/using.texi: Be clearer about the order
  2812. of arguments in jit_extr_*_*.
  2813. * lightning/doc/porting.texi: Add more jit_extr_*_* macros.
  2814. * lightning/i386/fp.h: Fix typo in jit_extr_i_d.
  2815. 2004-07-14 Paolo Bonzini <bonzini@gnu.org>
  2816. * lightning/ppc/funcs.h: Adjust offset of LR into
  2817. stack frame if running under the Darwin ABI.
  2818. 2004-07-13 Paolo Bonzini <bonzini@gnu.org>
  2819. * lightning/i386/fp.h: Rename jit_exti_d to jit_extr_i_d.
  2820. 2004-07-13 Paolo Bonzini <bonzini@gnu.org>
  2821. * lightning/ppc/core.h: Fix thinko.
  2822. * lightning/i386/core.h: Fix jit_lti_ui.
  2823. * lightning/core-common.h: Add missing macros.
  2824. * lightning/ppc/fp.h: Rename jit_neg_* to jit_negr_*.
  2825. * lightning/i386/fp.h: Rename jit_neg_* to jit_negr_*.
  2826. * lightning/sparc/fp.h: Rename jit_neg_* to jit_negr_*.
  2827. * lightning/fp-common.h: Rename jit_neg_* to jit_negr_*.
  2828. * doc/porting.texi: Add undocumented macros.
  2829. 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
  2830. * doc/porting.texi: Add missing macros.
  2831. 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
  2832. * lightning/ppc/funcs.h: Don't generate trampolines.
  2833. Separate prolog and epilog generation.
  2834. * lightning/ppc/core.h: Generate epilog explicitly.
  2835. Don't reserve r31 anymore.
  2836. * lightning/core-common.h: Remove call to jit_setup_code.
  2837. 2004-07-09 Paolo Bonzini <bonzini@gnu.org>
  2838. * lightning/lightning.h.in: Avoid preprocessor warnings.
  2839. * lightning/lightning-inst.h: Likewise.
  2840. * lightning/i386/core.h: Define JIT_R, JIT_R_NUM, JIT_V,
  2841. JIT_V_NUM.
  2842. * lightning/ppc/core.h: Likewise.
  2843. * lightning/sparc/core.h: Likewise.
  2844. * lightning/i386/fp.h: Define JIT_FPR, JIT_FPR_NUM.
  2845. * lightning/ppc/fp.h: Likewise.
  2846. * lightning/sparc/fp.h: Likewise.
  2847. * lightning/core-common.h: Define fixed register names.
  2848. * lightning/fp-common.h: Likewise for FP regs.
  2849. 2004-07-09 Paolo Bonzini <bonzini@gnu.org>
  2850. * lightning/ppc/funcs.h: Fix location where return address
  2851. is stored.
  2852. * lightning/i386/asm.h: Add a trailing _ to opcodes without
  2853. any parameter.
  2854. * lightning/i386/core.h: Adjust for the above.
  2855. 2004-04-15 Paolo Bonzini <bonzini@gnu.org>
  2856. * lightning/i386/fp.h: Change "and" to "_and"
  2857. to satisfy C++ compilers.
  2858. 2004-04-14 Paolo Bonzini <bonzini@gnu.org>
  2859. * lightning/sparc/fp.h: Use memcpy to implement jit_movi.
  2860. * lightning/ppc/fp.h: Use memcpy to implement jit_movi.
  2861. Move floating-point opcodes...
  2862. * lightning/ppc/asm.h: ... here.
  2863. 2004-04-14 Paolo Bonzini <bonzini@gnu.org>
  2864. * lightning/core-common.h: Add jit_finishr.
  2865. * lightning/ppc/core.h: Add jit_callr and jit_finishr.
  2866. * lightning/i386/core.h: Add jit_callr.
  2867. * lightning/sparc/core.h: Add jit_callr. Fix typo.
  2868. 2004-04-14 Paolo Bonzini <bonzini@gnu.org>
  2869. * lightning/i386/core.h: Fix pasto in jit_b*_ui.
  2870. 2004-03-30 Laurent Michel
  2871. * lightning/ppc: Implement PowerPC floating point
  2872. (ChangeLog entry missing).
  2873. 2004-03-12 Paolo Bonzini <bonzini@gnu.org>
  2874. * lightning/fp-common.h: Load/store macros are not the
  2875. same for floats and doubles anywhere, but jit_retval may be.
  2876. * lightning/i386/asm.h: Fix = mistaken for == in ESCrri.
  2877. * lightning/i386/core.h: Fix typo in jit_prepare_[fd].
  2878. * lightning/i386/fp.h: Rewritten.
  2879. * tests/testfp.c: Add tests for unordered comparisons.
  2880. * tests/testfp.ok: Add results.
  2881. 2004-03-15 Paolo Bonzini <bonzini@gnu.org>
  2882. Merge changes from Laurent Michel.
  2883. * lightning/asm-common.h: Add _jit_I_noinc.
  2884. * lightning/core-common.h: Support jit_init,
  2885. jit_setup_code, jit_patch_at. Return patchable IP from
  2886. jit_movi_p.
  2887. * lightning/funcs-common.h: Provide defaults
  2888. for jit_setup_code, jit_start_pfx, jit_end_pfx
  2889. * lightning/i386/core.h: Add jit_patch_at, jit_patch_movi.
  2890. * lightning/ppc/core.h: Likewise.
  2891. * lightning/sparc/core.h: Likewise.
  2892. * lightning/ppc/asm.h: Fix generation of branch destination
  2893. displacements in _FB and _BB
  2894. * lightning/ppc/core.h: Generate trampolines in the user
  2895. area.
  2896. * lightning/ppc/funcs.h: Add a few casts.
  2897. * tests/bc.c: New testcase.
  2898. * lightning/i386/asm.h: Wrap into #ifndef LIGHTNING_DEBUG.
  2899. * lightning/ppc/asm.h: Wrap into #ifndef LIGHTNING_DEBUG.
  2900. * lightning/sparc/asm.h: Wrap into #ifndef LIGHTNING_DEBUG.
  2901. 2004-03-09 Paolo Bonzini <bonzini@gnu.org>
  2902. * lightning/sparc/fp.h: Rewrite. Move macros for
  2903. FP code generation...
  2904. * lightning/sparc/asm.h: ... here.
  2905. * lightning/sparc/core.h: Rename jit_prepare to
  2906. jit_prepare_i, jit_retval to jit_retval_i.
  2907. * lightning/ppc/core.h: Rename jit_prepare to
  2908. jit_prepare_i, jit_retval to jit_retval_i.
  2909. * lightning/i386/core.h: Rename jit_prepare to
  2910. jit_prepare_i, jit_retval to jit_retval_i.
  2911. * lightning/core-common.h: Provide backwards
  2912. compatible synonyms for the above.
  2913. * lightning/fp-common.h: Rewrite.
  2914. * lightning-inst.h: Include fp unconditionally.
  2915. * lightning.h.in: Include fp unconditionally.
  2916. * tests/Makefile.am: Enable fp tests.
  2917. * tests/fib.c: Use jit_retval_i.
  2918. * tests/fibit.c: Cast codeBuffer to char *.
  2919. * tests/funcfp.c: Use new fp macros.
  2920. * tests/printf.c: Use jit_retval_i.
  2921. * tests/rpnfp.c: Use new fp macros.
  2922. * tests/testfp.c: Use new fp macros.
  2923. 2004-03-02 Paolo Bonzini <bonzini@gnu.org>
  2924. * lightning/i386/core.h: generate correct code when
  2925. doing lt/le/ge/etc. on ESI and EDI. Use MOVZX/MOVSX
  2926. where possible.
  2927. * lightning/i386/asm.h: Add macros for MOVZX/MOVSX.
  2928. Move macros for x87 here, and add many of them.
  2929. * lightning/i386/fp.h: Use new macros for x87.
  2930. 2004-02-06 Paolo Bonzini <bonzini@gnu.org>
  2931. * lightning/i386/core.h: avoid generating MOV reg, reg.
  2932. * lightning/sparc/core.h: fix several bugs.
  2933. * lightning/ppc/core.h: fix several bugs.
  2934. * tests/rpn.c: rewritten.
  2935. 2004-01-08 Paolo Bonzini <bonzini@gnu.org>
  2936. * tests/rpnfp.c: new example, suggested by Basile
  2937. Starynkevitch.
  2938. * tests/rpnfp.ok: new example.
  2939. 2003-12-12 Paolo Bonzini <bonzini@gnu.org>
  2940. * tests/add.c: new test, suggested by Steve Dekorte.
  2941. * tests/add.c: new test.
  2942. 2003-11-14 Paolo Bonzini <bonzini@gnu.org>
  2943. John Redford <eirenik@hotmail.com>
  2944. * lightning/asm-common.h: change the 'pc' field of _jit to
  2945. be a union of various data types, because ISO C99 doesn't
  2946. permit using ++ on a = cast. Change the incremented casts of
  2947. _jit.pc to be _jit.x.uc_pc, _jit.x.us_pc, etc.
  2948. * all files: change all non-cast instances of _jit.pc to be
  2949. _jit.x.pc.
  2950. * lightning/i386/core.h: remove casts from jit_might.
  2951. 2003-05-25 Paolo Bonzini <bonzini@gnu.org>
  2952. * lightning/i386/core.h: use JITSORRY in jit_replace
  2953. * lightning/asm-common.h: define JITSORRY
  2954. 2003-05-14 Paolo Bonzini <bonzini@gnu.org>
  2955. * lightning/i386/core.h: fix missing comma in several
  2956. load/store macros.
  2957. * lightning/core-common.h: fix long/unsigned long/pointer
  2958. jit_pushr/jit_popr.
  2959. * lightning/ppc/funcs.h: correctly align stack pointer
  2960. No changelogs for the assemblers (lightning directory) until 1.0
  2961. 2003-03-27 Paolo Bonzini <bonzini@gnu.org>
  2962. * tests/printf2.c: new test
  2963. 2001-05-03 Paolo Bonzini <bonzini@gnu.org>
  2964. * tests/printf.c: made the message platform independent
  2965. 2001-01-19 Paolo Bonzini <bonzini@gnu.org>
  2966. * configure.in: support cross-assembling
  2967. * disass/bfd.h, disass/dis-asm.h, disass/dis-buf.c,
  2968. disass/i386-dis.c, disass/i386.h, disass/ppc-dis.c,
  2969. disass/ppc.h, disass/ppc-opc.c, disass/sparc-dis.c,
  2970. disass/sparc.h, disass/sparc-opc.c: new files, from GDB
  2971. * disass/disass.c, disass/Makefile.am: new files
  2972. * tests/fib.c, tests/fibit.c, tests/incr.c, tests/printf.c,
  2973. tests/rpn.c, tests/testfp.c, tests/Makefile.am: support
  2974. disassembling