999-cvs-updates.patch 150 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522
  1. Index: ChangeLog
  2. ===================================================================
  3. RCS file: /cvs/gcc/gcc/ChangeLog,v
  4. retrieving revision 1.621.2.52
  5. retrieving revision 1.621.2.53
  6. diff -u -r1.621.2.52 -r1.621.2.53
  7. --- gcc/ChangeLog 30 Sep 2004 16:47:59 -0000 1.621.2.52
  8. +++ gcc/ChangeLog 6 Oct 2004 12:00:52 -0000 1.621.2.53
  9. @@ -1,3 +1,7 @@
  10. +2004-10-06 Josef Zlomek <josef.zlomek@email.cz>
  11. +
  12. + * MAINTAINERS: Update my e-mail address.
  13. +
  14. 2004-09-30 Release Manager
  15. * GCC 3.3.5 Released.
  16. Index: MAINTAINERS
  17. ===================================================================
  18. RCS file: /cvs/gcc/gcc/MAINTAINERS,v
  19. retrieving revision 1.253.2.18
  20. retrieving revision 1.253.2.19
  21. diff -u -r1.253.2.18 -r1.253.2.19
  22. --- gcc/MAINTAINERS 16 Jan 2004 23:33:12 -0000 1.253.2.18
  23. +++ gcc/MAINTAINERS 6 Oct 2004 12:00:53 -0000 1.253.2.19
  24. @@ -258,7 +258,7 @@
  25. John Wehle john@feith.com
  26. Florian Weimer fw@deneb.enyo.de
  27. Mark Wielaard mark@gcc.gnu.org
  28. -Josef Zlomek zlomekj@suse.cz
  29. +Josef Zlomek josef.zlomek@email.cz
  30. GNATS only accounts
  31. Index: gcc/ChangeLog
  32. ===================================================================
  33. RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
  34. retrieving revision 1.16114.2.1019
  35. retrieving revision 1.16114.2.1059
  36. diff -u -r1.16114.2.1019 -r1.16114.2.1059
  37. --- gcc/gcc/ChangeLog 30 Sep 2004 16:45:01 -0000 1.16114.2.1019
  38. +++ gcc/gcc/ChangeLog 29 Jan 2005 11:53:57 -0000 1.16114.2.1059
  39. @@ -1,3 +1,314 @@
  40. +2005-01-29 Alan Modra <amodra@bigpond.net.au>
  41. +
  42. + * unwind-dw2.c (execute_stack_op): Add missing cases for
  43. + DW_OP_shl, DW_OP_shr, DW_OP_shra, DW_OP_xor.
  44. +
  45. +2005-01-28 Stephane Carrez <stcarrez@nerim.fr>
  46. +
  47. + PR target/15384
  48. + * config/m68hc11/t-m68hc11-gas (dp-bit.c): Fix typo causing a
  49. + configuration part of dp-bit.c to be lost.
  50. +
  51. +2005-01-27 Ulrich Weigand <uweigand@de.ibm.com>
  52. +
  53. + PR target/17771
  54. + Backport from mainline:
  55. + * config/s390/s390.md ("reload_outti"): Remove predicate for
  56. + output operand. Abort if operand is not a MEM.
  57. + ("reload_outdi", "reload_outdf"): Likewise.
  58. +
  59. +2005-01-22 Roger Sayle <roger@eyesopen.com>
  60. +
  61. + PR target/18402
  62. + Backport from mainline
  63. + 2003-02-05 Jakub Jelinek <jakub@redhat.com>
  64. +
  65. + PR optimization/8555
  66. + * config/i386/i386.md (sse_mov?fcc split): Handle op2 == op3 case
  67. + instead of aborting.
  68. +
  69. +2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  70. +
  71. + * gccbug.in: Update optimization -> tree-optimization/rtl-optimization.
  72. +
  73. +2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  74. +
  75. + PR c++/17115
  76. + * tree-inline.c (expand_call_inline): Do not warn for functions
  77. + marked with attribute noinline.
  78. +
  79. +2005-01-18 Eric Botcazou <ebotcazou@libertysurf.fr>
  80. +
  81. + PR rtl-optimization/19296
  82. + * combine.c (simplify_comparison): Rewrite the condition under
  83. + which a non-paradoxical SUBREG of a PLUS can be lifted when
  84. + compared against a constant.
  85. +
  86. +2004-01-14 David Mosberger <davidm@hpl.hp.com>
  87. + James E Wilson <wilson@specifixinc.com>
  88. +
  89. + PR target/18987
  90. + * config/ia64/ia64.c (process_set): For alloc insn, only call
  91. + process_epilogue is !frame_pointer_needed.
  92. +
  93. + PR target/13158
  94. + * config/ia64/ia64.c (ia64_expand_epilogue): Set RTX_FRAME_RELATED_P on
  95. + sibcall alloc instruction.
  96. + (process_set): Handle sibcall alloc instruction.
  97. +
  98. +2005-01-13 David O'Brien <obrien@FreeBSD.org>
  99. +
  100. + Backport from mainline:
  101. + * config/freebsd-spec.h: Use KSE pthread lib for -pthread.
  102. +
  103. +2005-01-08 Sergey M. Samoylov <ssamoylov@dev.rtsoft.ru>
  104. +
  105. + Backport:
  106. + 2004-02-12 Richard Sandiford <rsandifo@redhat.com>
  107. + PR bootstrap/13617
  108. + * config/mips/mips-protos.h (mips_output_aligned_decl_common): Declare.
  109. + (mips_declare_object): Make variadic.
  110. + * config/mips/mips.h (ASM_OUTPUT_ALIGNED_DECL_COMMON): Use
  111. + mips_output_aligned_decl_common.
  112. + * config/mips/mips.c (mips_output_aligned_decl_common): New function.
  113. + (mips_declare_object): Make variadic.
  114. +
  115. +2005-01-08 Richard Sandiford <rsandifo@redhat.com>
  116. +
  117. + PR target/17565
  118. + * config/mips/mips.md (define_asm_attributes): Set can_delay to no.
  119. +
  120. +2004-12-27 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
  121. +
  122. + * vax.c (vax_address_cost, vax_rtx_cost): Correct casts.
  123. + (vax_rtx_cost): Handle small offsets for both PLUS and MINUS.
  124. +
  125. +2004-12-27 Steven Bosscher <stevenb@suse.de>
  126. + John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
  127. +
  128. + rtl-optimization/12863
  129. + * config/vax/vax.h (CASE_DROPS_THROUGH): Don't define.
  130. + * config/vax/vax.md (casesi): Emit a test-and-branch to make sure
  131. + that the case is in range, to make sure the casesi insn is always
  132. + in range and never falls through.
  133. + (casesi1): Add comment to explain why casesi never falls through.
  134. + Remove the unnamed special case casesi pattern.
  135. +
  136. +2004-12-26 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
  137. +
  138. + PR target/17643
  139. + * config/pa/pa32-linux.h (FUNCTION_OK_FOR_SIBCALL): Return false when
  140. + TARGET_PORTABLE_RUNTIME is true.
  141. +
  142. +2004-12-25 Alan Modra <amodra@bigpond.net.au>
  143. +
  144. + PR target/19147
  145. + * config/rs6000/rs6000.md (andsi3_internal7, andsi3_internal8): Delete.
  146. +
  147. +2004-12-21 Joseph S. Myers <jsm@polyomino.org.uk>
  148. +
  149. + PR c/14765
  150. + * c-parse.in (compstmt_primary_start): Set last_expr_type to
  151. + NULL_TREE.
  152. +
  153. +2004-12-19 Roger Sayle <roger@eyesopen.com>
  154. +
  155. + PR middle-end/19068
  156. + * expr.c (expand_expr_real_1) <MAX_EXPR>: Ensure that target, op0
  157. + and op1 are all registers (or constants) before expanding the RTL
  158. + comparison sequence [to avoid reg_overlap_mentioned (target, op1)].
  159. +
  160. +2004-12-16 Eric Botcazou <ebotcazou@adacore.com>
  161. +
  162. + PR middle-end/18882
  163. + * function.c (assign_stack_local_1): Use BITS_PER_UNIT alignment
  164. + when passed -2 as 'align'.
  165. + (put_var_into_stack): Adjust calls to put_reg_into_stack.
  166. + When passed a CONCAT, instruct put_reg_into_stack to use
  167. + a consecutive stack slot for the second part.
  168. + (put_reg_into_stack): Remove 'promoted_mode' parameter, add
  169. + 'consecutive_p' parameter. Retrieve the register mode from 'reg'.
  170. + When consecutive_p is true, instruct assign_stack_local_1 to use
  171. + BITS_PER_UNIT alignment.
  172. + (put_addressof_into_stack): Adjust call to put_reg_into_stack.
  173. +
  174. +2004-12-16 Eric Botcazou <ebotcazou@libertysurf.fr>
  175. +
  176. + PR middle-end/18590
  177. + * function.c (fixup_var_refs_insns_with_hash): Do not invoke
  178. + fixup_var_refs_insn on insns marked as deleted.
  179. +
  180. +2004-12-15 Richard Henderson <rth@redhat.com>
  181. +
  182. + PR target/19005
  183. + * config/i386/i386.md (swaphi_1): Swap with swaphi_2, allow with
  184. + optimize_size.
  185. + (swapqi_1): Rename from swapqi. Enable only for no partial reg
  186. + stall and optimize_size.
  187. + (swapqi_2): New.
  188. + (swaphi_1, swaphi_2, swapqi_1): Add athlon_decode.
  189. + (swapsi, swaphi_1, swaphi_2, swapqi_1, swapdi): Remove modrm override.
  190. +
  191. +2004-12-13 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
  192. +
  193. + PR middle-end/18730
  194. + * emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn): When
  195. + the first/last insn is a sequence, return the first/last insn of the
  196. + sequence.
  197. +
  198. +2004-12-12 Richard Henderson <rth@redhat.com>
  199. +
  200. + PR target/18932
  201. + * config/i386/i386.md (all splits and peepholes): Use flags_reg_operand
  202. + and compare_operator to propagate the input CC mode to the output.
  203. + * config/i386/i386.c (flags_reg_operand, compare_operator): New.
  204. + * config/i386/i386.h (PREDICATE_CODES): Add them.
  205. + * config/i386/i386-protos.h: Update.
  206. +
  207. +2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
  208. +
  209. + PR rtl-optimization/16536
  210. + Backport from mainline:
  211. + 2004-06-25 Mark Mitchell <mark@codesourcery.com>
  212. + * alias.c (get_alias_set): Adjust setting of
  213. + DECL_POINTER_ALIAS_SET for pointers to aggregates.
  214. +
  215. +2004-12-09 Richard Henderson <rth@redhat.com>
  216. +
  217. + PR target/17025
  218. + * config/i386/i386.md (testqi_1_maybe_si, andqi_2_maybe_si): New.
  219. + (test_qi_1, andqi_2): Do not promote to simode.
  220. +
  221. +2004-12-07 David Mosberger <davidm@hpl.hp.com>
  222. +
  223. + PR target/18443
  224. + * config/ia64/ia64.c (ia64_assemble_integer): Add support for
  225. + emitting unaligned pointer-sized integers.
  226. +
  227. +2004-12-05 Richard Henderson <rth@redhat.com>
  228. +
  229. + PR target/18841
  230. + * config/alpha/alpha.md (UNSPECV_SETJMPR_ER): New.
  231. + (builtin_setjmp_receiver_er_sl_1): Use it.
  232. + (builtin_setjmp_receiver_er_1): Likewise.
  233. + (builtin_setjmp_receiver_er, exception_receiver_er): Remove.
  234. + (builtin_setjmp_receiver): Don't split for explicit relocs until
  235. + after reload.
  236. + (exception_receiver): Likewise.
  237. +
  238. +2004-12-03 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
  239. +
  240. + 2003-10-31 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
  241. + Backport from mainline
  242. + * aclocal.m4 (gcc_AC_FUNC_MMAP_BLACKLIST): Blacklist ultrix*.
  243. + * configure: Rebuilt.
  244. +
  245. +2004-12-03 Richard Henderson <rth@redhat.com>
  246. +
  247. + 2004-09-24 Richard Henderson <rth@redhat.com>
  248. + PR rtl-opt/17503
  249. + * regclass.c (subregs_of_mode): Turn into an htab. Make static.
  250. + (som_hash, som_eq): New.
  251. + (init_subregs_of_mode, record_subregs_of_mode): New.
  252. + (cannot_change_mode_set_regs): Rewrite for htab implementation.
  253. + (invalid_mode_change_p): Likewise.
  254. + * combine.c (gen_lowpart_for_combine): Use record_subregs_of_mode.
  255. + * flow.c (mark_used_regs): Likewise.
  256. + (life_analysis): Use init_subregs_of_mode.
  257. + * regs.h (subregs_of_mode): Remove.
  258. + * rtl.h (init_subregs_of_mode, record_subregs_of_mode): Declare.
  259. +
  260. +2004-12-03 Roger Sayle <roger@eyesopen.com>
  261. +
  262. + PR target/9908
  263. + * config/i386/i386.md (*call_value_1): Correct Intel assembler
  264. + syntax by using %A1 instead of %*%1.
  265. +
  266. +2004-12-01 Alan Modra <amodra@bigpond.net.au>
  267. +
  268. + PR target/12817
  269. + * config/rs6000/rs6000.c (rs6000_emit_prologue): Use r0 for vrsave.
  270. +
  271. +2004-11-29 Roger Sayle <roger@eyesopen.com>
  272. +
  273. + PR rtl-optimization/9771
  274. + * regclass.c (CALL_REALLY_USED_REGNO_P): New macro to eliminate
  275. + conditional compilation in init_reg_sets_1.
  276. + (init_reg_sets_1): Let global_regs[i] take priority over the frame
  277. + (but not stack) pointer exceptions to regs_invalidated_by_call.
  278. + (globalize_reg): Globalizing a fixed register may need to update
  279. + regs_invalidated_by_call.
  280. +
  281. +2004-11-27 Falk Hueffner <falk@debian.org>
  282. + Eric Botcazou <ebotcazou@libertysurf.fr>
  283. +
  284. + PR optimization/18577
  285. + * unroll.c (unroll_loop): Test both REGNO_LAST_UID and
  286. + REGNO_LAST_NOTE_UID to decide whether a pseudo is local
  287. + to the loop.
  288. +
  289. +2004-11-27 Alan Modra <amodra@bigpond.net.au>
  290. +
  291. + PR target/12769
  292. + * config/rs6000/rs6000.c (init_cumulative_args): Set call_cookie
  293. + from rs6000_default_long_calls for libcalls.
  294. +
  295. +2004-11-25 Richard Henderson <rth@redhat.com>
  296. +
  297. + PR c++/6764
  298. + * reload1.c (set_initial_eh_label_offset): New.
  299. + (set_initial_label_offsets): Use it.
  300. +
  301. +2004-11-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
  302. +
  303. + PR rtl-optimization/14838
  304. + * emit-rtl.c (get_first_nonnote_insn): Don't assume first insn is a
  305. + note.
  306. + (get_last_nonnote_insn): Don't assume last insn is a note.
  307. +
  308. +2004-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  309. +
  310. + * doc/install.texi (*-*-solaris2*): Update with info about kernel
  311. + patches to solve spurious testsuite failures.
  312. +
  313. +2004-10-13 Eric Botcazou <ebotcazou@libertysurf.fr>
  314. +
  315. + PR target/14454
  316. + * config/sparc/sparc.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Set to
  317. + sparc_can_output_mi_thunk.
  318. + (sparc_output_mi_thunk): Simplify handling of delta offset. Add
  319. + handling of vcall offset.
  320. + (sparc_can_output_mi_thunk): New predicate.
  321. + * doc/tm.texi (TARGET_ASM_OUTPUT_MI_THUNK): Document VCALL_OFFSET.
  322. + (TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Delete.
  323. + (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New target hook.
  324. +
  325. + * config/sparc/sparc.md (movdi): Remove redundant test.
  326. +
  327. +2004-10-07 Eric Botcazou <ebotcazou@libertysurf.fr>
  328. +
  329. + * doc/install.texi (*-*-solaris2*): Fix marker for URL.
  330. +
  331. +2004-10-06 Eric Botcazou <ebotcazou@libertysurf.fr>
  332. +
  333. + PR target/16007
  334. + * doc/install.texi (*-*-solaris2*): Mention potential problem
  335. + with Sun assembler + GNU linker and C++ programs.
  336. + Document status of binutils 2.15 release.
  337. +
  338. +2004-09-30 Richard Henderson <rth@redhat.com>
  339. +
  340. + * config/alpha/qrnnd.asm: Mark for noexecstack.
  341. +
  342. +2004-09-30 Richard Henderson <rth@redhat.com>
  343. +
  344. + * unwind-dw2.c (_Unwind_GetGR): Honor DWARF_ZERO_REG.
  345. + * doc/tm.texi (DWARF_ZERO_REG): New.
  346. +
  347. + * config/alpha/alpha.c (alpha_sa_mask, alpha_expand_prologue,
  348. + alpha_expand_epilogue): Revert 2003-09-30 change to store zero.
  349. + * config/alpha/alpha.h (DWARF_ZERO_REG): New.
  350. +
  351. 2004-09-30 Release Manager
  352. * GCC 3.3.5 Released.
  353. @@ -19,12 +330,12 @@
  354. 2004-09-13 Richard Henderson <rth@redhat.com>
  355. - PR inline-asm/6806
  356. - * cselib.c (cselib_invalidate_rtx): Export. Remove unused args.
  357. - (cselib_invalidate_rtx_note_stores): New.
  358. - (cselib_record_sets, cselib_process_insn): Update to match.
  359. - * cselib.h (cselib_invalidate_rtx): Declare.
  360. - * reload1.c (reload_cse_simplify): Invalidate asm clobbers.
  361. + PR inline-asm/6806
  362. + * cselib.c (cselib_invalidate_rtx): Export. Remove unused args.
  363. + (cselib_invalidate_rtx_note_stores): New.
  364. + (cselib_record_sets, cselib_process_insn): Update to match.
  365. + * cselib.h (cselib_invalidate_rtx): Declare.
  366. + * reload1.c (reload_cse_simplify): Invalidate asm clobbers.
  367. 2004-08-29 Jonathan Wakely <redi@gcc.gnu.org>
  368. @@ -83,7 +394,7 @@
  369. 2004-07-25 Andreas Jaeger <aj@suse.de>
  370. Backport from mainline:
  371. - * libgcc-std.ver: Add __unorddf2 and __unordsf2 with version 3.3.4.
  372. + * libgcc-std.ver: Add __unorddf2 and __unordsf2 with version 3.3.4.
  373. 2004-07-25 Kaz Kojima <kkojima@gcc.gnu.org>
  374. @@ -155,14 +466,14 @@
  375. side-effect of having a length greater or equal to 3.
  376. 2004-07-13 Eric Botcazou <ebotcazou@libertysurf.fr>
  377. - Lloyd Parkes <lloyd@must-have-coffee.gen.nz>
  378. + Lloyd Parkes <lloyd@must-have-coffee.gen.nz>
  379. PR target/15186
  380. * config/sparc/sol2-bi.h (LINK_ARCH64_SPEC_BASE): Pass
  381. /usr/ucblib/sparcv9 as -R path when -compat-bsd is specified.
  382. 2004-07-13 Eric Botcazou <ebotcazou@libertysurf.fr>
  383. - Martin Sebor <sebor@roguewave.com>
  384. + Martin Sebor <sebor@roguewave.com>
  385. PR target/12602
  386. * doc/invoke.texi (SPARC options): Document -threads
  387. @@ -252,18 +563,18 @@
  388. Backport from mainline:
  389. 2004-01-19 Richard Henderson <rth@redhat.com>
  390. - * alpha.md (UNSPEC_NT_LDA): Renumber.
  391. - (UNSPEC_CVTLQ, cvtlq): New.
  392. - (extendsidi2_1): Rename from extendsidi2_nofix; remove f/f.
  393. - (extendsidi2_fix): Remove.
  394. - (extendsidi2 splitter): Use cvtlq.
  395. - (extendsidi2 fp peepholes): Remove.
  396. - (cvtql): Use SFmode instead of SImode.
  397. - (fix_trunc?fsi): Update to match.
  398. - (floatsisf2_ieee, floatsisf2, floatsidf2_ieee, floatsidf2): New.
  399. - (movsi): Rename from movsi_nofix, remove f alternatives.
  400. - (movsi_nt_vms): Similarly.
  401. - (movsi_fix, movsi_nt_vms_fix): Remove.
  402. + * alpha.md (UNSPEC_NT_LDA): Renumber.
  403. + (UNSPEC_CVTLQ, cvtlq): New.
  404. + (extendsidi2_1): Rename from extendsidi2_nofix; remove f/f.
  405. + (extendsidi2_fix): Remove.
  406. + (extendsidi2 splitter): Use cvtlq.
  407. + (extendsidi2 fp peepholes): Remove.
  408. + (cvtql): Use SFmode instead of SImode.
  409. + (fix_trunc?fsi): Update to match.
  410. + (floatsisf2_ieee, floatsisf2, floatsidf2_ieee, floatsidf2): New.
  411. + (movsi): Rename from movsi_nofix, remove f alternatives.
  412. + (movsi_nt_vms): Similarly.
  413. + (movsi_fix, movsi_nt_vms_fix): Remove.
  414. 2004-05-26 Hans-Peter Nilsson <hp@axis.com>
  415. Index: gcc/aclocal.m4
  416. ===================================================================
  417. RCS file: /cvs/gcc/gcc/gcc/aclocal.m4,v
  418. retrieving revision 1.61.2.4
  419. retrieving revision 1.61.2.5
  420. diff -u -r1.61.2.4 -r1.61.2.5
  421. --- gcc/gcc/aclocal.m4 1 Oct 2003 21:56:34 -0000 1.61.2.4
  422. +++ gcc/gcc/aclocal.m4 4 Dec 2004 01:51:47 -0000 1.61.2.5
  423. @@ -413,7 +413,7 @@
  424. # read() to the same fd. The only system known to have a problem here
  425. # is VMS, where text files have record structure.
  426. case "$host_os" in
  427. - vms*)
  428. + vms* | ultrix*)
  429. gcc_cv_func_mmap_file=no ;;
  430. *)
  431. gcc_cv_func_mmap_file=yes;;
  432. Index: gcc/alias.c
  433. ===================================================================
  434. RCS file: /cvs/gcc/gcc/gcc/alias.c,v
  435. retrieving revision 1.181.2.6
  436. retrieving revision 1.181.2.7
  437. diff -u -r1.181.2.6 -r1.181.2.7
  438. --- gcc/gcc/alias.c 28 May 2004 17:27:27 -0000 1.181.2.6
  439. +++ gcc/gcc/alias.c 10 Dec 2004 17:25:00 -0000 1.181.2.7
  440. @@ -508,6 +508,8 @@
  441. /* If we haven't computed the actual alias set, do it now. */
  442. if (DECL_POINTER_ALIAS_SET (decl) == -2)
  443. {
  444. + tree pointed_to_type = TREE_TYPE (TREE_TYPE (decl));
  445. +
  446. /* No two restricted pointers can point at the same thing.
  447. However, a restricted pointer can point at the same thing
  448. as an unrestricted pointer, if that unrestricted pointer
  449. @@ -516,11 +518,22 @@
  450. alias set for the type pointed to by the type of the
  451. decl. */
  452. HOST_WIDE_INT pointed_to_alias_set
  453. - = get_alias_set (TREE_TYPE (TREE_TYPE (decl)));
  454. + = get_alias_set (pointed_to_type);
  455. if (pointed_to_alias_set == 0)
  456. /* It's not legal to make a subset of alias set zero. */
  457. - ;
  458. + DECL_POINTER_ALIAS_SET (decl) = 0;
  459. + else if (AGGREGATE_TYPE_P (pointed_to_type))
  460. + /* For an aggregate, we must treat the restricted
  461. + pointer the same as an ordinary pointer. If we
  462. + were to make the type pointed to by the
  463. + restricted pointer a subset of the pointed-to
  464. + type, then we would believe that other subsets
  465. + of the pointed-to type (such as fields of that
  466. + type) do not conflict with the type pointed to
  467. + by the restricted pointer. */
  468. + DECL_POINTER_ALIAS_SET (decl)
  469. + = pointed_to_alias_set;
  470. else
  471. {
  472. DECL_POINTER_ALIAS_SET (decl) = new_alias_set ();
  473. Index: gcc/c-parse.in
  474. ===================================================================
  475. RCS file: /cvs/gcc/gcc/gcc/c-parse.in,v
  476. retrieving revision 1.152.14.1
  477. retrieving revision 1.152.14.2
  478. diff -u -r1.152.14.1 -r1.152.14.2
  479. --- gcc/gcc/c-parse.in 28 Jan 2003 01:54:03 -0000 1.152.14.1
  480. +++ gcc/gcc/c-parse.in 21 Dec 2004 21:51:26 -0000 1.152.14.2
  481. @@ -2177,6 +2177,7 @@
  482. push_label_level ();
  483. compstmt_count++;
  484. $$ = add_stmt (build_stmt (COMPOUND_STMT, last_tree));
  485. + last_expr_type = NULL_TREE;
  486. }
  487. ;
  488. Index: gcc/combine.c
  489. ===================================================================
  490. RCS file: /cvs/gcc/gcc/gcc/combine.c,v
  491. retrieving revision 1.325.2.17
  492. retrieving revision 1.325.2.19
  493. diff -u -r1.325.2.17 -r1.325.2.19
  494. --- gcc/gcc/combine.c 25 Jul 2004 18:49:54 -0000 1.325.2.17
  495. +++ gcc/gcc/combine.c 18 Jan 2005 08:39:05 -0000 1.325.2.19
  496. @@ -10138,13 +10138,8 @@
  497. result = gen_lowpart_common (mode, x);
  498. #ifdef CANNOT_CHANGE_MODE_CLASS
  499. - if (result != 0
  500. - && GET_CODE (result) == SUBREG
  501. - && GET_CODE (SUBREG_REG (result)) == REG
  502. - && REGNO (SUBREG_REG (result)) >= FIRST_PSEUDO_REGISTER)
  503. - bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (result))
  504. - * MAX_MACHINE_MODE
  505. - + GET_MODE (result));
  506. + if (result != 0 && GET_CODE (result) == SUBREG)
  507. + record_subregs_of_mode (result);
  508. #endif
  509. if (result)
  510. @@ -10818,34 +10813,61 @@
  511. break;
  512. case SUBREG:
  513. - /* Check for the case where we are comparing A - C1 with C2,
  514. - both constants are smaller than 1/2 the maximum positive
  515. - value in MODE, and the comparison is equality or unsigned.
  516. - In that case, if A is either zero-extended to MODE or has
  517. - sufficient sign bits so that the high-order bit in MODE
  518. - is a copy of the sign in the inner mode, we can prove that it is
  519. - safe to do the operation in the wider mode. This simplifies
  520. - many range checks. */
  521. + /* Check for the case where we are comparing A - C1 with C2, that is
  522. +
  523. + (subreg:MODE (plus (A) (-C1))) op (C2)
  524. +
  525. + with C1 a constant, and try to lift the SUBREG, i.e. to do the
  526. + comparison in the wider mode. One of the following two conditions
  527. + must be true in order for this to be valid:
  528. +
  529. + 1. The mode extension results in the same bit pattern being added
  530. + on both sides and the comparison is equality or unsigned. As
  531. + C2 has been truncated to fit in MODE, the pattern can only be
  532. + all 0s or all 1s.
  533. +
  534. + 2. The mode extension results in the sign bit being copied on
  535. + each side.
  536. +
  537. + The difficulty here is that we have predicates for A but not for
  538. + (A - C1) so we need to check that C1 is within proper bounds so
  539. + as to perturbate A as little as possible. */
  540. if (mode_width <= HOST_BITS_PER_WIDE_INT
  541. && subreg_lowpart_p (op0)
  542. + && GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (op0))) > mode_width
  543. && GET_CODE (SUBREG_REG (op0)) == PLUS
  544. - && GET_CODE (XEXP (SUBREG_REG (op0), 1)) == CONST_INT
  545. - && INTVAL (XEXP (SUBREG_REG (op0), 1)) < 0
  546. - && (-INTVAL (XEXP (SUBREG_REG (op0), 1))
  547. - < (HOST_WIDE_INT) (GET_MODE_MASK (mode) / 2))
  548. - && (unsigned HOST_WIDE_INT) const_op < GET_MODE_MASK (mode) / 2
  549. - && (0 == (nonzero_bits (XEXP (SUBREG_REG (op0), 0),
  550. - GET_MODE (SUBREG_REG (op0)))
  551. - & ~GET_MODE_MASK (mode))
  552. - || (num_sign_bit_copies (XEXP (SUBREG_REG (op0), 0),
  553. - GET_MODE (SUBREG_REG (op0)))
  554. - > (unsigned int)
  555. - (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (op0)))
  556. - - GET_MODE_BITSIZE (mode)))))
  557. + && GET_CODE (XEXP (SUBREG_REG (op0), 1)) == CONST_INT)
  558. {
  559. - op0 = SUBREG_REG (op0);
  560. - continue;
  561. + enum machine_mode inner_mode = GET_MODE (SUBREG_REG (op0));
  562. + rtx a = XEXP (SUBREG_REG (op0), 0);
  563. + HOST_WIDE_INT c1 = -INTVAL (XEXP (SUBREG_REG (op0), 1));
  564. +
  565. + if ((c1 > 0
  566. + && (unsigned HOST_WIDE_INT) c1
  567. + < (unsigned HOST_WIDE_INT) 1 << (mode_width - 1)
  568. + && (equality_comparison_p || unsigned_comparison_p)
  569. + /* (A - C1) zero-extends if it is positive and sign-extends
  570. + if it is negative, C2 both zero- and sign-extends. */
  571. + && ((0 == (nonzero_bits (a, inner_mode)
  572. + & ~GET_MODE_MASK (mode))
  573. + && const_op >= 0)
  574. + /* (A - C1) sign-extends if it is positive and 1-extends
  575. + if it is negative, C2 both sign- and 1-extends. */
  576. + || (num_sign_bit_copies (a, inner_mode)
  577. + > (unsigned int) (GET_MODE_BITSIZE (inner_mode)
  578. + - mode_width)
  579. + && const_op < 0)))
  580. + || ((unsigned HOST_WIDE_INT) c1
  581. + < (unsigned HOST_WIDE_INT) 1 << (mode_width - 2)
  582. + /* (A - C1) always sign-extends, like C2. */
  583. + && num_sign_bit_copies (a, inner_mode)
  584. + > (unsigned int) (GET_MODE_BITSIZE (inner_mode)
  585. + - mode_width - 1)))
  586. + {
  587. + op0 = SUBREG_REG (op0);
  588. + continue;
  589. + }
  590. }
  591. /* If the inner mode is narrower and we are extracting the low part,
  592. Index: gcc/configure
  593. ===================================================================
  594. RCS file: /cvs/gcc/gcc/gcc/configure,v
  595. retrieving revision 1.641.2.23
  596. retrieving revision 1.641.2.24
  597. diff -u -r1.641.2.23 -r1.641.2.24
  598. --- gcc/gcc/configure 1 Apr 2004 16:55:23 -0000 1.641.2.23
  599. +++ gcc/gcc/configure 4 Dec 2004 01:51:43 -0000 1.641.2.24
  600. @@ -2399,7 +2399,7 @@
  601. fi
  602. # Find some useful tools
  603. -for ac_prog in gawk mawk nawk awk
  604. +for ac_prog in mawk gawk nawk awk
  605. do
  606. # Extract the first word of "$ac_prog", so it can be a program name with args.
  607. set dummy $ac_prog; ac_word=$2
  608. @@ -3947,7 +3947,7 @@
  609. # read() to the same fd. The only system known to have a problem here
  610. # is VMS, where text files have record structure.
  611. case "$host_os" in
  612. - vms*)
  613. + vms* | ultrix*)
  614. gcc_cv_func_mmap_file=no ;;
  615. *)
  616. gcc_cv_func_mmap_file=yes;;
  617. @@ -8120,7 +8120,7 @@
  618. echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
  619. echo $ac_n "checking linker --as-needed support""... $ac_c" 1>&6
  620. -echo "configure:8250: checking linker --as-needed support" >&5
  621. +echo "configure:8124: checking linker --as-needed support" >&5
  622. gcc_cv_ld_as_needed=no
  623. if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
  624. if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
  625. @@ -8144,7 +8144,7 @@
  626. case "$target" in
  627. mips*-*-*)
  628. echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
  629. -echo "configure:8127: checking whether libgloss uses STARTUP directives consistently" >&5
  630. +echo "configure:8148: checking whether libgloss uses STARTUP directives consistently" >&5
  631. gcc_cv_mips_libgloss_startup=no
  632. gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
  633. if test "x$exec_prefix" = xNONE; then
  634. @@ -8349,7 +8349,7 @@
  635. echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
  636. -echo "configure:8332: checking whether to enable maintainer-specific portions of Makefiles" >&5
  637. +echo "configure:8353: checking whether to enable maintainer-specific portions of Makefiles" >&5
  638. # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
  639. if test "${enable_maintainer_mode+set}" = set; then
  640. enableval="$enable_maintainer_mode"
  641. Index: gcc/emit-rtl.c
  642. ===================================================================
  643. RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
  644. retrieving revision 1.303.2.5
  645. retrieving revision 1.303.2.7
  646. diff -u -r1.303.2.5 -r1.303.2.7
  647. --- gcc/gcc/emit-rtl.c 18 Jun 2004 17:08:48 -0000 1.303.2.5
  648. +++ gcc/gcc/emit-rtl.c 14 Dec 2004 04:06:08 -0000 1.303.2.7
  649. @@ -2890,11 +2890,19 @@
  650. {
  651. rtx insn = first_insn;
  652. - while (insn)
  653. + if (insn)
  654. {
  655. - insn = next_insn (insn);
  656. - if (insn == 0 || GET_CODE (insn) != NOTE)
  657. - break;
  658. + if (NOTE_P (insn))
  659. + for (insn = next_insn (insn);
  660. + insn && NOTE_P (insn);
  661. + insn = next_insn (insn))
  662. + continue;
  663. + else
  664. + {
  665. + if (GET_CODE (insn) == INSN
  666. + && GET_CODE (PATTERN (insn)) == SEQUENCE)
  667. + insn = XVECEXP (PATTERN (insn), 0, 0);
  668. + }
  669. }
  670. return insn;
  671. @@ -2908,11 +2916,20 @@
  672. {
  673. rtx insn = last_insn;
  674. - while (insn)
  675. + if (insn)
  676. {
  677. - insn = previous_insn (insn);
  678. - if (insn == 0 || GET_CODE (insn) != NOTE)
  679. - break;
  680. + if (NOTE_P (insn))
  681. + for (insn = previous_insn (insn);
  682. + insn && NOTE_P (insn);
  683. + insn = previous_insn (insn))
  684. + continue;
  685. + else
  686. + {
  687. + if (GET_CODE (insn) == INSN
  688. + && GET_CODE (PATTERN (insn)) == SEQUENCE)
  689. + insn = XVECEXP (PATTERN (insn), 0,
  690. + XVECLEN (PATTERN (insn), 0) - 1);
  691. + }
  692. }
  693. return insn;
  694. Index: gcc/expr.c
  695. ===================================================================
  696. RCS file: /cvs/gcc/gcc/gcc/expr.c,v
  697. retrieving revision 1.498.2.31
  698. retrieving revision 1.498.2.32
  699. diff -u -r1.498.2.31 -r1.498.2.32
  700. --- gcc/gcc/expr.c 16 May 2004 20:27:15 -0000 1.498.2.31
  701. +++ gcc/gcc/expr.c 20 Dec 2004 02:43:00 -0000 1.498.2.32
  702. @@ -8462,9 +8462,14 @@
  703. /* At this point, a MEM target is no longer useful; we will get better
  704. code without it. */
  705. - if (GET_CODE (target) == MEM)
  706. + if (! REG_P (target))
  707. target = gen_reg_rtx (mode);
  708. + /* We generate better code and avoid problems with op1 mentioning
  709. + target by forcing op1 into a pseudo if it isn't a constant. */
  710. + if (! CONSTANT_P (op1))
  711. + op1 = force_reg (mode, op1);
  712. +
  713. if (target != op0)
  714. emit_move_insn (target, op0);
  715. Index: gcc/flow.c
  716. ===================================================================
  717. RCS file: /cvs/gcc/gcc/gcc/flow.c,v
  718. retrieving revision 1.541.2.6
  719. retrieving revision 1.541.2.7
  720. diff -u -r1.541.2.6 -r1.541.2.7
  721. --- gcc/gcc/flow.c 5 Mar 2004 17:55:50 -0000 1.541.2.6
  722. +++ gcc/gcc/flow.c 4 Dec 2004 00:36:35 -0000 1.541.2.7
  723. @@ -431,9 +431,8 @@
  724. SET_HARD_REG_BIT (elim_reg_set, FRAME_POINTER_REGNUM);
  725. #endif
  726. -
  727. #ifdef CANNOT_CHANGE_MODE_CLASS
  728. - bitmap_initialize (&subregs_of_mode, 1);
  729. + init_subregs_of_mode ();
  730. #endif
  731. if (! optimize)
  732. @@ -3851,11 +3850,7 @@
  733. case SUBREG:
  734. #ifdef CANNOT_CHANGE_MODE_CLASS
  735. - if (GET_CODE (SUBREG_REG (x)) == REG
  736. - && REGNO (SUBREG_REG (x)) >= FIRST_PSEUDO_REGISTER)
  737. - bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (x))
  738. - * MAX_MACHINE_MODE
  739. - + GET_MODE (x));
  740. + record_subregs_of_mode (x);
  741. #endif
  742. /* While we're here, optimize this case. */
  743. @@ -3900,12 +3895,8 @@
  744. || GET_CODE (testreg) == SUBREG)
  745. {
  746. #ifdef CANNOT_CHANGE_MODE_CLASS
  747. - if (GET_CODE (testreg) == SUBREG
  748. - && GET_CODE (SUBREG_REG (testreg)) == REG
  749. - && REGNO (SUBREG_REG (testreg)) >= FIRST_PSEUDO_REGISTER)
  750. - bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (testreg))
  751. - * MAX_MACHINE_MODE
  752. - + GET_MODE (testreg));
  753. + if (GET_CODE (testreg) == SUBREG)
  754. + record_subregs_of_mode (testreg);
  755. #endif
  756. /* Modifying a single register in an alternate mode
  757. Index: gcc/function.c
  758. ===================================================================
  759. RCS file: /cvs/gcc/gcc/gcc/function.c,v
  760. retrieving revision 1.389.2.16
  761. retrieving revision 1.389.2.18
  762. diff -u -r1.389.2.16 -r1.389.2.18
  763. --- gcc/gcc/function.c 16 May 2004 20:27:16 -0000 1.389.2.16
  764. +++ gcc/gcc/function.c 16 Dec 2004 14:04:34 -0000 1.389.2.18
  765. @@ -226,9 +226,8 @@
  766. int, struct function *));
  767. static struct temp_slot *find_temp_slot_from_address PARAMS ((rtx));
  768. static void put_reg_into_stack PARAMS ((struct function *, rtx, tree,
  769. - enum machine_mode, enum machine_mode,
  770. - int, unsigned int, int,
  771. - htab_t));
  772. + enum machine_mode, unsigned int,
  773. + int, int, int, htab_t));
  774. static void schedule_fixup_var_refs PARAMS ((struct function *, rtx, tree,
  775. enum machine_mode,
  776. htab_t));
  777. @@ -508,6 +507,7 @@
  778. ALIGN controls the amount of alignment for the address of the slot:
  779. 0 means according to MODE,
  780. -1 means use BIGGEST_ALIGNMENT and round size to multiple of that,
  781. + -2 means use BITS_PER_UNIT,
  782. positive specifies alignment boundary in bits.
  783. We do not round to stack_boundary here.
  784. @@ -548,6 +548,8 @@
  785. alignment = BIGGEST_ALIGNMENT / BITS_PER_UNIT;
  786. size = CEIL_ROUND (size, alignment);
  787. }
  788. + else if (align == -2)
  789. + alignment = 1; /* BITS_PER_UNIT / BITS_PER_UNIT */
  790. else
  791. alignment = align / BITS_PER_UNIT;
  792. @@ -1342,9 +1344,9 @@
  793. enum machine_mode promoted_mode, decl_mode;
  794. struct function *function = 0;
  795. tree context;
  796. - int can_use_addressof;
  797. - int volatilep = TREE_CODE (decl) != SAVE_EXPR && TREE_THIS_VOLATILE (decl);
  798. - int usedp = (TREE_USED (decl)
  799. + int can_use_addressof_p;
  800. + int volatile_p = TREE_CODE (decl) != SAVE_EXPR && TREE_THIS_VOLATILE (decl);
  801. + int used_p = (TREE_USED (decl)
  802. || (TREE_CODE (decl) != SAVE_EXPR && DECL_INITIAL (decl) != 0));
  803. context = decl_function_context (decl);
  804. @@ -1391,7 +1393,7 @@
  805. /* If this variable lives in the current function and we don't need to put it
  806. in the stack for the sake of setjmp or the non-locality, try to keep it in
  807. a register until we know we actually need the address. */
  808. - can_use_addressof
  809. + can_use_addressof_p
  810. = (function == 0
  811. && ! (TREE_CODE (decl) != SAVE_EXPR && DECL_NONLOCAL (decl))
  812. && optimize > 0
  813. @@ -1404,7 +1406,8 @@
  814. /* If we can't use ADDRESSOF, make sure we see through one we already
  815. generated. */
  816. - if (! can_use_addressof && GET_CODE (reg) == MEM
  817. + if (! can_use_addressof_p
  818. + && GET_CODE (reg) == MEM
  819. && GET_CODE (XEXP (reg, 0)) == ADDRESSOF)
  820. reg = XEXP (XEXP (reg, 0), 0);
  821. @@ -1412,11 +1415,11 @@
  822. if (GET_CODE (reg) == REG)
  823. {
  824. - if (can_use_addressof)
  825. + if (can_use_addressof_p)
  826. gen_mem_addressof (reg, decl, rescan);
  827. else
  828. - put_reg_into_stack (function, reg, TREE_TYPE (decl), promoted_mode,
  829. - decl_mode, volatilep, 0, usedp, 0);
  830. + put_reg_into_stack (function, reg, TREE_TYPE (decl), decl_mode,
  831. + 0, volatile_p, used_p, 0, 0);
  832. }
  833. else if (GET_CODE (reg) == CONCAT)
  834. {
  835. @@ -1432,14 +1435,14 @@
  836. #ifdef FRAME_GROWS_DOWNWARD
  837. /* Since part 0 should have a lower address, do it second. */
  838. put_reg_into_stack (function, hipart, part_type, part_mode,
  839. - part_mode, volatilep, 0, 0, 0);
  840. + 0, volatile_p, 0, 0, 0);
  841. put_reg_into_stack (function, lopart, part_type, part_mode,
  842. - part_mode, volatilep, 0, 0, 0);
  843. + 0, volatile_p, 0, 1, 0);
  844. #else
  845. put_reg_into_stack (function, lopart, part_type, part_mode,
  846. - part_mode, volatilep, 0, 0, 0);
  847. + 0, volatile_p, 0, 0, 0);
  848. put_reg_into_stack (function, hipart, part_type, part_mode,
  849. - part_mode, volatilep, 0, 0, 0);
  850. + 0, volatile_p, 0, 1, 0);
  851. #endif
  852. /* Change the CONCAT into a combined MEM for both parts. */
  853. @@ -1460,7 +1463,7 @@
  854. /* Prevent sharing of rtl that might lose. */
  855. if (GET_CODE (XEXP (reg, 0)) == PLUS)
  856. XEXP (reg, 0) = copy_rtx (XEXP (reg, 0));
  857. - if (usedp && rescan)
  858. + if (used_p && rescan)
  859. {
  860. schedule_fixup_var_refs (function, reg, TREE_TYPE (decl),
  861. promoted_mode, 0);
  862. @@ -1474,26 +1477,29 @@
  863. /* Subroutine of put_var_into_stack. This puts a single pseudo reg REG
  864. into the stack frame of FUNCTION (0 means the current function).
  865. + TYPE is the user-level data type of the value hold in the register.
  866. DECL_MODE is the machine mode of the user-level data type.
  867. - PROMOTED_MODE is the machine mode of the register.
  868. - VOLATILE_P is nonzero if this is for a "volatile" decl.
  869. - USED_P is nonzero if this reg might have already been used in an insn. */
  870. + ORIGINAL_REGNO must be set if the real regno is not visible in REG.
  871. + VOLATILE_P is true if this is for a "volatile" decl.
  872. + USED_P is true if this reg might have already been used in an insn.
  873. + CONSECUTIVE_P is true if the stack slot assigned to reg must be
  874. + consecutive with the previous stack slot. */
  875. static void
  876. -put_reg_into_stack (function, reg, type, promoted_mode, decl_mode, volatile_p,
  877. - original_regno, used_p, ht)
  878. +put_reg_into_stack (function, reg, type, decl_mode, original_regno,
  879. + volatile_p, used_p, consecutive_p, ht)
  880. struct function *function;
  881. rtx reg;
  882. tree type;
  883. - enum machine_mode promoted_mode, decl_mode;
  884. - int volatile_p;
  885. + enum machine_mode decl_mode;
  886. unsigned int original_regno;
  887. - int used_p;
  888. + int volatile_p, used_p, consecutive_p;
  889. htab_t ht;
  890. {
  891. struct function *func = function ? function : cfun;
  892. - rtx new = 0;
  893. + enum machine_mode mode = GET_MODE (reg);
  894. unsigned int regno = original_regno;
  895. + rtx new = 0;
  896. if (regno == 0)
  897. regno = REGNO (reg);
  898. @@ -1506,7 +1512,8 @@
  899. }
  900. if (new == 0)
  901. - new = assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode), 0, func);
  902. + new = assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode),
  903. + consecutive_p ? -2 : 0, func);
  904. PUT_CODE (reg, MEM);
  905. PUT_MODE (reg, decl_mode);
  906. @@ -1528,7 +1535,7 @@
  907. }
  908. if (used_p)
  909. - schedule_fixup_var_refs (function, reg, type, promoted_mode, ht);
  910. + schedule_fixup_var_refs (function, reg, type, mode, ht);
  911. }
  912. /* Make sure that all refs to the variable, previously made
  913. @@ -1716,7 +1723,7 @@
  914. tmp.key = var;
  915. ime = (struct insns_for_mem_entry *) htab_find (ht, &tmp);
  916. for (insn_list = ime->insns; insn_list != 0; insn_list = XEXP (insn_list, 1))
  917. - if (INSN_P (XEXP (insn_list, 0)))
  918. + if (INSN_P (XEXP (insn_list, 0)) && !INSN_DELETED_P (XEXP (insn_list, 0)))
  919. fixup_var_refs_insn (XEXP (insn_list, 0), var, promoted_mode,
  920. unsignedp, 1, may_share);
  921. }
  922. @@ -3025,8 +3032,8 @@
  923. used_p = 1;
  924. }
  925. - put_reg_into_stack (0, reg, type, GET_MODE (reg), GET_MODE (reg),
  926. - volatile_p, ADDRESSOF_REGNO (r), used_p, ht);
  927. + put_reg_into_stack (0, reg, type, GET_MODE (reg), ADDRESSOF_REGNO (r),
  928. + volatile_p, used_p, 0, ht);
  929. }
  930. /* List of replacements made below in purge_addressof_1 when creating
  931. Index: gcc/gccbug.in
  932. ===================================================================
  933. RCS file: /cvs/gcc/gcc/gcc/gccbug.in,v
  934. retrieving revision 1.15.34.1
  935. retrieving revision 1.15.34.2
  936. diff -u -r1.15.34.1 -r1.15.34.2
  937. --- gcc/gcc/gccbug.in 2 Jan 2003 05:22:37 -0000 1.15.34.1
  938. +++ gcc/gcc/gccbug.in 21 Jan 2005 10:08:47 -0000 1.15.34.2
  939. @@ -198,7 +198,7 @@
  940. done
  941. # spam does not need to be listed here
  942. -CATEGORIES="ada bootstrap c++ c debug driver fortran inline-asm java libf2c libgcj libobjc libstdc++ middle-end objc optimization other preprocessor target web"
  943. +CATEGORIES="ada bootstrap c++ c debug driver fortran inline-asm java libf2c libgcj libobjc libstdc++ middle-end objc other preprocessor rtl-optimization target tree-optimization web"
  944. case "$FORMAT" in
  945. lisp) echo "$CATEGORIES" | \
  946. Index: gcc/regclass.c
  947. ===================================================================
  948. RCS file: /cvs/gcc/gcc/gcc/regclass.c,v
  949. retrieving revision 1.160.4.5
  950. retrieving revision 1.160.4.8
  951. diff -u -r1.160.4.5 -r1.160.4.8
  952. --- gcc/gcc/regclass.c 3 Mar 2003 11:00:15 -0000 1.160.4.5
  953. +++ gcc/gcc/regclass.c 4 Dec 2004 00:36:37 -0000 1.160.4.8
  954. @@ -41,6 +41,7 @@
  955. #include "toplev.h"
  956. #include "output.h"
  957. #include "ggc.h"
  958. +#include "hashtab.h"
  959. #ifndef REGISTER_MOVE_COST
  960. #define REGISTER_MOVE_COST(m, x, y) 2
  961. @@ -105,6 +106,13 @@
  962. char call_really_used_regs[] = CALL_REALLY_USED_REGISTERS;
  963. #endif
  964. +#ifdef CALL_REALLY_USED_REGISTERS
  965. +#define CALL_REALLY_USED_REGNO_P(X) call_really_used_regs[X]
  966. +#else
  967. +#define CALL_REALLY_USED_REGNO_P(X) call_used_regs[X]
  968. +#endif
  969. +
  970. +
  971. /* Indexed by hard register number, contains 1 for registers that are
  972. fixed use or call used registers that cannot hold quantities across
  973. calls even if we are willing to save and restore them. call fixed
  974. @@ -228,12 +236,6 @@
  975. #endif /* FORBIDDEN_INC_DEC_CLASSES */
  976. -#ifdef CANNOT_CHANGE_MODE_CLASS
  977. -/* All registers that have been subreged. Indexed by regno * MAX_MACHINE_MODE
  978. - + mode. */
  979. -bitmap_head subregs_of_mode;
  980. -#endif
  981. -
  982. /* Sample MEM values for use by memory_move_secondary_cost. */
  983. static GTY(()) rtx top_of_stack[MAX_MACHINE_MODE];
  984. @@ -447,7 +449,11 @@
  985. If we are generating PIC code, the PIC offset table register is
  986. preserved across calls, though the target can override that. */
  987. - if (i == STACK_POINTER_REGNUM || i == FRAME_POINTER_REGNUM)
  988. + if (i == STACK_POINTER_REGNUM)
  989. + ;
  990. + else if (global_regs[i])
  991. + SET_HARD_REG_BIT (regs_invalidated_by_call, i);
  992. + else if (i == FRAME_POINTER_REGNUM)
  993. ;
  994. #if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
  995. else if (i == HARD_FRAME_POINTER_REGNUM)
  996. @@ -461,13 +467,7 @@
  997. else if (i == PIC_OFFSET_TABLE_REGNUM && fixed_regs[i])
  998. ;
  999. #endif
  1000. - else if (0
  1001. -#ifdef CALL_REALLY_USED_REGISTERS
  1002. - || call_really_used_regs[i]
  1003. -#else
  1004. - || call_used_regs[i]
  1005. -#endif
  1006. - || global_regs[i])
  1007. + else if (CALL_REALLY_USED_REGNO_P (i))
  1008. SET_HARD_REG_BIT (regs_invalidated_by_call, i);
  1009. }
  1010. @@ -792,6 +792,12 @@
  1011. global_regs[i] = 1;
  1012. + /* If we're globalizing the frame pointer, we need to set the
  1013. + appropriate regs_invalidated_by_call bit, even if it's already
  1014. + set in fixed_regs. */
  1015. + if (i != STACK_POINTER_REGNUM)
  1016. + SET_HARD_REG_BIT (regs_invalidated_by_call, i);
  1017. +
  1018. /* If already fixed, nothing else to do. */
  1019. if (fixed_regs[i])
  1020. return;
  1021. @@ -802,7 +808,6 @@
  1022. SET_HARD_REG_BIT (fixed_reg_set, i);
  1023. SET_HARD_REG_BIT (call_used_reg_set, i);
  1024. SET_HARD_REG_BIT (call_fixed_reg_set, i);
  1025. - SET_HARD_REG_BIT (regs_invalidated_by_call, i);
  1026. }
  1027. /* Now the data and code for the `regclass' pass, which happens
  1028. @@ -2415,9 +2420,15 @@
  1029. if (regno >= min_regno)
  1030. {
  1031. + /* While the following 3 lines means that the inequality
  1032. + REGNO_LAST_UID (regno) <= REGNO_LAST_NOTE_UID (regno)
  1033. + is true at the end of the scanning, it may be subsequently
  1034. + invalidated (e.g. in load_mems) so it should not be relied
  1035. + upon. */
  1036. REGNO_LAST_NOTE_UID (regno) = INSN_UID (insn);
  1037. if (!note_flag)
  1038. REGNO_LAST_UID (regno) = INSN_UID (insn);
  1039. +
  1040. if (REGNO_FIRST_UID (regno) == 0)
  1041. REGNO_FIRST_UID (regno) = INSN_UID (insn);
  1042. /* If we are called by reg_scan_update() (indicated by min_regno
  1043. @@ -2614,6 +2625,77 @@
  1044. }
  1045. #ifdef CANNOT_CHANGE_MODE_CLASS
  1046. +
  1047. +struct subregs_of_mode_node
  1048. +{
  1049. + unsigned int block;
  1050. + unsigned char modes[MAX_MACHINE_MODE];
  1051. +};
  1052. +
  1053. +static htab_t subregs_of_mode;
  1054. +
  1055. +static hashval_t som_hash PARAMS ((const void *));
  1056. +static int som_eq PARAMS ((const void *, const void *));
  1057. +
  1058. +static hashval_t
  1059. +som_hash (x)
  1060. + const void *x;
  1061. +{
  1062. + const struct subregs_of_mode_node *a = x;
  1063. + return a->block;
  1064. +}
  1065. +
  1066. +static int
  1067. +som_eq (x, y)
  1068. + const void *x;
  1069. + const void *y;
  1070. +{
  1071. + const struct subregs_of_mode_node *a = x;
  1072. + const struct subregs_of_mode_node *b = y;
  1073. + return a->block == b->block;
  1074. +}
  1075. +
  1076. +void
  1077. +init_subregs_of_mode ()
  1078. +{
  1079. + if (subregs_of_mode)
  1080. + htab_empty (subregs_of_mode);
  1081. + else
  1082. + subregs_of_mode = htab_create (100, som_hash, som_eq, free);
  1083. +}
  1084. +
  1085. +void
  1086. +record_subregs_of_mode (subreg)
  1087. + rtx subreg;
  1088. +{
  1089. + struct subregs_of_mode_node dummy, *node;
  1090. + enum machine_mode mode;
  1091. + unsigned int regno;
  1092. + void **slot;
  1093. +
  1094. + if (!REG_P (SUBREG_REG (subreg)))
  1095. + return;
  1096. +
  1097. + regno = REGNO (SUBREG_REG (subreg));
  1098. + mode = GET_MODE (subreg);
  1099. +
  1100. + if (regno < FIRST_PSEUDO_REGISTER)
  1101. + return;
  1102. +
  1103. + dummy.block = regno & -8;
  1104. + slot = htab_find_slot_with_hash (subregs_of_mode, &dummy,
  1105. + dummy.block, INSERT);
  1106. + node = *slot;
  1107. + if (node == NULL)
  1108. + {
  1109. + node = xcalloc (1, sizeof (*node));
  1110. + node->block = regno & -8;
  1111. + *slot = node;
  1112. + }
  1113. +
  1114. + node->modes[mode] |= 1 << (regno & 7);
  1115. +}
  1116. +
  1117. /* Set bits in *USED which correspond to registers which can't change
  1118. their mode from FROM to any mode in which REGNO was encountered. */
  1119. @@ -2623,42 +2705,50 @@
  1120. enum machine_mode from;
  1121. unsigned int regno;
  1122. {
  1123. + struct subregs_of_mode_node dummy, *node;
  1124. enum machine_mode to;
  1125. - int n, i;
  1126. - int start = regno * MAX_MACHINE_MODE;
  1127. + unsigned char mask;
  1128. + unsigned int i;
  1129. - EXECUTE_IF_SET_IN_BITMAP (&subregs_of_mode, start, n,
  1130. - if (n >= MAX_MACHINE_MODE + start)
  1131. - return;
  1132. - to = n - start;
  1133. - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
  1134. - if (! TEST_HARD_REG_BIT (*used, i)
  1135. - && REG_CANNOT_CHANGE_MODE_P (i, from, to))
  1136. - SET_HARD_REG_BIT (*used, i);
  1137. - );
  1138. + dummy.block = regno & -8;
  1139. + node = htab_find_with_hash (subregs_of_mode, &dummy, dummy.block);
  1140. + if (node == NULL)
  1141. + return;
  1142. +
  1143. + mask = 1 << (regno & 7);
  1144. + for (to = VOIDmode; to < NUM_MACHINE_MODES; to++)
  1145. + if (node->modes[to] & mask)
  1146. + for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
  1147. + if (!TEST_HARD_REG_BIT (*used, i)
  1148. + && REG_CANNOT_CHANGE_MODE_P (i, from, to))
  1149. + SET_HARD_REG_BIT (*used, i);
  1150. }
  1151. /* Return 1 if REGNO has had an invalid mode change in CLASS from FROM
  1152. mode. */
  1153. bool
  1154. -invalid_mode_change_p (regno, class, from_mode)
  1155. +invalid_mode_change_p (regno, class, from)
  1156. unsigned int regno;
  1157. - enum reg_class class;
  1158. - enum machine_mode from_mode;
  1159. + enum reg_class class;
  1160. + enum machine_mode from;
  1161. {
  1162. - enum machine_mode to_mode;
  1163. - int n;
  1164. - int start = regno * MAX_MACHINE_MODE;
  1165. -
  1166. - EXECUTE_IF_SET_IN_BITMAP (&subregs_of_mode, start, n,
  1167. - if (n >= MAX_MACHINE_MODE + start)
  1168. - return 0;
  1169. - to_mode = n - start;
  1170. - if (CANNOT_CHANGE_MODE_CLASS (from_mode, to_mode, class))
  1171. - return 1;
  1172. - );
  1173. - return 0;
  1174. + struct subregs_of_mode_node dummy, *node;
  1175. + enum machine_mode to;
  1176. + unsigned char mask;
  1177. +
  1178. + dummy.block = regno & -8;
  1179. + node = htab_find_with_hash (subregs_of_mode, &dummy, dummy.block);
  1180. + if (node == NULL)
  1181. + return false;
  1182. +
  1183. + mask = 1 << (regno & 7);
  1184. + for (to = VOIDmode; to < NUM_MACHINE_MODES; to++)
  1185. + if (node->modes[to] & mask)
  1186. + if (CANNOT_CHANGE_MODE_CLASS (from, to, class))
  1187. + return true;
  1188. +
  1189. + return false;
  1190. }
  1191. #endif /* CANNOT_CHANGE_MODE_CLASS */
  1192. Index: gcc/regs.h
  1193. ===================================================================
  1194. RCS file: /cvs/gcc/gcc/gcc/regs.h,v
  1195. retrieving revision 1.26.4.1
  1196. retrieving revision 1.26.4.3
  1197. diff -u -r1.26.4.1 -r1.26.4.3
  1198. --- gcc/gcc/regs.h 3 Mar 2003 11:00:15 -0000 1.26.4.1
  1199. +++ gcc/gcc/regs.h 4 Dec 2004 00:36:38 -0000 1.26.4.3
  1200. @@ -49,6 +49,9 @@
  1201. int first_uid; /* UID of first insn to use (REG n) */
  1202. int last_uid; /* UID of last insn to use (REG n) */
  1203. int last_note_uid; /* UID of last note to use (REG n) */
  1204. + /* See the comment in reg_scan_mark_refs on
  1205. + the relationship between last_uid and
  1206. + last_note_uid. */
  1207. /* fields set by reg_scan & flow_analysis */
  1208. int sets; /* # of times (REG n) is set */
  1209. @@ -66,8 +69,6 @@
  1210. extern varray_type reg_n_info;
  1211. -extern bitmap_head subregs_of_mode;
  1212. -
  1213. /* Indexed by n, gives number of times (REG n) is used or set. */
  1214. #define REG_N_REFS(N) (VARRAY_REG (reg_n_info, N)->refs)
  1215. Index: gcc/reload1.c
  1216. ===================================================================
  1217. RCS file: /cvs/gcc/gcc/gcc/reload1.c,v
  1218. retrieving revision 1.366.2.11
  1219. retrieving revision 1.366.2.12
  1220. diff -u -r1.366.2.11 -r1.366.2.12
  1221. --- gcc/gcc/reload1.c 13 Sep 2004 08:54:35 -0000 1.366.2.11
  1222. +++ gcc/gcc/reload1.c 26 Nov 2004 05:08:45 -0000 1.366.2.12
  1223. @@ -3389,6 +3389,16 @@
  1224. num_not_at_initial_offset = 0;
  1225. }
  1226. +/* Subroutine of set_initial_label_offsets called via for_each_eh_label. */
  1227. +
  1228. +static void set_initial_eh_label_offset PARAMS ((rtx));
  1229. +static void
  1230. +set_initial_eh_label_offset (label)
  1231. + rtx label;
  1232. +{
  1233. + set_label_offsets (label, NULL_RTX, 1);
  1234. +}
  1235. +
  1236. /* Initialize the known label offsets.
  1237. Set a known offset for each forced label to be at the initial offset
  1238. of each elimination. We do this because we assume that all
  1239. @@ -3405,6 +3415,8 @@
  1240. for (x = forced_labels; x; x = XEXP (x, 1))
  1241. if (XEXP (x, 0))
  1242. set_label_offsets (XEXP (x, 0), NULL_RTX, 1);
  1243. +
  1244. + for_each_eh_label (set_initial_eh_label_offset);
  1245. }
  1246. /* Set all elimination offsets to the known values for the code label given
  1247. Index: gcc/rtl.h
  1248. ===================================================================
  1249. RCS file: /cvs/gcc/gcc/gcc/rtl.h,v
  1250. retrieving revision 1.375.2.8
  1251. retrieving revision 1.375.2.9
  1252. diff -u -r1.375.2.8 -r1.375.2.9
  1253. --- gcc/gcc/rtl.h 24 Apr 2004 19:40:45 -0000 1.375.2.8
  1254. +++ gcc/gcc/rtl.h 4 Dec 2004 00:36:38 -0000 1.375.2.9
  1255. @@ -2120,6 +2120,8 @@
  1256. extern void reg_scan PARAMS ((rtx, unsigned int, int));
  1257. extern void reg_scan_update PARAMS ((rtx, rtx, unsigned int));
  1258. extern void fix_register PARAMS ((const char *, int, int));
  1259. +extern void init_subregs_of_mode PARAMS ((void));
  1260. +extern void record_subregs_of_mode PARAMS ((rtx));
  1261. #ifdef HARD_CONST
  1262. extern void cannot_change_mode_set_regs PARAMS ((HARD_REG_SET *,
  1263. enum machine_mode,
  1264. Index: gcc/tree-inline.c
  1265. ===================================================================
  1266. RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
  1267. retrieving revision 1.38.2.12
  1268. retrieving revision 1.38.2.13
  1269. diff -u -r1.38.2.12 -r1.38.2.13
  1270. --- gcc/gcc/tree-inline.c 12 Mar 2004 22:43:29 -0000 1.38.2.12
  1271. +++ gcc/gcc/tree-inline.c 21 Jan 2005 10:02:12 -0000 1.38.2.13
  1272. @@ -1173,7 +1173,8 @@
  1273. if (!inlinable_function_p (fn, id))
  1274. {
  1275. if (warn_inline && DECL_INLINE (fn) && !DID_INLINE_FUNC (fn)
  1276. - && !DECL_IN_SYSTEM_HEADER (fn))
  1277. + && !DECL_IN_SYSTEM_HEADER (fn)
  1278. + && !lookup_attribute ("noinline", DECL_ATTRIBUTES (fn)))
  1279. {
  1280. warning_with_decl (fn, "inlining failed in call to `%s'");
  1281. warning ("called from here");
  1282. Index: gcc/unroll.c
  1283. ===================================================================
  1284. RCS file: /cvs/gcc/gcc/gcc/Attic/unroll.c,v
  1285. retrieving revision 1.184.2.9
  1286. retrieving revision 1.184.2.10
  1287. diff -u -r1.184.2.9 -r1.184.2.10
  1288. --- gcc/gcc/unroll.c 17 May 2004 21:05:48 -0000 1.184.2.9
  1289. +++ gcc/gcc/unroll.c 27 Nov 2004 16:59:15 -0000 1.184.2.10
  1290. @@ -794,6 +794,10 @@
  1291. for (r = FIRST_PSEUDO_REGISTER; r < max_reg_before_loop; ++r)
  1292. if (REGNO_FIRST_UID (r) > 0 && REGNO_FIRST_UID (r) < max_uid_for_loop
  1293. && REGNO_FIRST_LUID (r) >= copy_start_luid
  1294. + /* See the comment in reg_scan_mark_refs on the relationship between
  1295. + last_uid and last_note_uid. */
  1296. + && REGNO_LAST_UID (r) > 0 && REGNO_LAST_UID (r) < max_uid_for_loop
  1297. + && REGNO_LAST_LUID (r) <= copy_end_luid
  1298. && REGNO_LAST_NOTE_UID (r) > 0 && REGNO_LAST_NOTE_UID (r) < max_uid_for_loop
  1299. && REGNO_LAST_NOTE_LUID (r) <= copy_end_luid)
  1300. {
  1301. Index: gcc/unwind-dw2.c
  1302. ===================================================================
  1303. RCS file: /cvs/gcc/gcc/gcc/unwind-dw2.c,v
  1304. retrieving revision 1.22.2.9
  1305. retrieving revision 1.22.2.11
  1306. diff -u -r1.22.2.9 -r1.22.2.11
  1307. --- gcc/gcc/unwind-dw2.c 8 May 2004 21:52:42 -0000 1.22.2.9
  1308. +++ gcc/gcc/unwind-dw2.c 29 Jan 2005 11:54:24 -0000 1.22.2.11
  1309. @@ -1,5 +1,5 @@
  1310. /* DWARF2 exception handling and frame unwind runtime interface routines.
  1311. - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
  1312. + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
  1313. Free Software Foundation, Inc.
  1314. This file is part of GCC.
  1315. @@ -165,6 +165,11 @@
  1316. inline _Unwind_Word
  1317. _Unwind_GetGR (struct _Unwind_Context *context, int index)
  1318. {
  1319. +#ifdef DWARF_ZERO_REG
  1320. + if (index == DWARF_ZERO_REG)
  1321. + return 0;
  1322. +#endif
  1323. +
  1324. /* This will segfault if the register hasn't been saved. */
  1325. return * (_Unwind_Word *) context->reg[index];
  1326. }
  1327. @@ -604,6 +609,10 @@
  1328. case DW_OP_mul:
  1329. case DW_OP_or:
  1330. case DW_OP_plus:
  1331. + case DW_OP_shl:
  1332. + case DW_OP_shr:
  1333. + case DW_OP_shra:
  1334. + case DW_OP_xor:
  1335. case DW_OP_le:
  1336. case DW_OP_ge:
  1337. case DW_OP_eq:
  1338. Index: gcc/config/freebsd-spec.h
  1339. ===================================================================
  1340. RCS file: /cvs/gcc/gcc/gcc/config/freebsd-spec.h,v
  1341. retrieving revision 1.2.4.1
  1342. retrieving revision 1.2.4.2
  1343. diff -u -r1.2.4.1 -r1.2.4.2
  1344. --- gcc/gcc/config/freebsd-spec.h 12 Mar 2003 02:38:01 -0000 1.2.4.1
  1345. +++ gcc/gcc/config/freebsd-spec.h 14 Jan 2005 02:06:26 -0000 1.2.4.2
  1346. @@ -130,13 +130,7 @@
  1347. %{pg: -lc_p} \
  1348. }"
  1349. #else
  1350. -#if FBSD_MAJOR >= 5
  1351. -#define FBSD_LIB_SPEC " \
  1352. - %{!shared: \
  1353. - %{!pg: %{pthread:-lc_r} -lc} \
  1354. - %{pg: %{pthread:-lc_r_p} -lc_p} \
  1355. - }"
  1356. -#else
  1357. +#if FBSD_MAJOR < 5
  1358. #define FBSD_LIB_SPEC " \
  1359. %{!shared: \
  1360. %{!pg: \
  1361. @@ -146,5 +140,11 @@
  1362. %{!pthread:-lc_p} \
  1363. %{pthread:-lc_r_p}} \
  1364. }"
  1365. +#else
  1366. +#define FBSD_LIB_SPEC " \
  1367. + %{!shared: \
  1368. + %{!pg: %{pthread:-lpthread} -lc} \
  1369. + %{pg: %{pthread:-lpthread_p} -lc_p} \
  1370. + }"
  1371. #endif
  1372. #endif
  1373. Index: gcc/config/alpha/alpha.c
  1374. ===================================================================
  1375. RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.c,v
  1376. retrieving revision 1.282.4.11
  1377. retrieving revision 1.282.4.12
  1378. diff -u -r1.282.4.11 -r1.282.4.12
  1379. --- gcc/gcc/config/alpha/alpha.c 8 Mar 2004 03:21:46 -0000 1.282.4.11
  1380. +++ gcc/gcc/config/alpha/alpha.c 30 Sep 2004 19:36:26 -0000 1.282.4.12
  1381. @@ -6766,11 +6766,6 @@
  1382. break;
  1383. imask |= 1L << regno;
  1384. }
  1385. -
  1386. - /* Glibc likes to use $31 as an unwind stopper for crt0. To
  1387. - avoid hackery in unwind-dw2.c, we need to actively store a
  1388. - zero in the prologue of _Unwind_RaiseException et al. */
  1389. - imask |= 1UL << 31;
  1390. }
  1391. /* If any register spilled, then spill the return address also. */
  1392. @@ -7236,24 +7231,6 @@
  1393. reg_offset += 8;
  1394. }
  1395. - /* Store a zero if requested for unwinding. */
  1396. - if (imask & (1UL << 31))
  1397. - {
  1398. - rtx insn, t;
  1399. -
  1400. - mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, reg_offset));
  1401. - set_mem_alias_set (mem, alpha_sr_alias_set);
  1402. - insn = emit_move_insn (mem, const0_rtx);
  1403. -
  1404. - RTX_FRAME_RELATED_P (insn) = 1;
  1405. - t = gen_rtx_REG (Pmode, 31);
  1406. - t = gen_rtx_SET (VOIDmode, mem, t);
  1407. - t = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, t, REG_NOTES (insn));
  1408. - REG_NOTES (insn) = t;
  1409. -
  1410. - reg_offset += 8;
  1411. - }
  1412. -
  1413. for (i = 0; i < 31; i++)
  1414. if (fmask & (1L << i))
  1415. {
  1416. @@ -7674,9 +7651,6 @@
  1417. reg_offset += 8;
  1418. }
  1419. - if (imask & (1UL << 31))
  1420. - reg_offset += 8;
  1421. -
  1422. for (i = 0; i < 31; ++i)
  1423. if (fmask & (1L << i))
  1424. {
  1425. Index: gcc/config/alpha/alpha.h
  1426. ===================================================================
  1427. RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.h,v
  1428. retrieving revision 1.185.4.6
  1429. retrieving revision 1.185.4.7
  1430. diff -u -r1.185.4.6 -r1.185.4.7
  1431. --- gcc/gcc/config/alpha/alpha.h 27 Aug 2004 00:01:15 -0000 1.185.4.6
  1432. +++ gcc/gcc/config/alpha/alpha.h 30 Sep 2004 19:36:28 -0000 1.185.4.7
  1433. @@ -1299,6 +1299,7 @@
  1434. #define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, 26)
  1435. #define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (26)
  1436. #define DWARF_ALT_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (64)
  1437. +#define DWARF_ZERO_REG 31
  1438. /* Describe how we implement __builtin_eh_return. */
  1439. #define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + 16 : INVALID_REGNUM)
  1440. Index: gcc/config/alpha/alpha.md
  1441. ===================================================================
  1442. RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.md,v
  1443. retrieving revision 1.199.4.6
  1444. retrieving revision 1.199.4.7
  1445. diff -u -r1.199.4.6 -r1.199.4.7
  1446. --- gcc/gcc/config/alpha/alpha.md 28 May 2004 00:02:03 -0000 1.199.4.6
  1447. +++ gcc/gcc/config/alpha/alpha.md 5 Dec 2004 19:58:42 -0000 1.199.4.7
  1448. @@ -80,6 +80,7 @@
  1449. (UNSPECV_PLDGP2 11) ; prologue ldgp
  1450. (UNSPECV_SET_TP 12)
  1451. (UNSPECV_RPCC 13)
  1452. + (UNSPECV_SETJMPR_ER 14) ; builtin_setjmp_receiver fragment
  1453. ])
  1454. ;; Where necessary, the suffixes _le and _be are used to distinguish between
  1455. @@ -6764,70 +6765,44 @@
  1456. "jmp $31,(%0),0"
  1457. [(set_attr "type" "ibr")])
  1458. -(define_insn "*builtin_setjmp_receiver_er_sl_1"
  1459. - [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)]
  1460. - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && TARGET_AS_CAN_SUBTRACT_LABELS"
  1461. - "lda $27,$LSJ%=-%l0($27)\n$LSJ%=:")
  1462. -
  1463. -(define_insn "*builtin_setjmp_receiver_er_1"
  1464. - [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)]
  1465. - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF"
  1466. - "br $27,$LSJ%=\n$LSJ%=:"
  1467. - [(set_attr "type" "ibr")])
  1468. -
  1469. -(define_split
  1470. - [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)]
  1471. - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF
  1472. - && prev_nonnote_insn (insn) == operands[0]"
  1473. - [(const_int 0)]
  1474. - "
  1475. -{
  1476. - emit_note (NULL, NOTE_INSN_DELETED);
  1477. - DONE;
  1478. -}")
  1479. -
  1480. -(define_insn "*builtin_setjmp_receiver_1"
  1481. +(define_expand "builtin_setjmp_receiver"
  1482. [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)]
  1483. "TARGET_ABI_OSF"
  1484. - "br $27,$LSJ%=\n$LSJ%=:\;ldgp $29,0($27)"
  1485. - [(set_attr "length" "12")
  1486. - (set_attr "type" "multi")])
  1487. + "")
  1488. -(define_expand "builtin_setjmp_receiver_er"
  1489. - [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)
  1490. +(define_insn_and_split "*builtin_setjmp_receiver_1"
  1491. + [(unspec_volatile [(match_operand 0 "" "")] UNSPECV_SETJMPR)]
  1492. + "TARGET_ABI_OSF"
  1493. +{
  1494. + if (TARGET_EXPLICIT_RELOCS)
  1495. + return "#";
  1496. + else
  1497. + return "br $27,$LSJ%=\n$LSJ%=:\;ldgp $29,0($27)";
  1498. +}
  1499. + "&& TARGET_EXPLICIT_RELOCS && reload_completed"
  1500. + [(unspec_volatile [(match_dup 0)] UNSPECV_SETJMPR_ER)
  1501. (set (match_dup 1)
  1502. (unspec_volatile:DI [(match_dup 2) (match_dup 3)] UNSPECV_LDGP1))
  1503. (set (match_dup 1)
  1504. (unspec:DI [(match_dup 1) (match_dup 3)] UNSPEC_LDGP2))]
  1505. - ""
  1506. {
  1507. operands[1] = pic_offset_table_rtx;
  1508. operands[2] = gen_rtx_REG (Pmode, 27);
  1509. operands[3] = GEN_INT (alpha_next_sequence_number++);
  1510. -})
  1511. +}
  1512. + [(set_attr "length" "12")
  1513. + (set_attr "type" "multi")])
  1514. -(define_expand "builtin_setjmp_receiver"
  1515. - [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)]
  1516. - "TARGET_ABI_OSF"
  1517. -{
  1518. - if (TARGET_EXPLICIT_RELOCS)
  1519. - {
  1520. - emit_insn (gen_builtin_setjmp_receiver_er (operands[0]));
  1521. - DONE;
  1522. - }
  1523. -})
  1524. +(define_insn "*builtin_setjmp_receiver_er_sl_1"
  1525. + [(unspec_volatile [(match_operand 0 "" "")] UNSPECV_SETJMPR_ER)]
  1526. + "TARGET_ABI_OSF && TARGET_EXPLICIT_RELOCS && TARGET_AS_CAN_SUBTRACT_LABELS"
  1527. + "lda $27,$LSJ%=-%l0($27)\n$LSJ%=:")
  1528. -(define_expand "exception_receiver_er"
  1529. - [(set (match_dup 0)
  1530. - (unspec_volatile:DI [(match_dup 1) (match_dup 2)] UNSPECV_LDGP1))
  1531. - (set (match_dup 0)
  1532. - (unspec:DI [(match_dup 0) (match_dup 2)] UNSPEC_LDGP2))]
  1533. - ""
  1534. -{
  1535. - operands[0] = pic_offset_table_rtx;
  1536. - operands[1] = gen_rtx_REG (Pmode, 26);
  1537. - operands[2] = GEN_INT (alpha_next_sequence_number++);
  1538. -})
  1539. +(define_insn "*builtin_setjmp_receiver_er_1"
  1540. + [(unspec_volatile [(match_operand 0 "" "")] UNSPECV_SETJMPR_ER)]
  1541. + "TARGET_ABI_OSF && TARGET_EXPLICIT_RELOCS"
  1542. + "br $27,$LSJ%=\n$LSJ%=:"
  1543. + [(set_attr "type" "ibr")])
  1544. (define_expand "exception_receiver"
  1545. [(unspec_volatile [(match_dup 0)] UNSPECV_EHR)]
  1546. @@ -6835,28 +6810,38 @@
  1547. {
  1548. if (TARGET_LD_BUGGY_LDGP)
  1549. operands[0] = alpha_gp_save_rtx ();
  1550. - else if (TARGET_EXPLICIT_RELOCS)
  1551. - {
  1552. - emit_insn (gen_exception_receiver_er ());
  1553. - DONE;
  1554. - }
  1555. else
  1556. operands[0] = const0_rtx;
  1557. })
  1558. -(define_insn "*exception_receiver_1"
  1559. - [(unspec_volatile [(const_int 0)] UNSPECV_EHR)]
  1560. - "! TARGET_LD_BUGGY_LDGP"
  1561. - "ldgp $29,0($26)"
  1562. - [(set_attr "length" "8")
  1563. - (set_attr "type" "multi")])
  1564. -
  1565. (define_insn "*exception_receiver_2"
  1566. [(unspec_volatile [(match_operand:DI 0 "memory_operand" "m")] UNSPECV_EHR)]
  1567. - "TARGET_LD_BUGGY_LDGP"
  1568. + "TARGET_ABI_OSF && TARGET_LD_BUGGY_LDGP"
  1569. "ldq $29,%0"
  1570. [(set_attr "type" "ild")])
  1571. +(define_insn_and_split "*exception_receiver_1"
  1572. + [(unspec_volatile [(const_int 0)] UNSPECV_EHR)]
  1573. + "TARGET_ABI_OSF"
  1574. +{
  1575. + if (TARGET_EXPLICIT_RELOCS)
  1576. + return "ldah $29,0($26)\t\t!gpdisp!%*\;lda $29,0($29)\t\t!gpdisp!%*";
  1577. + else
  1578. + return "ldgp $29,0($26)";
  1579. +}
  1580. + "&& TARGET_EXPLICIT_RELOCS && reload_completed"
  1581. + [(set (match_dup 0)
  1582. + (unspec_volatile:DI [(match_dup 1) (match_dup 2)] UNSPECV_LDGP1))
  1583. + (set (match_dup 0)
  1584. + (unspec:DI [(match_dup 0) (match_dup 2)] UNSPEC_LDGP2))]
  1585. +{
  1586. + operands[0] = pic_offset_table_rtx;
  1587. + operands[1] = gen_rtx_REG (Pmode, 26);
  1588. + operands[2] = GEN_INT (alpha_next_sequence_number++);
  1589. +}
  1590. + [(set_attr "length" "8")
  1591. + (set_attr "type" "multi")])
  1592. +
  1593. (define_expand "nonlocal_goto_receiver"
  1594. [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
  1595. (set (reg:DI 27) (mem:DI (reg:DI 29)))
  1596. Index: gcc/config/alpha/qrnnd.asm
  1597. ===================================================================
  1598. RCS file: /cvs/gcc/gcc/gcc/config/alpha/qrnnd.asm,v
  1599. retrieving revision 1.1
  1600. retrieving revision 1.1.60.1
  1601. diff -u -r1.1 -r1.1.60.1
  1602. --- gcc/gcc/config/alpha/qrnnd.asm 15 Apr 2000 16:34:38 -0000 1.1
  1603. +++ gcc/gcc/config/alpha/qrnnd.asm 30 Sep 2004 19:36:28 -0000 1.1.60.1
  1604. @@ -26,6 +26,10 @@
  1605. # Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  1606. # MA 02111-1307, USA.
  1607. +#ifdef __ELF__
  1608. +.section .note.GNU-stack,""
  1609. +#endif
  1610. +
  1611. .set noreorder
  1612. .set noat
  1613. Index: gcc/config/i386/i386-protos.h
  1614. ===================================================================
  1615. RCS file: /cvs/gcc/gcc/gcc/config/i386/i386-protos.h,v
  1616. retrieving revision 1.86.2.2
  1617. retrieving revision 1.86.2.3
  1618. diff -u -r1.86.2.2 -r1.86.2.3
  1619. --- gcc/gcc/config/i386/i386-protos.h 8 Jul 2003 19:16:44 -0000 1.86.2.2
  1620. +++ gcc/gcc/config/i386/i386-protos.h 12 Dec 2004 21:00:44 -0000 1.86.2.3
  1621. @@ -88,6 +88,8 @@
  1622. extern int cmpsi_operand PARAMS ((rtx, enum machine_mode));
  1623. extern int long_memory_operand PARAMS ((rtx, enum machine_mode));
  1624. extern int aligned_operand PARAMS ((rtx, enum machine_mode));
  1625. +extern int compare_operator PARAMS ((rtx, enum machine_mode));
  1626. +extern int flags_reg_operand PARAMS ((rtx, enum machine_mode));
  1627. extern enum machine_mode ix86_cc_mode PARAMS ((enum rtx_code, rtx, rtx));
  1628. extern int ix86_expand_movstr PARAMS ((rtx, rtx, rtx, rtx));
  1629. Index: gcc/config/i386/i386.c
  1630. ===================================================================
  1631. RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
  1632. retrieving revision 1.495.2.36
  1633. retrieving revision 1.495.2.37
  1634. diff -u -r1.495.2.36 -r1.495.2.37
  1635. --- gcc/gcc/config/i386/i386.c 18 May 2004 05:07:52 -0000 1.495.2.36
  1636. +++ gcc/gcc/config/i386/i386.c 12 Dec 2004 21:00:44 -0000 1.495.2.37
  1637. @@ -3609,6 +3609,20 @@
  1638. return ANY_QI_REG_P (op);
  1639. }
  1640. +/* Return true if op is an flags register. */
  1641. +
  1642. +int
  1643. +flags_reg_operand (op, mode)
  1644. + register rtx op;
  1645. + enum machine_mode mode;
  1646. +{
  1647. + if (mode != VOIDmode && GET_MODE (op) != mode)
  1648. + return 0;
  1649. + return (GET_CODE (op) == REG
  1650. + && REGNO (op) == FLAGS_REG
  1651. + && GET_MODE (op) != VOIDmode);
  1652. +}
  1653. +
  1654. /* Return true if op is a NON_Q_REGS class register. */
  1655. int
  1656. @@ -3969,6 +3983,14 @@
  1657. /* Didn't find one -- this must be an aligned address. */
  1658. return 1;
  1659. }
  1660. +
  1661. +int
  1662. +compare_operator (op, mode)
  1663. + rtx op;
  1664. + enum machine_mode mode ATTRIBUTE_UNUSED;
  1665. +{
  1666. + return GET_CODE (op) == COMPARE;
  1667. +}
  1668. /* Return true if the constant is something that can be loaded with
  1669. a special instruction. Only handle 0.0 and 1.0; others are less
  1670. Index: gcc/config/i386/i386.h
  1671. ===================================================================
  1672. RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.h,v
  1673. retrieving revision 1.309.2.11
  1674. retrieving revision 1.309.2.12
  1675. diff -u -r1.309.2.11 -r1.309.2.12
  1676. --- gcc/gcc/config/i386/i386.h 6 Feb 2004 19:43:31 -0000 1.309.2.11
  1677. +++ gcc/gcc/config/i386/i386.h 12 Dec 2004 21:00:47 -0000 1.309.2.12
  1678. @@ -3319,6 +3319,7 @@
  1679. SYMBOL_REF, LABEL_REF, SUBREG, REG, MEM}}, \
  1680. {"nonmemory_no_elim_operand", {CONST_INT, REG, SUBREG}}, \
  1681. {"index_register_operand", {SUBREG, REG}}, \
  1682. + {"flags_reg_operand", {REG}}, \
  1683. {"q_regs_operand", {SUBREG, REG}}, \
  1684. {"non_q_regs_operand", {SUBREG, REG}}, \
  1685. {"fcmov_comparison_operator", {EQ, NE, LTU, GTU, LEU, GEU, UNORDERED, \
  1686. @@ -3354,6 +3355,7 @@
  1687. {"fp_register_operand", {REG}}, \
  1688. {"register_and_not_fp_reg_operand", {REG}}, \
  1689. {"vector_move_operand", {CONST_VECTOR, SUBREG, REG, MEM}}, \
  1690. + {"compare_operator", {COMPARE}},
  1691. /* A list of predicates that do special things with modes, and so
  1692. should not elicit warnings for VOIDmode match_operand. */
  1693. Index: gcc/config/i386/i386.md
  1694. ===================================================================
  1695. RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
  1696. retrieving revision 1.404.2.24
  1697. retrieving revision 1.404.2.29
  1698. diff -u -r1.404.2.24 -r1.404.2.29
  1699. --- gcc/gcc/config/i386/i386.md 28 Apr 2004 17:00:03 -0000 1.404.2.24
  1700. +++ gcc/gcc/config/i386/i386.md 23 Jan 2005 05:15:59 -0000 1.404.2.29
  1701. @@ -1188,10 +1188,9 @@
  1702. ""
  1703. "xchg{l}\t%1, %0"
  1704. [(set_attr "type" "imov")
  1705. + (set_attr "mode" "SI")
  1706. (set_attr "pent_pair" "np")
  1707. (set_attr "athlon_decode" "vector")
  1708. - (set_attr "mode" "SI")
  1709. - (set_attr "modrm" "0")
  1710. (set_attr "ppro_uops" "few")])
  1711. (define_expand "movhi"
  1712. @@ -1304,12 +1303,12 @@
  1713. (match_operand:HI 1 "register_operand" "+r"))
  1714. (set (match_dup 1)
  1715. (match_dup 0))]
  1716. - "TARGET_PARTIAL_REG_STALL"
  1717. - "xchg{w}\t%1, %0"
  1718. + "!TARGET_PARTIAL_REG_STALL || optimize_size"
  1719. + "xchg{l}\t%k1, %k0"
  1720. [(set_attr "type" "imov")
  1721. + (set_attr "mode" "SI")
  1722. (set_attr "pent_pair" "np")
  1723. - (set_attr "mode" "HI")
  1724. - (set_attr "modrm" "0")
  1725. + (set_attr "athlon_decode" "vector")
  1726. (set_attr "ppro_uops" "few")])
  1727. (define_insn "*swaphi_2"
  1728. @@ -1317,12 +1316,12 @@
  1729. (match_operand:HI 1 "register_operand" "+r"))
  1730. (set (match_dup 1)
  1731. (match_dup 0))]
  1732. - "! TARGET_PARTIAL_REG_STALL"
  1733. - "xchg{l}\t%k1, %k0"
  1734. + "TARGET_PARTIAL_REG_STALL"
  1735. + "xchg{w}\t%1, %0"
  1736. [(set_attr "type" "imov")
  1737. + (set_attr "mode" "HI")
  1738. (set_attr "pent_pair" "np")
  1739. - (set_attr "mode" "SI")
  1740. - (set_attr "modrm" "0")
  1741. + (set_attr "athlon_decode" "vector")
  1742. (set_attr "ppro_uops" "few")])
  1743. (define_expand "movstricthi"
  1744. @@ -1470,17 +1469,30 @@
  1745. DONE;
  1746. })
  1747. -(define_insn "*swapqi"
  1748. +(define_insn "*swapqi_1"
  1749. [(set (match_operand:QI 0 "register_operand" "+r")
  1750. (match_operand:QI 1 "register_operand" "+r"))
  1751. (set (match_dup 1)
  1752. (match_dup 0))]
  1753. - ""
  1754. - "xchg{b}\t%1, %0"
  1755. + "!TARGET_PARTIAL_REG_STALL || optimize_size"
  1756. + "xchg{l}\t%k1, %k0"
  1757. [(set_attr "type" "imov")
  1758. + (set_attr "mode" "SI")
  1759. (set_attr "pent_pair" "np")
  1760. + (set_attr "athlon_decode" "vector")
  1761. + (set_attr "ppro_uops" "few")])
  1762. +
  1763. +(define_insn "*swapqi_2"
  1764. + [(set (match_operand:QI 0 "register_operand" "+q")
  1765. + (match_operand:QI 1 "register_operand" "+q"))
  1766. + (set (match_dup 1)
  1767. + (match_dup 0))]
  1768. + "TARGET_PARTIAL_REG_STALL"
  1769. + "xchg{b}\t%1, %0"
  1770. + [(set_attr "type" "imov")
  1771. (set_attr "mode" "QI")
  1772. - (set_attr "modrm" "0")
  1773. + (set_attr "pent_pair" "np")
  1774. + (set_attr "athlon_decode" "vector")
  1775. (set_attr "ppro_uops" "few")])
  1776. (define_expand "movstrictqi"
  1777. @@ -1987,13 +1999,11 @@
  1778. "TARGET_64BIT"
  1779. "xchg{q}\t%1, %0"
  1780. [(set_attr "type" "imov")
  1781. + (set_attr "mode" "DI")
  1782. (set_attr "pent_pair" "np")
  1783. (set_attr "athlon_decode" "vector")
  1784. - (set_attr "mode" "DI")
  1785. - (set_attr "modrm" "0")
  1786. (set_attr "ppro_uops" "few")])
  1787. -
  1788. (define_expand "movsf"
  1789. [(set (match_operand:SF 0 "nonimmediate_operand" "")
  1790. (match_operand:SF 1 "general_operand" ""))]
  1791. @@ -7559,17 +7569,21 @@
  1792. ""
  1793. "")
  1794. -(define_insn "*testqi_1"
  1795. +(define_insn "*testqi_1_maybe_si"
  1796. [(set (reg 17)
  1797. - (compare (and:QI (match_operand:QI 0 "nonimmediate_operand" "%*a,q,qm,r")
  1798. - (match_operand:QI 1 "nonmemory_operand" "n,n,qn,n"))
  1799. - (const_int 0)))]
  1800. - "ix86_match_ccmode (insn, CCNOmode)"
  1801. + (compare
  1802. + (and:QI
  1803. + (match_operand:QI 0 "nonimmediate_operand" "%*a,q,qm,r")
  1804. + (match_operand:QI 1 "nonmemory_operand" "n,n,qn,n"))
  1805. + (const_int 0)))]
  1806. + "(GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)
  1807. + && ix86_match_ccmode (insn,
  1808. + GET_CODE (operands[1]) == CONST_INT
  1809. + && INTVAL (operands[1]) >= 0 ? CCNOmode : CCZmode)"
  1810. {
  1811. if (which_alternative == 3)
  1812. {
  1813. - if (GET_CODE (operands[1]) == CONST_INT
  1814. - && (INTVAL (operands[1]) & 0xffffff00))
  1815. + if (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) < 0)
  1816. operands[1] = GEN_INT (INTVAL (operands[1]) & 0xff);
  1817. return "test{l}\t{%1, %k0|%k0, %1}";
  1818. }
  1819. @@ -7580,6 +7594,18 @@
  1820. (set_attr "mode" "QI,QI,QI,SI")
  1821. (set_attr "pent_pair" "uv,np,uv,np")])
  1822. +(define_insn "*testqi_1"
  1823. + [(set (reg 17)
  1824. + (compare (and:QI (match_operand:QI 0 "nonimmediate_operand" "%*a,q,qm")
  1825. + (match_operand:QI 1 "nonmemory_operand" "n,n,qn"))
  1826. + (const_int 0)))]
  1827. + "ix86_match_ccmode (insn, CCNOmode)"
  1828. + "test{b}\t{%1, %0|%0, %1}"
  1829. + [(set_attr "type" "test")
  1830. + (set_attr "modrm" "0,1,1")
  1831. + (set_attr "mode" "QI")
  1832. + (set_attr "pent_pair" "uv,np,uv")])
  1833. +
  1834. (define_expand "testqi_ext_ccno_0"
  1835. [(set (reg:CCNO 17)
  1836. (compare:CCNO
  1837. @@ -7697,51 +7723,53 @@
  1838. "#")
  1839. (define_split
  1840. - [(set (reg 17)
  1841. - (compare (zero_extract
  1842. - (match_operand 0 "nonimmediate_operand" "")
  1843. - (match_operand 1 "const_int_operand" "")
  1844. - (match_operand 2 "const_int_operand" ""))
  1845. - (const_int 0)))]
  1846. + [(set (match_operand 0 "flags_reg_operand" "")
  1847. + (match_operator 1 "compare_operator"
  1848. + [(zero_extract
  1849. + (match_operand 2 "nonimmediate_operand" "")
  1850. + (match_operand 3 "const_int_operand" "")
  1851. + (match_operand 4 "const_int_operand" ""))
  1852. + (const_int 0)]))]
  1853. "ix86_match_ccmode (insn, CCNOmode)"
  1854. - [(set (reg:CCNO 17) (compare:CCNO (match_dup 3) (const_int 0)))]
  1855. + [(set (match_dup 0) (match_op_dup 1 [(match_dup 2) (const_int 0)]))]
  1856. {
  1857. - HOST_WIDE_INT len = INTVAL (operands[1]);
  1858. - HOST_WIDE_INT pos = INTVAL (operands[2]);
  1859. + rtx val = operands[2];
  1860. + HOST_WIDE_INT len = INTVAL (operands[3]);
  1861. + HOST_WIDE_INT pos = INTVAL (operands[4]);
  1862. HOST_WIDE_INT mask;
  1863. enum machine_mode mode, submode;
  1864. - mode = GET_MODE (operands[0]);
  1865. - if (GET_CODE (operands[0]) == MEM)
  1866. + mode = GET_MODE (val);
  1867. + if (GET_CODE (val) == MEM)
  1868. {
  1869. /* ??? Combine likes to put non-volatile mem extractions in QImode
  1870. no matter the size of the test. So find a mode that works. */
  1871. - if (! MEM_VOLATILE_P (operands[0]))
  1872. + if (! MEM_VOLATILE_P (val))
  1873. {
  1874. mode = smallest_mode_for_size (pos + len, MODE_INT);
  1875. - operands[0] = adjust_address (operands[0], mode, 0);
  1876. + val = adjust_address (val, mode, 0);
  1877. }
  1878. }
  1879. - else if (GET_CODE (operands[0]) == SUBREG
  1880. - && (submode = GET_MODE (SUBREG_REG (operands[0])),
  1881. + else if (GET_CODE (val) == SUBREG
  1882. + && (submode = GET_MODE (SUBREG_REG (val)),
  1883. GET_MODE_BITSIZE (mode) > GET_MODE_BITSIZE (submode))
  1884. && pos + len <= GET_MODE_BITSIZE (submode))
  1885. {
  1886. /* Narrow a paradoxical subreg to prevent partial register stalls. */
  1887. mode = submode;
  1888. - operands[0] = SUBREG_REG (operands[0]);
  1889. + val = SUBREG_REG (val);
  1890. }
  1891. else if (mode == HImode && pos + len <= 8)
  1892. {
  1893. /* Small HImode tests can be converted to QImode. */
  1894. mode = QImode;
  1895. - operands[0] = gen_lowpart (QImode, operands[0]);
  1896. + val = gen_lowpart (QImode, val);
  1897. }
  1898. mask = ((HOST_WIDE_INT)1 << (pos + len)) - 1;
  1899. mask &= ~(((HOST_WIDE_INT)1 << pos) - 1);
  1900. - operands[3] = gen_rtx_AND (mode, operands[0], gen_int_mode (mask, mode));
  1901. + operands[2] = gen_rtx_AND (mode, val, gen_int_mode (mask, mode));
  1902. })
  1903. ;; Convert HImode/SImode test instructions with immediate to QImode ones.
  1904. @@ -7750,46 +7778,44 @@
  1905. ;; Do the converison only post-reload to avoid limiting of the register class
  1906. ;; to QI regs.
  1907. (define_split
  1908. - [(set (reg 17)
  1909. - (compare
  1910. - (and (match_operand 0 "register_operand" "")
  1911. - (match_operand 1 "const_int_operand" ""))
  1912. - (const_int 0)))]
  1913. + [(set (match_operand 0 "flags_reg_operand" "")
  1914. + (match_operator 1 "compare_operator"
  1915. + [(and (match_operand 2 "register_operand" "")
  1916. + (match_operand 3 "const_int_operand" ""))
  1917. + (const_int 0)]))]
  1918. "reload_completed
  1919. - && QI_REG_P (operands[0])
  1920. + && QI_REG_P (operands[2])
  1921. + && GET_MODE (operands[2]) != QImode
  1922. && ((ix86_match_ccmode (insn, CCZmode)
  1923. - && !(INTVAL (operands[1]) & ~(255 << 8)))
  1924. + && !(INTVAL (operands[3]) & ~(255 << 8)))
  1925. || (ix86_match_ccmode (insn, CCNOmode)
  1926. - && !(INTVAL (operands[1]) & ~(127 << 8))))
  1927. - && GET_MODE (operands[0]) != QImode"
  1928. - [(set (reg:CCNO 17)
  1929. - (compare:CCNO
  1930. - (and:SI (zero_extract:SI (match_dup 0) (const_int 8) (const_int 8))
  1931. - (match_dup 1))
  1932. - (const_int 0)))]
  1933. - "operands[0] = gen_lowpart (SImode, operands[0]);
  1934. - operands[1] = gen_int_mode (INTVAL (operands[1]) >> 8, SImode);")
  1935. + && !(INTVAL (operands[3]) & ~(127 << 8))))"
  1936. + [(set (match_dup 0)
  1937. + (match_op_dup 1
  1938. + [(and:SI (zero_extract:SI (match_dup 2) (const_int 8) (const_int 8))
  1939. + (match_dup 3))
  1940. + (const_int 0)]))]
  1941. + "operands[2] = gen_lowpart (SImode, operands[2]);
  1942. + operands[3] = gen_int_mode (INTVAL (operands[3]) >> 8, SImode);")
  1943. (define_split
  1944. - [(set (reg 17)
  1945. - (compare
  1946. - (and (match_operand 0 "nonimmediate_operand" "")
  1947. - (match_operand 1 "const_int_operand" ""))
  1948. - (const_int 0)))]
  1949. + [(set (match_operand 0 "flags_reg_operand" "")
  1950. + (match_operator 1 "compare_operator"
  1951. + [(and (match_operand 2 "nonimmediate_operand" "")
  1952. + (match_operand 3 "const_int_operand" ""))
  1953. + (const_int 0)]))]
  1954. "reload_completed
  1955. - && (!REG_P (operands[0]) || ANY_QI_REG_P (operands[0]))
  1956. + && GET_MODE (operands[2]) != QImode
  1957. + && (!REG_P (operands[2]) || ANY_QI_REG_P (operands[2]))
  1958. && ((ix86_match_ccmode (insn, CCZmode)
  1959. - && !(INTVAL (operands[1]) & ~255))
  1960. + && !(INTVAL (operands[3]) & ~255))
  1961. || (ix86_match_ccmode (insn, CCNOmode)
  1962. - && !(INTVAL (operands[1]) & ~127)))
  1963. - && GET_MODE (operands[0]) != QImode"
  1964. - [(set (reg:CCNO 17)
  1965. - (compare:CCNO
  1966. - (and:QI (match_dup 0)
  1967. - (match_dup 1))
  1968. - (const_int 0)))]
  1969. - "operands[0] = gen_lowpart (QImode, operands[0]);
  1970. - operands[1] = gen_lowpart (QImode, operands[1]);")
  1971. + && !(INTVAL (operands[3]) & ~127)))"
  1972. + [(set (match_dup 0)
  1973. + (match_op_dup 1 [(and:QI (match_dup 2) (match_dup 3))
  1974. + (const_int 0)]))]
  1975. + "operands[2] = gen_lowpart (QImode, operands[2]);
  1976. + operands[3] = gen_lowpart (QImode, operands[3]);")
  1977. ;; %%% This used to optimize known byte-wide and operations to memory,
  1978. @@ -8066,7 +8092,7 @@
  1979. [(set_attr "type" "alu1")
  1980. (set_attr "mode" "QI")])
  1981. -(define_insn "*andqi_2"
  1982. +(define_insn "*andqi_2_maybe_si"
  1983. [(set (reg 17)
  1984. (compare (and:QI
  1985. (match_operand:QI 1 "nonimmediate_operand" "%0,0,0")
  1986. @@ -8074,13 +8100,14 @@
  1987. (const_int 0)))
  1988. (set (match_operand:QI 0 "nonimmediate_operand" "=q,qm,*r")
  1989. (and:QI (match_dup 1) (match_dup 2)))]
  1990. - "ix86_match_ccmode (insn, CCNOmode)
  1991. - && ix86_binary_operator_ok (AND, QImode, operands)"
  1992. + "ix86_binary_operator_ok (AND, QImode, operands)
  1993. + && ix86_match_ccmode (insn,
  1994. + GET_CODE (operands[2]) == CONST_INT
  1995. + && INTVAL (operands[2]) >= 0 ? CCNOmode : CCZmode)"
  1996. {
  1997. if (which_alternative == 2)
  1998. {
  1999. - if (GET_CODE (operands[2]) == CONST_INT
  2000. - && (INTVAL (operands[2]) & 0xffffff00))
  2001. + if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0)
  2002. operands[2] = GEN_INT (INTVAL (operands[2]) & 0xff);
  2003. return "and{l}\t{%2, %k0|%k0, %2}";
  2004. }
  2005. @@ -8089,6 +8116,20 @@
  2006. [(set_attr "type" "alu")
  2007. (set_attr "mode" "QI,QI,SI")])
  2008. +(define_insn "*andqi_2"
  2009. + [(set (reg 17)
  2010. + (compare (and:QI
  2011. + (match_operand:QI 1 "nonimmediate_operand" "%0,0")
  2012. + (match_operand:QI 2 "general_operand" "qim,qi"))
  2013. + (const_int 0)))
  2014. + (set (match_operand:QI 0 "nonimmediate_operand" "=q,qm")
  2015. + (and:QI (match_dup 1) (match_dup 2)))]
  2016. + "ix86_match_ccmode (insn, CCNOmode)
  2017. + && ix86_binary_operator_ok (AND, QImode, operands)"
  2018. + "and{b}\t{%2, %0|%0, %2}"
  2019. + [(set_attr "type" "alu")
  2020. + (set_attr "mode" "QI")])
  2021. +
  2022. (define_insn "*andqi_2_slp"
  2023. [(set (reg 17)
  2024. (compare (and:QI
  2025. @@ -10147,17 +10188,19 @@
  2026. (set_attr "mode" "DI")])
  2027. (define_split
  2028. - [(set (reg 17)
  2029. - (compare (not:DI (match_operand:DI 1 "nonimmediate_operand" ""))
  2030. - (const_int 0)))
  2031. - (set (match_operand:DI 0 "nonimmediate_operand" "")
  2032. - (not:DI (match_dup 1)))]
  2033. + [(set (match_operand 0 "flags_reg_operand" "")
  2034. + (match_operator 2 "compare_operator"
  2035. + [(not:DI (match_operand:DI 3 "nonimmediate_operand" ""))
  2036. + (const_int 0)]))
  2037. + (set (match_operand:DI 1 "nonimmediate_operand" "")
  2038. + (not:DI (match_dup 3)))]
  2039. "TARGET_64BIT && ix86_match_ccmode (insn, CCNOmode)"
  2040. - [(parallel [(set (reg:CCNO 17)
  2041. - (compare:CCNO (xor:DI (match_dup 1) (const_int -1))
  2042. - (const_int 0)))
  2043. - (set (match_dup 0)
  2044. - (xor:DI (match_dup 1) (const_int -1)))])]
  2045. + [(parallel [(set (match_dup 0)
  2046. + (match_op_dup 2
  2047. + [(xor:DI (match_dup 3) (const_int -1))
  2048. + (const_int 0)]))
  2049. + (set (match_dup 1)
  2050. + (xor:DI (match_dup 3) (const_int -1)))])]
  2051. "")
  2052. (define_expand "one_cmplsi2"
  2053. @@ -10196,17 +10239,18 @@
  2054. (set_attr "mode" "SI")])
  2055. (define_split
  2056. - [(set (reg 17)
  2057. - (compare (not:SI (match_operand:SI 1 "nonimmediate_operand" ""))
  2058. - (const_int 0)))
  2059. - (set (match_operand:SI 0 "nonimmediate_operand" "")
  2060. - (not:SI (match_dup 1)))]
  2061. + [(set (match_operand 0 "flags_reg_operand" "")
  2062. + (match_operator 2 "compare_operator"
  2063. + [(not:SI (match_operand:SI 3 "nonimmediate_operand" ""))
  2064. + (const_int 0)]))
  2065. + (set (match_operand:SI 1 "nonimmediate_operand" "")
  2066. + (not:SI (match_dup 3)))]
  2067. "ix86_match_ccmode (insn, CCNOmode)"
  2068. - [(parallel [(set (reg:CCNO 17)
  2069. - (compare:CCNO (xor:SI (match_dup 1) (const_int -1))
  2070. - (const_int 0)))
  2071. - (set (match_dup 0)
  2072. - (xor:SI (match_dup 1) (const_int -1)))])]
  2073. + [(parallel [(set (match_dup 0)
  2074. + (match_op_dup 2 [(xor:SI (match_dup 3) (const_int -1))
  2075. + (const_int 0)]))
  2076. + (set (match_dup 1)
  2077. + (xor:SI (match_dup 3) (const_int -1)))])]
  2078. "")
  2079. ;; ??? Currently never generated - xor is used instead.
  2080. @@ -10223,17 +10267,18 @@
  2081. (set_attr "mode" "SI")])
  2082. (define_split
  2083. - [(set (reg 17)
  2084. - (compare (not:SI (match_operand:SI 1 "register_operand" ""))
  2085. - (const_int 0)))
  2086. - (set (match_operand:DI 0 "register_operand" "")
  2087. - (zero_extend:DI (not:SI (match_dup 1))))]
  2088. + [(set (match_operand 0 "flags_reg_operand" "")
  2089. + (match_operator 2 "compare_operator"
  2090. + [(not:SI (match_operand:SI 3 "register_operand" ""))
  2091. + (const_int 0)]))
  2092. + (set (match_operand:DI 1 "register_operand" "")
  2093. + (zero_extend:DI (not:SI (match_dup 3))))]
  2094. "ix86_match_ccmode (insn, CCNOmode)"
  2095. - [(parallel [(set (reg:CCNO 17)
  2096. - (compare:CCNO (xor:SI (match_dup 1) (const_int -1))
  2097. - (const_int 0)))
  2098. - (set (match_dup 0)
  2099. - (zero_extend:DI (xor:SI (match_dup 1) (const_int -1))))])]
  2100. + [(parallel [(set (match_dup 0)
  2101. + (match_op_dup 2 [(xor:SI (match_dup 3) (const_int -1))
  2102. + (const_int 0)]))
  2103. + (set (match_dup 1)
  2104. + (zero_extend:DI (xor:SI (match_dup 3) (const_int -1))))])]
  2105. "")
  2106. (define_expand "one_cmplhi2"
  2107. @@ -10263,17 +10308,18 @@
  2108. (set_attr "mode" "HI")])
  2109. (define_split
  2110. - [(set (reg 17)
  2111. - (compare (not:HI (match_operand:HI 1 "nonimmediate_operand" ""))
  2112. - (const_int 0)))
  2113. - (set (match_operand:HI 0 "nonimmediate_operand" "")
  2114. - (not:HI (match_dup 1)))]
  2115. + [(set (match_operand 0 "flags_reg_operand" "")
  2116. + (match_operator 2 "compare_operator"
  2117. + [(not:HI (match_operand:HI 3 "nonimmediate_operand" ""))
  2118. + (const_int 0)]))
  2119. + (set (match_operand:HI 1 "nonimmediate_operand" "")
  2120. + (not:HI (match_dup 3)))]
  2121. "ix86_match_ccmode (insn, CCNOmode)"
  2122. - [(parallel [(set (reg:CCNO 17)
  2123. - (compare:CCNO (xor:HI (match_dup 1) (const_int -1))
  2124. - (const_int 0)))
  2125. - (set (match_dup 0)
  2126. - (xor:HI (match_dup 1) (const_int -1)))])]
  2127. + [(parallel [(set (match_dup 0)
  2128. + (match_op_dup 2 [(xor:HI (match_dup 3) (const_int -1))
  2129. + (const_int 0)]))
  2130. + (set (match_dup 1)
  2131. + (xor:HI (match_dup 3) (const_int -1)))])]
  2132. "")
  2133. ;; %%% Potential partial reg stall on alternative 1. What to do?
  2134. @@ -10306,17 +10352,18 @@
  2135. (set_attr "mode" "QI")])
  2136. (define_split
  2137. - [(set (reg 17)
  2138. - (compare (not:QI (match_operand:QI 1 "nonimmediate_operand" ""))
  2139. - (const_int 0)))
  2140. - (set (match_operand:QI 0 "nonimmediate_operand" "")
  2141. - (not:QI (match_dup 1)))]
  2142. + [(set (match_operand 0 "flags_reg_operand" "")
  2143. + (match_operator 2 "compare_operator"
  2144. + [(not:QI (match_operand:QI 3 "nonimmediate_operand" ""))
  2145. + (const_int 0)]))
  2146. + (set (match_operand:QI 1 "nonimmediate_operand" "")
  2147. + (not:QI (match_dup 3)))]
  2148. "ix86_match_ccmode (insn, CCNOmode)"
  2149. - [(parallel [(set (reg:CCNO 17)
  2150. - (compare:CCNO (xor:QI (match_dup 1) (const_int -1))
  2151. - (const_int 0)))
  2152. - (set (match_dup 0)
  2153. - (xor:QI (match_dup 1) (const_int -1)))])]
  2154. + [(parallel [(set (match_dup 0)
  2155. + (match_op_dup 2 [(xor:QI (match_dup 3) (const_int -1))
  2156. + (const_int 0)]))
  2157. + (set (match_dup 1)
  2158. + (xor:QI (match_dup 3) (const_int -1)))])]
  2159. "")
  2160. ;; Arithmetic shift instructions
  2161. @@ -16639,10 +16686,12 @@
  2162. (set (subreg:TI (match_dup 0) 0) (ior:TI (subreg:TI (match_dup 6) 0)
  2163. (subreg:TI (match_dup 7) 0)))]
  2164. {
  2165. - /* If op2 == op3, op3 will be clobbered before it is used.
  2166. - This should be optimized out though. */
  2167. + /* If op2 == op3, op3 would be clobbered before it is used. */
  2168. if (operands_match_p (operands[2], operands[3]))
  2169. - abort ();
  2170. + {
  2171. + emit_move_insn (operands[0], operands[2]);
  2172. + DONE;
  2173. + }
  2174. PUT_MODE (operands[1], GET_MODE (operands[0]));
  2175. if (operands_match_p (operands[0], operands[4]))
  2176. operands[6] = operands[4], operands[7] = operands[2];
  2177. @@ -16863,52 +16912,56 @@
  2178. ; instruction size is unchanged, except in the %eax case for
  2179. ; which it is increased by one byte, hence the ! optimize_size.
  2180. (define_split
  2181. - [(set (reg 17)
  2182. - (compare (and (match_operand 1 "aligned_operand" "")
  2183. - (match_operand 2 "const_int_operand" ""))
  2184. - (const_int 0)))
  2185. - (set (match_operand 0 "register_operand" "")
  2186. - (and (match_dup 1) (match_dup 2)))]
  2187. + [(set (match_operand 0 "flags_reg_operand" "")
  2188. + (match_operator 2 "compare_operator"
  2189. + [(and (match_operand 3 "aligned_operand" "")
  2190. + (match_operand 4 "const_int_operand" ""))
  2191. + (const_int 0)]))
  2192. + (set (match_operand 1 "register_operand" "")
  2193. + (and (match_dup 3) (match_dup 4)))]
  2194. "! TARGET_PARTIAL_REG_STALL && reload_completed
  2195. /* Ensure that the operand will remain sign-extended immediate. */
  2196. - && ix86_match_ccmode (insn, INTVAL (operands[2]) >= 0 ? CCNOmode : CCZmode)
  2197. + && ix86_match_ccmode (insn, INTVAL (operands[4]) >= 0 ? CCNOmode : CCZmode)
  2198. && ! optimize_size
  2199. - && ((GET_MODE (operands[0]) == HImode && ! TARGET_FAST_PREFIX)
  2200. - || (GET_MODE (operands[0]) == QImode && TARGET_PROMOTE_QImode))"
  2201. - [(parallel [(set (reg:CCNO 17)
  2202. - (compare:CCNO (and:SI (match_dup 1) (match_dup 2))
  2203. - (const_int 0)))
  2204. - (set (match_dup 0)
  2205. - (and:SI (match_dup 1) (match_dup 2)))])]
  2206. - "operands[2]
  2207. - = gen_int_mode (INTVAL (operands[2])
  2208. - & GET_MODE_MASK (GET_MODE (operands[0])),
  2209. - SImode);
  2210. - operands[0] = gen_lowpart (SImode, operands[0]);
  2211. - operands[1] = gen_lowpart (SImode, operands[1]);")
  2212. + && ((GET_MODE (operands[1]) == HImode && ! TARGET_FAST_PREFIX)
  2213. + || (GET_MODE (operands[1]) == QImode && TARGET_PROMOTE_QImode))"
  2214. + [(parallel [(set (match_dup 0)
  2215. + (match_op_dup 2 [(and:SI (match_dup 3) (match_dup 4))
  2216. + (const_int 0)]))
  2217. + (set (match_dup 1)
  2218. + (and:SI (match_dup 3) (match_dup 4)))])]
  2219. +{
  2220. + operands[4]
  2221. + = gen_int_mode (INTVAL (operands[4])
  2222. + & GET_MODE_MASK (GET_MODE (operands[1])), SImode);
  2223. + operands[1] = gen_lowpart (SImode, operands[1]);
  2224. + operands[3] = gen_lowpart (SImode, operands[3]);
  2225. +})
  2226. ; Don't promote the QImode tests, as i386 doesn't have encoding of
  2227. ; the TEST instruction with 32-bit sign-extended immediate and thus
  2228. ; the instruction size would at least double, which is not what we
  2229. ; want even with ! optimize_size.
  2230. (define_split
  2231. - [(set (reg 17)
  2232. - (compare (and (match_operand:HI 0 "aligned_operand" "")
  2233. - (match_operand:HI 1 "const_int_operand" ""))
  2234. - (const_int 0)))]
  2235. + [(set (match_operand 0 "flags_reg_operand" "")
  2236. + (match_operator 1 "compare_operator"
  2237. + [(and (match_operand:HI 2 "aligned_operand" "")
  2238. + (match_operand:HI 3 "const_int_operand" ""))
  2239. + (const_int 0)]))]
  2240. "! TARGET_PARTIAL_REG_STALL && reload_completed
  2241. /* Ensure that the operand will remain sign-extended immediate. */
  2242. - && ix86_match_ccmode (insn, INTVAL (operands[1]) >= 0 ? CCNOmode : CCZmode)
  2243. + && ix86_match_ccmode (insn, INTVAL (operands[3]) >= 0 ? CCNOmode : CCZmode)
  2244. && ! TARGET_FAST_PREFIX
  2245. && ! optimize_size"
  2246. - [(set (reg:CCNO 17)
  2247. - (compare:CCNO (and:SI (match_dup 0) (match_dup 1))
  2248. - (const_int 0)))]
  2249. - "operands[1]
  2250. - = gen_int_mode (INTVAL (operands[1])
  2251. - & GET_MODE_MASK (GET_MODE (operands[0])),
  2252. - SImode);
  2253. - operands[0] = gen_lowpart (SImode, operands[0]);")
  2254. + [(set (match_dup 0)
  2255. + (match_op_dup 1 [(and:SI (match_dup 2) (match_dup 3))
  2256. + (const_int 0)]))]
  2257. +{
  2258. + operands[3]
  2259. + = gen_int_mode (INTVAL (operands[3])
  2260. + & GET_MODE_MASK (GET_MODE (operands[2])), SImode);
  2261. + operands[2] = gen_lowpart (SImode, operands[2]);
  2262. +})
  2263. (define_split
  2264. [(set (match_operand 0 "register_operand" "")
  2265. @@ -17081,13 +17134,14 @@
  2266. ;; Don't compare memory with zero, load and use a test instead.
  2267. (define_peephole2
  2268. - [(set (reg 17)
  2269. - (compare (match_operand:SI 0 "memory_operand" "")
  2270. - (const_int 0)))
  2271. + [(set (match_operand 0 "flags_reg_operand" "")
  2272. + (match_operator 1 "compare_operator"
  2273. + [(match_operand:SI 2 "memory_operand" "")
  2274. + (const_int 0)]))
  2275. (match_scratch:SI 3 "r")]
  2276. "ix86_match_ccmode (insn, CCNOmode) && ! optimize_size"
  2277. - [(set (match_dup 3) (match_dup 0))
  2278. - (set (reg:CCNO 17) (compare:CCNO (match_dup 3) (const_int 0)))]
  2279. + [(set (match_dup 3) (match_dup 2))
  2280. + (set (match_dup 0) (match_op_dup 1 [(match_dup 3) (const_int 0)]))]
  2281. "")
  2282. ;; NOT is not pairable on Pentium, while XOR is, but one byte longer.
  2283. @@ -17151,77 +17205,77 @@
  2284. ;; versions if we're concerned about partial register stalls.
  2285. (define_peephole2
  2286. - [(set (reg 17)
  2287. - (compare (and:SI (match_operand:SI 0 "register_operand" "")
  2288. - (match_operand:SI 1 "immediate_operand" ""))
  2289. - (const_int 0)))]
  2290. + [(set (match_operand 0 "flags_reg_operand" "")
  2291. + (match_operator 1 "compare_operator"
  2292. + [(and:SI (match_operand:SI 2 "register_operand" "")
  2293. + (match_operand:SI 3 "immediate_operand" ""))
  2294. + (const_int 0)]))]
  2295. "ix86_match_ccmode (insn, CCNOmode)
  2296. - && (true_regnum (operands[0]) != 0
  2297. - || (GET_CODE (operands[1]) == CONST_INT
  2298. - && CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'K')))
  2299. - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
  2300. + && (true_regnum (operands[2]) != 0
  2301. + || (GET_CODE (operands[3]) == CONST_INT
  2302. + && CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'K')))
  2303. + && peep2_reg_dead_p (1, operands[2])"
  2304. [(parallel
  2305. - [(set (reg:CCNO 17)
  2306. - (compare:CCNO (and:SI (match_dup 0)
  2307. - (match_dup 1))
  2308. - (const_int 0)))
  2309. - (set (match_dup 0)
  2310. - (and:SI (match_dup 0) (match_dup 1)))])]
  2311. + [(set (match_dup 0)
  2312. + (match_op_dup 1 [(and:SI (match_dup 2) (match_dup 3))
  2313. + (const_int 0)]))
  2314. + (set (match_dup 2)
  2315. + (and:SI (match_dup 2) (match_dup 3)))])]
  2316. "")
  2317. ;; We don't need to handle HImode case, because it will be promoted to SImode
  2318. ;; on ! TARGET_PARTIAL_REG_STALL
  2319. (define_peephole2
  2320. - [(set (reg 17)
  2321. - (compare (and:QI (match_operand:QI 0 "register_operand" "")
  2322. - (match_operand:QI 1 "immediate_operand" ""))
  2323. - (const_int 0)))]
  2324. + [(set (match_operand 0 "flags_reg_operand" "")
  2325. + (match_operator 1 "compare_operator"
  2326. + [(and:QI (match_operand:QI 2 "register_operand" "")
  2327. + (match_operand:QI 3 "immediate_operand" ""))
  2328. + (const_int 0)]))]
  2329. "! TARGET_PARTIAL_REG_STALL
  2330. && ix86_match_ccmode (insn, CCNOmode)
  2331. - && true_regnum (operands[0]) != 0
  2332. - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
  2333. + && true_regnum (operands[2]) != 0
  2334. + && peep2_reg_dead_p (1, operands[2])"
  2335. [(parallel
  2336. - [(set (reg:CCNO 17)
  2337. - (compare:CCNO (and:QI (match_dup 0)
  2338. - (match_dup 1))
  2339. - (const_int 0)))
  2340. - (set (match_dup 0)
  2341. - (and:QI (match_dup 0) (match_dup 1)))])]
  2342. + [(set (match_dup 0)
  2343. + (match_op_dup 1 [(and:QI (match_dup 2) (match_dup 3))
  2344. + (const_int 0)]))
  2345. + (set (match_dup 2)
  2346. + (and:QI (match_dup 2) (match_dup 3)))])]
  2347. "")
  2348. (define_peephole2
  2349. - [(set (reg 17)
  2350. - (compare
  2351. - (and:SI
  2352. - (zero_extract:SI
  2353. - (match_operand 0 "ext_register_operand" "")
  2354. - (const_int 8)
  2355. - (const_int 8))
  2356. - (match_operand 1 "const_int_operand" ""))
  2357. - (const_int 0)))]
  2358. + [(set (match_operand 0 "flags_reg_operand" "")
  2359. + (match_operator 1 "compare_operator"
  2360. + [(and:SI
  2361. + (zero_extract:SI
  2362. + (match_operand 2 "ext_register_operand" "")
  2363. + (const_int 8)
  2364. + (const_int 8))
  2365. + (match_operand 3 "const_int_operand" ""))
  2366. + (const_int 0)]))]
  2367. "! TARGET_PARTIAL_REG_STALL
  2368. && ix86_match_ccmode (insn, CCNOmode)
  2369. - && true_regnum (operands[0]) != 0
  2370. - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
  2371. - [(parallel [(set (reg:CCNO 17)
  2372. - (compare:CCNO
  2373. - (and:SI
  2374. - (zero_extract:SI
  2375. - (match_dup 0)
  2376. - (const_int 8)
  2377. - (const_int 8))
  2378. - (match_dup 1))
  2379. - (const_int 0)))
  2380. - (set (zero_extract:SI (match_dup 0)
  2381. + && true_regnum (operands[2]) != 0
  2382. + && peep2_reg_dead_p (1, operands[2])"
  2383. + [(parallel [(set (match_dup 0)
  2384. + (match_op_dup 1
  2385. + [(and:SI
  2386. + (zero_extract:SI
  2387. + (match_dup 2)
  2388. + (const_int 8)
  2389. + (const_int 8))
  2390. + (match_dup 3))
  2391. + (const_int 0)]))
  2392. + (set (zero_extract:SI (match_dup 2)
  2393. (const_int 8)
  2394. (const_int 8))
  2395. (and:SI
  2396. (zero_extract:SI
  2397. - (match_dup 0)
  2398. + (match_dup 2)
  2399. (const_int 8)
  2400. (const_int 8))
  2401. - (match_dup 1)))])]
  2402. + (match_dup 3)))])]
  2403. "")
  2404. ;; Don't do logical operations with memory inputs.
  2405. @@ -17523,66 +17577,20 @@
  2406. "")
  2407. ;; Convert compares with 1 to shorter inc/dec operations when CF is not
  2408. -;; required and register dies.
  2409. -(define_peephole2
  2410. - [(set (reg 17)
  2411. - (compare (match_operand:SI 0 "register_operand" "")
  2412. - (match_operand:SI 1 "incdec_operand" "")))]
  2413. - "ix86_match_ccmode (insn, CCGCmode)
  2414. - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
  2415. - [(parallel [(set (reg:CCGC 17)
  2416. - (compare:CCGC (match_dup 0)
  2417. - (match_dup 1)))
  2418. - (clobber (match_dup 0))])]
  2419. - "")
  2420. -
  2421. +;; required and register dies. Similarly for 128 to plus -128.
  2422. (define_peephole2
  2423. - [(set (reg 17)
  2424. - (compare (match_operand:HI 0 "register_operand" "")
  2425. - (match_operand:HI 1 "incdec_operand" "")))]
  2426. - "ix86_match_ccmode (insn, CCGCmode)
  2427. - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
  2428. - [(parallel [(set (reg:CCGC 17)
  2429. - (compare:CCGC (match_dup 0)
  2430. - (match_dup 1)))
  2431. - (clobber (match_dup 0))])]
  2432. - "")
  2433. -
  2434. -(define_peephole2
  2435. - [(set (reg 17)
  2436. - (compare (match_operand:QI 0 "register_operand" "")
  2437. - (match_operand:QI 1 "incdec_operand" "")))]
  2438. - "ix86_match_ccmode (insn, CCGCmode)
  2439. - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
  2440. - [(parallel [(set (reg:CCGC 17)
  2441. - (compare:CCGC (match_dup 0)
  2442. - (match_dup 1)))
  2443. - (clobber (match_dup 0))])]
  2444. - "")
  2445. -
  2446. -;; Convert compares with 128 to shorter add -128
  2447. -(define_peephole2
  2448. - [(set (reg 17)
  2449. - (compare (match_operand:SI 0 "register_operand" "")
  2450. - (const_int 128)))]
  2451. - "ix86_match_ccmode (insn, CCGCmode)
  2452. - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
  2453. - [(parallel [(set (reg:CCGC 17)
  2454. - (compare:CCGC (match_dup 0)
  2455. - (const_int 128)))
  2456. - (clobber (match_dup 0))])]
  2457. - "")
  2458. -
  2459. -(define_peephole2
  2460. - [(set (reg 17)
  2461. - (compare (match_operand:HI 0 "register_operand" "")
  2462. - (const_int 128)))]
  2463. - "ix86_match_ccmode (insn, CCGCmode)
  2464. - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
  2465. - [(parallel [(set (reg:CCGC 17)
  2466. - (compare:CCGC (match_dup 0)
  2467. - (const_int 128)))
  2468. - (clobber (match_dup 0))])]
  2469. + [(set (match_operand 0 "flags_reg_operand" "")
  2470. + (match_operator 1 "compare_operator"
  2471. + [(match_operand 2 "register_operand" "")
  2472. + (match_operand 3 "const_int_operand" "")]))]
  2473. + "(INTVAL (operands[3]) == -1
  2474. + || INTVAL (operands[3]) == 1
  2475. + || INTVAL (operands[3]) == 128)
  2476. + && ix86_match_ccmode (insn, CCGCmode)
  2477. + && peep2_reg_dead_p (1, operands[2])"
  2478. + [(parallel [(set (match_dup 0)
  2479. + (match_op_dup 1 [(match_dup 2) (match_dup 3)]))
  2480. + (clobber (match_dup 2))])]
  2481. "")
  2482. (define_peephole2
  2483. @@ -17780,9 +17788,9 @@
  2484. return "call\t%P1";
  2485. }
  2486. if (SIBLING_CALL_P (insn))
  2487. - return "jmp\t%*%1";
  2488. + return "jmp\t%A1";
  2489. else
  2490. - return "call\t%*%1";
  2491. + return "call\t%A1";
  2492. }
  2493. [(set_attr "type" "callv")])
  2494. Index: gcc/config/ia64/ia64.c
  2495. ===================================================================
  2496. RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.c,v
  2497. retrieving revision 1.198.2.22
  2498. retrieving revision 1.198.2.24
  2499. diff -u -r1.198.2.22 -r1.198.2.24
  2500. --- gcc/gcc/config/ia64/ia64.c 17 Sep 2004 17:56:32 -0000 1.198.2.22
  2501. +++ gcc/gcc/config/ia64/ia64.c 14 Jan 2005 19:15:40 -0000 1.198.2.24
  2502. @@ -2884,10 +2884,13 @@
  2503. preserve those input registers used as arguments to the sibling call.
  2504. It is unclear how to compute that number here. */
  2505. if (current_frame_info.n_input_regs != 0)
  2506. - emit_insn (gen_alloc (gen_rtx_REG (DImode, fp),
  2507. - GEN_INT (0), GEN_INT (0),
  2508. - GEN_INT (current_frame_info.n_input_regs),
  2509. - GEN_INT (0)));
  2510. + {
  2511. + rtx n_inputs = GEN_INT (current_frame_info.n_input_regs);
  2512. + insn = emit_insn (gen_alloc (gen_rtx_REG (DImode, fp),
  2513. + const0_rtx, const0_rtx,
  2514. + n_inputs, const0_rtx));
  2515. + RTX_FRAME_RELATED_P (insn) = 1;
  2516. + }
  2517. }
  2518. }
  2519. @@ -3021,15 +3024,16 @@
  2520. int aligned_p;
  2521. {
  2522. if (size == (TARGET_ILP32 ? 4 : 8)
  2523. - && aligned_p
  2524. && !(TARGET_NO_PIC || TARGET_AUTO_PIC)
  2525. && GET_CODE (x) == SYMBOL_REF
  2526. && SYMBOL_REF_FLAG (x))
  2527. {
  2528. - if (TARGET_ILP32)
  2529. - fputs ("\tdata4\t@fptr(", asm_out_file);
  2530. - else
  2531. - fputs ("\tdata8\t@fptr(", asm_out_file);
  2532. + static const char * const directive[2][2] = {
  2533. + /* 64-bit pointer */ /* 32-bit pointer */
  2534. + { "\tdata8.ua\t@fptr(", "\tdata4.ua\t@fptr("}, /* unaligned */
  2535. + { "\tdata8\t@fptr(", "\tdata4\t@fptr("} /* aligned */
  2536. + };
  2537. + fputs (directive[aligned_p != 0][TARGET_ILP32 != 0], asm_out_file);
  2538. output_addr_const (asm_out_file, x);
  2539. fputs (")\n", asm_out_file);
  2540. return true;
  2541. @@ -7451,13 +7455,24 @@
  2542. {
  2543. dest_regno = REGNO (dest);
  2544. - /* If this isn't the final destination for ar.pfs, the alloc
  2545. - shouldn't have been marked frame related. */
  2546. - if (dest_regno != current_frame_info.reg_save_ar_pfs)
  2547. - abort ();
  2548. -
  2549. - fprintf (asm_out_file, "\t.save ar.pfs, r%d\n",
  2550. - ia64_dbx_register_number (dest_regno));
  2551. + /* If this is the final destination for ar.pfs, then this must
  2552. + be the alloc in the prologue. */
  2553. + if (dest_regno == current_frame_info.reg_save_ar_pfs)
  2554. + fprintf (asm_out_file, "\t.save ar.pfs, r%d\n",
  2555. + ia64_dbx_register_number (dest_regno));
  2556. + else
  2557. + {
  2558. + /* This must be an alloc before a sibcall. We must drop the
  2559. + old frame info. The easiest way to drop the old frame
  2560. + info is to ensure we had a ".restore sp" directive
  2561. + followed by a new prologue. If the procedure doesn't
  2562. + have a memory-stack frame, we'll issue a dummy ".restore
  2563. + sp" now. */
  2564. + if (current_frame_info.total_size == 0 && !frame_pointer_needed)
  2565. + /* if haven't done process_epilogue() yet, do it now */
  2566. + process_epilogue ();
  2567. + fprintf (asm_out_file, "\t.prologue\n");
  2568. + }
  2569. return 1;
  2570. }
  2571. Index: gcc/config/m68hc11/t-m68hc11-gas
  2572. ===================================================================
  2573. RCS file: /cvs/gcc/gcc/gcc/config/m68hc11/t-m68hc11-gas,v
  2574. retrieving revision 1.7.14.3
  2575. retrieving revision 1.7.14.4
  2576. diff -u -r1.7.14.3 -r1.7.14.4
  2577. --- gcc/gcc/config/m68hc11/t-m68hc11-gas 4 Oct 2003 19:45:57 -0000 1.7.14.3
  2578. +++ gcc/gcc/config/m68hc11/t-m68hc11-gas 28 Jan 2005 22:21:39 -0000 1.7.14.4
  2579. @@ -53,7 +53,7 @@
  2580. dp-bit.c: $(srcdir)/config/fp-bit.c
  2581. echo '#define SMALL_MACHINE' >> dp-bit.c
  2582. echo '#define CMPtype HItype' >> dp-bit.c
  2583. - echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
  2584. + echo '#ifdef __LITTLE_ENDIAN__' >> dp-bit.c
  2585. echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
  2586. echo '#endif' >> dp-bit.c
  2587. cat $(srcdir)/config/fp-bit.c >> dp-bit.c
  2588. Index: gcc/config/mips/mips-protos.h
  2589. ===================================================================
  2590. RCS file: /cvs/gcc/gcc/gcc/config/mips/mips-protos.h,v
  2591. retrieving revision 1.30.4.1
  2592. retrieving revision 1.30.4.2
  2593. diff -u -r1.30.4.1 -r1.30.4.2
  2594. --- gcc/gcc/config/mips/mips-protos.h 31 Jan 2003 23:51:22 -0000 1.30.4.1
  2595. +++ gcc/gcc/config/mips/mips-protos.h 8 Jan 2005 14:33:32 -0000 1.30.4.2
  2596. @@ -1,6 +1,6 @@
  2597. /* Prototypes of target machine for GNU compiler. MIPS version.
  2598. Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
  2599. - 1999, 2001, 2002 Free Software Foundation, Inc.
  2600. + 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
  2601. Contributed by A. Lichnewsky (lich@inria.inria.fr).
  2602. Changed by Michael Meissner (meissner@osf.org).
  2603. 64 bit r4000 support by Ian Lance Taylor (ian@cygnus.com) and
  2604. @@ -36,9 +36,13 @@
  2605. extern const char * current_section_name PARAMS ((void));
  2606. extern unsigned int current_section_flags PARAMS ((void));
  2607. extern int mips_can_use_return_insn PARAMS ((void));
  2608. -extern void mips_declare_object PARAMS ((FILE *, const char *,
  2609. - const char *,
  2610. - const char *, int));
  2611. +extern void mips_output_aligned_decl_common
  2612. + PARAMS ((FILE *, tree, const char *,
  2613. + unsigned HOST_WIDE_INT,
  2614. + unsigned int));
  2615. +extern void mips_declare_object
  2616. + PARAMS ((FILE *, const char *, const char *,
  2617. + const char *, ...));
  2618. extern void mips_expand_epilogue PARAMS ((void));
  2619. extern void mips_expand_prologue PARAMS ((void));
  2620. extern void mips_output_filename PARAMS ((FILE *, const char *));
  2621. Index: gcc/config/mips/mips.c
  2622. ===================================================================
  2623. RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
  2624. retrieving revision 1.241.2.4
  2625. retrieving revision 1.241.2.5
  2626. diff -u -r1.241.2.4 -r1.241.2.5
  2627. --- gcc/gcc/config/mips/mips.c 27 Jun 2003 11:44:23 -0000 1.241.2.4
  2628. +++ gcc/gcc/config/mips/mips.c 8 Jan 2005 14:33:33 -0000 1.241.2.5
  2629. @@ -1,6 +1,6 @@
  2630. /* Subroutines for insn-output.c for MIPS
  2631. Copyright (C) 1989, 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998,
  2632. - 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
  2633. + 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
  2634. Contributed by A. Lichnewsky, lich@inria.inria.fr.
  2635. Changes by Michael Meissner, meissner@osf.org.
  2636. 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and
  2637. @@ -6562,26 +6562,84 @@
  2638. fatal_io_error ("can't close temp file");
  2639. }
  2640. -/* Emit either a label, .comm, or .lcomm directive, and mark that the symbol
  2641. - is used, so that we don't emit an .extern for it in mips_asm_file_end. */
  2642. +/* Implement ASM_OUTPUT_ALIGNED_DECL_COMMON. This is usually the same as
  2643. + the elfos.h version, but we also need to handle -muninit-const-in-rodata
  2644. + and the limitations of the SGI o32 assembler. */
  2645. void
  2646. -mips_declare_object (stream, name, init_string, final_string, size)
  2647. +mips_output_aligned_decl_common (stream, decl, name, size, align)
  2648. FILE *stream;
  2649. + tree decl;
  2650. const char *name;
  2651. - const char *init_string;
  2652. - const char *final_string;
  2653. - int size;
  2654. + unsigned HOST_WIDE_INT size;
  2655. + unsigned int align;
  2656. {
  2657. - fputs (init_string, stream); /* "", "\t.comm\t", or "\t.lcomm\t" */
  2658. + const char *format;
  2659. +
  2660. + /* If the target wants uninitialized const declarations in
  2661. + .rdata then don't put them in .comm. */
  2662. + if (TARGET_EMBEDDED_DATA && TARGET_UNINIT_CONST_IN_RODATA
  2663. + && TREE_CODE (decl) == VAR_DECL && TREE_READONLY (decl)
  2664. + && (DECL_INITIAL (decl) == 0 || DECL_INITIAL (decl) == error_mark_node))
  2665. + {
  2666. + if (TREE_PUBLIC (decl) && DECL_NAME (decl))
  2667. + targetm.asm_out.globalize_label (stream, name);
  2668. +
  2669. + readonly_data_section ();
  2670. + ASM_OUTPUT_ALIGN (stream, floor_log2 (align / BITS_PER_UNIT));
  2671. +
  2672. + format = ACONCAT ((":\n\t.space\t", HOST_WIDE_INT_PRINT_UNSIGNED,
  2673. + "\n", NULL));
  2674. + mips_declare_object (stream, name, "", format, size);
  2675. + }
  2676. +#ifdef TARGET_IRIX6
  2677. + /* The SGI o32 assembler doesn't accept an alignment, so round up
  2678. + the size instead. */
  2679. + else if (mips_abi == ABI_32 && !TARGET_GAS)
  2680. + {
  2681. + size += (align / BITS_PER_UNIT) - 1;
  2682. + size -= size % (align / BITS_PER_UNIT);
  2683. + format = ACONCAT ((",", HOST_WIDE_INT_PRINT_UNSIGNED, "\n", NULL));
  2684. + mips_declare_object (stream, name, "\n\t.comm\t", format, size);
  2685. + }
  2686. +#endif
  2687. + else
  2688. + {
  2689. + format = ACONCAT ((",", HOST_WIDE_INT_PRINT_UNSIGNED, ",%u\n", NULL));
  2690. + mips_declare_object (stream, name, "\n\t.comm\t", format,
  2691. + size, align / BITS_PER_UNIT);
  2692. + }
  2693. +}
  2694. +
  2695. +/* Emit either a label, .comm, or .lcomm directive. When using assembler
  2696. + macros, mark the symbol as written so that mips_file_end won't emit an
  2697. + .extern for it. STREAM is the output file, NAME is the name of the
  2698. + symbol, INIT_STRING is the string that should be written before the
  2699. + symbol and FINAL_STRING is the string that shoulbe written after it.
  2700. + FINAL_STRING is a printf() format that consumes the remaining arguments. */
  2701. +
  2702. +void
  2703. +mips_declare_object VPARAMS ((FILE *stream, const char *name,
  2704. + const char *init_string,
  2705. + const char *final_string, ...))
  2706. +{
  2707. + VA_OPEN (ap, final_string);
  2708. + VA_FIXEDARG (ap, FILE *, stream);
  2709. + VA_FIXEDARG (ap, const char *, name);
  2710. + VA_FIXEDARG (ap, const char *, init_string);
  2711. + VA_FIXEDARG (ap, const char *, final_string);
  2712. +
  2713. + fputs (init_string, stream);
  2714. assemble_name (stream, name);
  2715. - fprintf (stream, final_string, size); /* ":\n", ",%u\n", ",%u\n" */
  2716. + vfprintf (stream, final_string, ap);
  2717. if (TARGET_GP_OPT)
  2718. {
  2719. tree name_tree = get_identifier (name);
  2720. TREE_ASM_WRITTEN (name_tree) = 1;
  2721. }
  2722. +
  2723. + VA_CLOSE (ap);
  2724. }
  2725. /* Return the bytes needed to compute the frame pointer from the current
  2726. Index: gcc/config/mips/mips.h
  2727. ===================================================================
  2728. RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.h,v
  2729. retrieving revision 1.227.4.6
  2730. retrieving revision 1.227.4.7
  2731. diff -u -r1.227.4.6 -r1.227.4.7
  2732. --- gcc/gcc/config/mips/mips.h 30 May 2003 12:00:42 -0000 1.227.4.6
  2733. +++ gcc/gcc/config/mips/mips.h 8 Jan 2005 14:33:34 -0000 1.227.4.7
  2734. @@ -1,6 +1,6 @@
  2735. /* Definitions of target machine for GNU compiler. MIPS version.
  2736. Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
  2737. - 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
  2738. + 1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  2739. Contributed by A. Lichnewsky (lich@inria.inria.fr).
  2740. Changed by Michael Meissner (meissner@osf.org).
  2741. 64 bit r4000 support by Ian Lance Taylor (ian@cygnus.com) and
  2742. @@ -4326,28 +4326,7 @@
  2743. /* This says how to define a global common symbol. */
  2744. -#define ASM_OUTPUT_ALIGNED_DECL_COMMON(STREAM, DECL, NAME, SIZE, ALIGN) \
  2745. - do { \
  2746. - /* If the target wants uninitialized const declarations in \
  2747. - .rdata then don't put them in .comm */ \
  2748. - if (TARGET_EMBEDDED_DATA && TARGET_UNINIT_CONST_IN_RODATA \
  2749. - && TREE_CODE (DECL) == VAR_DECL && TREE_READONLY (DECL) \
  2750. - && (DECL_INITIAL (DECL) == 0 \
  2751. - || DECL_INITIAL (DECL) == error_mark_node)) \
  2752. - { \
  2753. - if (TREE_PUBLIC (DECL) && DECL_NAME (DECL)) \
  2754. - (*targetm.asm_out.globalize_label) (STREAM, NAME); \
  2755. - \
  2756. - readonly_data_section (); \
  2757. - ASM_OUTPUT_ALIGN (STREAM, floor_log2 (ALIGN / BITS_PER_UNIT)); \
  2758. - mips_declare_object (STREAM, NAME, "", ":\n\t.space\t%u\n", \
  2759. - (SIZE)); \
  2760. - } \
  2761. - else \
  2762. - mips_declare_object (STREAM, NAME, "\n\t.comm\t", ",%u\n", \
  2763. - (SIZE)); \
  2764. - } while (0)
  2765. -
  2766. +#define ASM_OUTPUT_ALIGNED_DECL_COMMON mips_output_aligned_decl_common
  2767. /* This says how to define a local common symbol (ie, not visible to
  2768. linker). */
  2769. Index: gcc/config/mips/mips.md
  2770. ===================================================================
  2771. RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.md,v
  2772. retrieving revision 1.153.2.5
  2773. retrieving revision 1.153.2.6
  2774. diff -u -r1.153.2.5 -r1.153.2.6
  2775. --- gcc/gcc/config/mips/mips.md 27 Mar 2004 10:35:03 -0000 1.153.2.5
  2776. +++ gcc/gcc/config/mips/mips.md 8 Jan 2005 14:11:12 -0000 1.153.2.6
  2777. @@ -1,6 +1,6 @@
  2778. ;; Mips.md Machine Description for MIPS based processors
  2779. ;; Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
  2780. -;; 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
  2781. +;; 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
  2782. ;; Contributed by A. Lichnewsky, lich@inria.inria.fr
  2783. ;; Changes by Michael Meissner, meissner@osf.org
  2784. ;; 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and
  2785. @@ -163,7 +163,8 @@
  2786. ;; Describe a user's asm statement.
  2787. (define_asm_attributes
  2788. - [(set_attr "type" "multi")])
  2789. + [(set_attr "type" "multi")
  2790. + (set_attr "can_delay" "no")])
  2791. ;; whether or not generating calls to position independent functions
  2792. (define_attr "abicalls" "no,yes"
  2793. Index: gcc/config/pa/pa32-linux.h
  2794. ===================================================================
  2795. RCS file: /cvs/gcc/gcc/gcc/config/pa/pa32-linux.h,v
  2796. retrieving revision 1.10
  2797. retrieving revision 1.10.2.1
  2798. diff -u -r1.10 -r1.10.2.1
  2799. --- gcc/gcc/config/pa/pa32-linux.h 6 Dec 2002 02:54:38 -0000 1.10
  2800. +++ gcc/gcc/config/pa/pa32-linux.h 27 Dec 2004 02:55:49 -0000 1.10.2.1
  2801. @@ -28,7 +28,7 @@
  2802. pointer into the frame. This target does not need multiple
  2803. subspace stubs, so we allow sibcalls to all functions. */
  2804. #undef FUNCTION_OK_FOR_SIBCALL
  2805. -#define FUNCTION_OK_FOR_SIBCALL(DECL) 1
  2806. +#define FUNCTION_OK_FOR_SIBCALL(DECL) (!TARGET_PORTABLE_RUNTIME)
  2807. /* The libcall __canonicalize_funcptr_for_compare is referenced in
  2808. crtend.o and the reference isn't resolved in objects that don't
  2809. Index: gcc/config/rs6000/rs6000.c
  2810. ===================================================================
  2811. RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
  2812. retrieving revision 1.403.2.14
  2813. retrieving revision 1.403.2.16
  2814. diff -u -r1.403.2.14 -r1.403.2.16
  2815. --- gcc/gcc/config/rs6000/rs6000.c 14 Jan 2004 14:03:58 -0000 1.403.2.14
  2816. +++ gcc/gcc/config/rs6000/rs6000.c 1 Dec 2004 06:13:16 -0000 1.403.2.16
  2817. @@ -150,7 +150,8 @@
  2818. /* Call distance, overridden by -mlongcall and #pragma longcall(1).
  2819. The only place that looks at this is rs6000_set_default_type_attributes;
  2820. everywhere else should rely on the presence or absence of a longcall
  2821. - attribute on the function declaration. */
  2822. + attribute on the function declaration. Exception: init_cumulative_args
  2823. + looks at it too, for libcalls. */
  2824. int rs6000_default_long_calls;
  2825. const char *rs6000_longcall_switch;
  2826. @@ -2910,10 +2911,11 @@
  2827. cum->orig_nargs = cum->nargs_prototype;
  2828. /* Check for a longcall attribute. */
  2829. - if (fntype
  2830. - && lookup_attribute ("longcall", TYPE_ATTRIBUTES (fntype))
  2831. - && !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype)))
  2832. - cum->call_cookie = CALL_LONG;
  2833. + if ((!fntype && rs6000_default_long_calls)
  2834. + || (fntype
  2835. + && lookup_attribute ("longcall", TYPE_ATTRIBUTES (fntype))
  2836. + && !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype))))
  2837. + cum->call_cookie |= CALL_LONG;
  2838. if (TARGET_DEBUG_ARG)
  2839. {
  2840. @@ -10356,8 +10358,10 @@
  2841. rtx reg, mem, vrsave;
  2842. int offset;
  2843. - /* Get VRSAVE onto a GPR. */
  2844. - reg = gen_rtx_REG (SImode, 12);
  2845. + /* Get VRSAVE onto a GPR. Note that ABI_V4 might be using r12
  2846. + as frame_reg_rtx and r11 as the static chain pointer for
  2847. + nested functions. */
  2848. + reg = gen_rtx_REG (SImode, 0);
  2849. vrsave = gen_rtx_REG (SImode, VRSAVE_REGNO);
  2850. if (TARGET_MACHO)
  2851. emit_insn (gen_get_vrsave_internal (reg));
  2852. Index: gcc/config/rs6000/rs6000.md
  2853. ===================================================================
  2854. RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.md,v
  2855. retrieving revision 1.224.2.6
  2856. retrieving revision 1.224.2.7
  2857. diff -u -r1.224.2.6 -r1.224.2.7
  2858. --- gcc/gcc/config/rs6000/rs6000.md 8 Mar 2004 04:20:45 -0000 1.224.2.6
  2859. +++ gcc/gcc/config/rs6000/rs6000.md 24 Dec 2004 23:17:06 -0000 1.224.2.7
  2860. @@ -3124,61 +3124,6 @@
  2861. }"
  2862. [(set_attr "length" "8")])
  2863. -(define_insn_and_split "*andsi3_internal7"
  2864. - [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y")
  2865. - (compare:CC (and:SI (match_operand:SI 0 "gpc_reg_operand" "r,r")
  2866. - (match_operand:SI 1 "mask_operand_wrap" "i,i"))
  2867. - (const_int 0)))
  2868. - (clobber (match_scratch:SI 3 "=r,r"))]
  2869. - "TARGET_POWERPC64"
  2870. - "#"
  2871. - "TARGET_POWERPC64"
  2872. - [(parallel [(set (match_dup 2)
  2873. - (compare:CC (and:SI (rotate:SI (match_dup 0) (match_dup 4))
  2874. - (match_dup 5))
  2875. - (const_int 0)))
  2876. - (clobber (match_dup 3))])]
  2877. - "
  2878. -{
  2879. - int mb = extract_MB (operands[1]);
  2880. - int me = extract_ME (operands[1]);
  2881. - operands[4] = GEN_INT (me + 1);
  2882. - operands[5] = GEN_INT (~((HOST_WIDE_INT) -1 << (33 + me - mb)));
  2883. -}"
  2884. - [(set_attr "type" "delayed_compare,compare")
  2885. - (set_attr "length" "4,8")])
  2886. -
  2887. -(define_insn_and_split "*andsi3_internal8"
  2888. - [(set (match_operand:CC 3 "cc_reg_operand" "=x,??y")
  2889. - (compare:CC (and:SI (match_operand:SI 1 "gpc_reg_operand" "r,r")
  2890. - (match_operand:SI 2 "mask_operand_wrap" "i,i"))
  2891. - (const_int 0)))
  2892. - (set (match_operand:SI 0 "gpc_reg_operand" "=r,r")
  2893. - (and:SI (match_dup 1)
  2894. - (match_dup 2)))]
  2895. - "TARGET_POWERPC64"
  2896. - "#"
  2897. - "TARGET_POWERPC64"
  2898. - [(parallel [(set (match_dup 3)
  2899. - (compare:CC (and:SI (rotate:SI (match_dup 1) (match_dup 4))
  2900. - (match_dup 5))
  2901. - (const_int 0)))
  2902. - (set (match_dup 0)
  2903. - (and:SI (rotate:SI (match_dup 1) (match_dup 4))
  2904. - (match_dup 5)))])
  2905. - (set (match_dup 0)
  2906. - (rotate:SI (match_dup 0) (match_dup 6)))]
  2907. - "
  2908. -{
  2909. - int mb = extract_MB (operands[2]);
  2910. - int me = extract_ME (operands[2]);
  2911. - operands[4] = GEN_INT (me + 1);
  2912. - operands[6] = GEN_INT (32 - (me + 1));
  2913. - operands[5] = GEN_INT (~((HOST_WIDE_INT) -1 << (33 + me - mb)));
  2914. -}"
  2915. - [(set_attr "type" "delayed_compare,compare")
  2916. - (set_attr "length" "8,12")])
  2917. -
  2918. (define_expand "iorsi3"
  2919. [(set (match_operand:SI 0 "gpc_reg_operand" "")
  2920. (ior:SI (match_operand:SI 1 "gpc_reg_operand" "")
  2921. Index: gcc/config/s390/s390.md
  2922. ===================================================================
  2923. RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.md,v
  2924. retrieving revision 1.41.2.12
  2925. retrieving revision 1.41.2.13
  2926. diff -u -r1.41.2.12 -r1.41.2.13
  2927. --- gcc/gcc/config/s390/s390.md 3 Aug 2004 20:06:51 -0000 1.41.2.12
  2928. +++ gcc/gcc/config/s390/s390.md 27 Jan 2005 23:38:39 -0000 1.41.2.13
  2929. @@ -910,11 +910,13 @@
  2930. })
  2931. (define_expand "reload_outti"
  2932. - [(parallel [(match_operand:TI 0 "memory_operand" "")
  2933. + [(parallel [(match_operand:TI 0 "" "")
  2934. (match_operand:TI 1 "register_operand" "d")
  2935. (match_operand:DI 2 "register_operand" "=&a")])]
  2936. "TARGET_64BIT"
  2937. {
  2938. + if (GET_CODE (operands[0]) != MEM)
  2939. + abort ();
  2940. s390_load_address (operands[2], XEXP (operands[0], 0));
  2941. operands[0] = replace_equiv_address (operands[0], operands[2]);
  2942. emit_move_insn (operands[0], operands[1]);
  2943. @@ -1060,11 +1062,13 @@
  2944. })
  2945. (define_expand "reload_outdi"
  2946. - [(parallel [(match_operand:DI 0 "memory_operand" "")
  2947. + [(parallel [(match_operand:DI 0 "" "")
  2948. (match_operand:DI 1 "register_operand" "d")
  2949. (match_operand:SI 2 "register_operand" "=&a")])]
  2950. "!TARGET_64BIT"
  2951. {
  2952. + if (GET_CODE (operands[0]) != MEM)
  2953. + abort ();
  2954. s390_load_address (operands[2], XEXP (operands[0], 0));
  2955. operands[0] = replace_equiv_address (operands[0], operands[2]);
  2956. emit_move_insn (operands[0], operands[1]);
  2957. @@ -1374,11 +1378,13 @@
  2958. })
  2959. (define_expand "reload_outdf"
  2960. - [(parallel [(match_operand:DF 0 "memory_operand" "")
  2961. + [(parallel [(match_operand:DF 0 "" "")
  2962. (match_operand:DF 1 "register_operand" "d")
  2963. (match_operand:SI 2 "register_operand" "=&a")])]
  2964. "!TARGET_64BIT"
  2965. {
  2966. + if (GET_CODE (operands[0]) != MEM)
  2967. + abort ();
  2968. s390_load_address (operands[2], XEXP (operands[0], 0));
  2969. operands[0] = replace_equiv_address (operands[0], operands[2]);
  2970. emit_move_insn (operands[0], operands[1]);
  2971. Index: gcc/config/sparc/sparc.c
  2972. ===================================================================
  2973. RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.c,v
  2974. retrieving revision 1.233.4.12
  2975. retrieving revision 1.233.4.13
  2976. diff -u -r1.233.4.12 -r1.233.4.13
  2977. --- gcc/gcc/config/sparc/sparc.c 17 Jul 2004 19:49:21 -0000 1.233.4.12
  2978. +++ gcc/gcc/config/sparc/sparc.c 14 Oct 2004 06:54:26 -0000 1.233.4.13
  2979. @@ -178,6 +178,8 @@
  2980. static void sparc_encode_section_info PARAMS ((tree, int));
  2981. static void sparc_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT,
  2982. HOST_WIDE_INT, tree));
  2983. +static bool sparc_can_output_mi_thunk PARAMS ((tree, HOST_WIDE_INT,
  2984. + HOST_WIDE_INT, tree));
  2985. /* Option handling. */
  2986. @@ -244,7 +246,7 @@
  2987. #undef TARGET_ASM_OUTPUT_MI_THUNK
  2988. #define TARGET_ASM_OUTPUT_MI_THUNK sparc_output_mi_thunk
  2989. #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK
  2990. -#define TARGET_ASM_CAN_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall
  2991. +#define TARGET_ASM_CAN_OUTPUT_MI_THUNK sparc_can_output_mi_thunk
  2992. struct gcc_target targetm = TARGET_INITIALIZER;
  2993. @@ -8622,18 +8624,21 @@
  2994. SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1;
  2995. }
  2996. -/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
  2997. - Used for C++ multiple inheritance. */
  2998. +/* Output the assembler code for a thunk function. THUNK_DECL is the
  2999. + declaration for the thunk function itself, FUNCTION is the decl for
  3000. + the target function. DELTA is an immediate constant offset to be
  3001. + added to THIS. If VCALL_OFFSET is nonzero, the word at address
  3002. + (*THIS + VCALL_OFFSET) should be additionally added to THIS. */
  3003. static void
  3004. sparc_output_mi_thunk (file, thunk_fndecl, delta, vcall_offset, function)
  3005. FILE *file;
  3006. tree thunk_fndecl ATTRIBUTE_UNUSED;
  3007. HOST_WIDE_INT delta;
  3008. - HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED;
  3009. + HOST_WIDE_INT vcall_offset;
  3010. tree function;
  3011. {
  3012. - rtx this, insn, funexp, delta_rtx, tmp;
  3013. + rtx this, insn, funexp;
  3014. reload_completed = 1;
  3015. no_new_pseudos = 1;
  3016. @@ -8650,26 +8655,73 @@
  3017. /* Add DELTA. When possible use a plain add, otherwise load it into
  3018. a register first. */
  3019. - delta_rtx = GEN_INT (delta);
  3020. - if (!SPARC_SIMM13_P (delta))
  3021. + if (delta)
  3022. {
  3023. + rtx delta_rtx = GEN_INT (delta);
  3024. +
  3025. + if (! SPARC_SIMM13_P (delta))
  3026. + {
  3027. + rtx scratch = gen_rtx_REG (Pmode, 1);
  3028. + emit_move_insn (scratch, delta_rtx);
  3029. + delta_rtx = scratch;
  3030. + }
  3031. +
  3032. + /* THIS += DELTA. */
  3033. + emit_insn (gen_add2_insn (this, delta_rtx));
  3034. + }
  3035. +
  3036. + /* Add the word at address (*THIS + VCALL_OFFSET). */
  3037. + if (vcall_offset)
  3038. + {
  3039. + rtx vcall_offset_rtx = GEN_INT (vcall_offset);
  3040. rtx scratch = gen_rtx_REG (Pmode, 1);
  3041. - if (input_operand (delta_rtx, GET_MODE (scratch)))
  3042. - emit_insn (gen_rtx_SET (VOIDmode, scratch, delta_rtx));
  3043. + if (vcall_offset >= 0)
  3044. + abort ();
  3045. +
  3046. + /* SCRATCH = *THIS. */
  3047. + emit_move_insn (scratch, gen_rtx_MEM (Pmode, this));
  3048. +
  3049. + /* Prepare for adding VCALL_OFFSET. The difficulty is that we
  3050. + may not have any available scratch register at this point. */
  3051. + if (SPARC_SIMM13_P (vcall_offset))
  3052. + ;
  3053. + /* This is the case if ARCH64 (unless -ffixed-g5 is passed). */
  3054. + else if (! fixed_regs[5]
  3055. + /* The below sequence is made up of at least 2 insns,
  3056. + while the default method may need only one. */
  3057. + && vcall_offset < -8192)
  3058. + {
  3059. + rtx scratch2 = gen_rtx_REG (Pmode, 5);
  3060. + emit_move_insn (scratch2, vcall_offset_rtx);
  3061. + vcall_offset_rtx = scratch2;
  3062. + }
  3063. else
  3064. {
  3065. - if (TARGET_ARCH64)
  3066. - sparc_emit_set_const64 (scratch, delta_rtx);
  3067. - else
  3068. - sparc_emit_set_const32 (scratch, delta_rtx);
  3069. + rtx increment = GEN_INT (-4096);
  3070. +
  3071. + /* VCALL_OFFSET is a negative number whose typical range can be
  3072. + estimated as -32768..0 in 32-bit mode. In almost all cases
  3073. + it is therefore cheaper to emit multiple add insns than
  3074. + spilling and loading the constant into a register (at least
  3075. + 6 insns). */
  3076. + while (! SPARC_SIMM13_P (vcall_offset))
  3077. + {
  3078. + emit_insn (gen_add2_insn (scratch, increment));
  3079. + vcall_offset += 4096;
  3080. + }
  3081. + vcall_offset_rtx = GEN_INT (vcall_offset); /* cannot be 0 */
  3082. }
  3083. - delta_rtx = scratch;
  3084. - }
  3085. + /* SCRATCH = *(*THIS + VCALL_OFFSET). */
  3086. + emit_move_insn (scratch, gen_rtx_MEM (Pmode,
  3087. + gen_rtx_PLUS (Pmode,
  3088. + scratch,
  3089. + vcall_offset_rtx)));
  3090. - tmp = gen_rtx_PLUS (Pmode, this, delta_rtx);
  3091. - emit_insn (gen_rtx_SET (VOIDmode, this, tmp));
  3092. + /* THIS += *(*THIS + VCALL_OFFSET). */
  3093. + emit_insn (gen_add2_insn (this, scratch));
  3094. + }
  3095. /* Generate a tail call to the target function. */
  3096. if (! TREE_USED (function))
  3097. @@ -8697,4 +8749,18 @@
  3098. no_new_pseudos = 0;
  3099. }
  3100. +/* Return true if sparc_output_mi_thunk would be able to output the
  3101. + assembler code for the thunk function specified by the arguments
  3102. + it is passed, and false otherwise. */
  3103. +static bool
  3104. +sparc_can_output_mi_thunk (thunk_fndecl, delta, vcall_offset, function)
  3105. + tree thunk_fndecl ATTRIBUTE_UNUSED;
  3106. + HOST_WIDE_INT delta ATTRIBUTE_UNUSED;
  3107. + HOST_WIDE_INT vcall_offset;
  3108. + tree function ATTRIBUTE_UNUSED;
  3109. +{
  3110. + /* Bound the loop used in the default method above. */
  3111. + return (vcall_offset >= -32768 || ! fixed_regs[5]);
  3112. +}
  3113. +
  3114. #include "gt-sparc.h"
  3115. Index: gcc/config/sparc/sparc.md
  3116. ===================================================================
  3117. RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.md,v
  3118. retrieving revision 1.181.4.13
  3119. retrieving revision 1.181.4.14
  3120. diff -u -r1.181.4.13 -r1.181.4.14
  3121. --- gcc/gcc/config/sparc/sparc.md 17 Jul 2004 19:49:21 -0000 1.181.4.13
  3122. +++ gcc/gcc/config/sparc/sparc.md 14 Oct 2004 06:54:27 -0000 1.181.4.14
  3123. @@ -2048,7 +2048,6 @@
  3124. if (! CONSTANT_P (operands[1]) || input_operand (operands[1], DImode))
  3125. ;
  3126. else if (TARGET_ARCH64
  3127. - && CONSTANT_P (operands[1])
  3128. && GET_CODE (operands[1]) != HIGH
  3129. && GET_CODE (operands[1]) != LO_SUM)
  3130. {
  3131. Index: gcc/config/vax/vax.c
  3132. ===================================================================
  3133. RCS file: /cvs/gcc/gcc/gcc/config/vax/vax.c,v
  3134. retrieving revision 1.38
  3135. retrieving revision 1.38.4.1
  3136. diff -u -r1.38 -r1.38.4.1
  3137. --- gcc/gcc/config/vax/vax.c 22 Oct 2002 23:05:24 -0000 1.38
  3138. +++ gcc/gcc/config/vax/vax.c 28 Dec 2004 06:29:59 -0000 1.38.4.1
  3139. @@ -462,7 +462,7 @@
  3140. case CONST_INT:
  3141. /* byte offsets cost nothing (on a VAX 2, they cost 1 cycle) */
  3142. if (offset == 0)
  3143. - offset = (unsigned)(INTVAL(addr)+128) > 256;
  3144. + offset = (unsigned HOST_WIDE_INT)(INTVAL(addr)+128) > 256;
  3145. break;
  3146. case CONST:
  3147. case SYMBOL_REF:
  3148. @@ -595,13 +595,13 @@
  3149. fmt = "e"; /* all constant rotate counts are short */
  3150. break;
  3151. case PLUS:
  3152. - /* Check for small negative integer operand: subl2 can be used with
  3153. - a short positive constant instead. */
  3154. - if (GET_CODE (XEXP (x, 1)) == CONST_INT)
  3155. - if ((unsigned)(INTVAL (XEXP (x, 1)) + 63) < 127)
  3156. - fmt = "e";
  3157. case MINUS:
  3158. c = (mode == DFmode) ? 13 : 8; /* 6/8 on VAX 9000, 16/15 on VAX 2 */
  3159. + /* Small integer operands can use subl2 and addl2. */
  3160. + if ((GET_CODE (XEXP (x, 1)) == CONST_INT)
  3161. + && (unsigned HOST_WIDE_INT)(INTVAL (XEXP (x, 1)) + 63) < 127)
  3162. + fmt = "e";
  3163. + break;
  3164. case IOR:
  3165. case XOR:
  3166. c = 3;
  3167. @@ -611,7 +611,7 @@
  3168. c = 3;
  3169. if (GET_CODE (XEXP (x, 0)) == CONST_INT)
  3170. {
  3171. - if ((unsigned)~INTVAL (XEXP (x, 0)) > 63)
  3172. + if ((unsigned HOST_WIDE_INT)~INTVAL (XEXP (x, 0)) > 63)
  3173. c = 4;
  3174. fmt = "e";
  3175. i = 1;
  3176. @@ -665,7 +665,8 @@
  3177. switch (code)
  3178. {
  3179. case CONST_INT:
  3180. - if ((unsigned)INTVAL (op) > 63 && GET_MODE (x) != QImode)
  3181. + if ((unsigned HOST_WIDE_INT)INTVAL (op) > 63
  3182. + && GET_MODE (x) != QImode)
  3183. c += 1; /* 2 on VAX 2 */
  3184. break;
  3185. case CONST:
  3186. Index: gcc/config/vax/vax.h
  3187. ===================================================================
  3188. RCS file: /cvs/gcc/gcc/gcc/config/vax/vax.h,v
  3189. retrieving revision 1.54
  3190. retrieving revision 1.54.4.1
  3191. diff -u -r1.54 -r1.54.4.1
  3192. --- gcc/gcc/config/vax/vax.h 22 Oct 2002 23:05:24 -0000 1.54
  3193. +++ gcc/gcc/config/vax/vax.h 28 Dec 2004 06:28:01 -0000 1.54.4.1
  3194. @@ -800,11 +800,6 @@
  3195. Do not define this if the table should contain absolute addresses. */
  3196. #define CASE_VECTOR_PC_RELATIVE 1
  3197. -/* Define this if the case instruction drops through after the table
  3198. - when the index is out of range. Don't define it if the case insn
  3199. - jumps to the default label instead. */
  3200. -#define CASE_DROPS_THROUGH
  3201. -
  3202. /* Indicate that jump tables go in the text section. This is
  3203. necessary when compiling PIC code. */
  3204. #define JUMP_TABLES_IN_TEXT_SECTION 1
  3205. Index: gcc/config/vax/vax.md
  3206. ===================================================================
  3207. RCS file: /cvs/gcc/gcc/gcc/config/vax/vax.md,v
  3208. retrieving revision 1.23
  3209. retrieving revision 1.23.4.1
  3210. diff -u -r1.23 -r1.23.4.1
  3211. --- gcc/gcc/config/vax/vax.md 1 Oct 2002 20:16:04 -0000 1.23
  3212. +++ gcc/gcc/config/vax/vax.md 28 Dec 2004 06:28:01 -0000 1.23.4.1
  3213. @@ -1969,68 +1969,63 @@
  3214. "jmp (%0)")
  3215. ;; This is here to accept 5 arguments (as passed by expand_end_case)
  3216. -;; and pass the first 4 along to the casesi1 pattern that really does the work.
  3217. +;; and pass the first 4 along to the casesi1 pattern that really does
  3218. +;; the actual casesi work. We emit a jump here to the default label
  3219. +;; _before_ the casesi so that we can be sure that the casesi never
  3220. +;; drops through.
  3221. +;; This is suboptimal perhaps, but so is much of the rest of this
  3222. +;; machine description. For what it's worth, HPPA uses the same trick.
  3223. +;;
  3224. +;; operand 0 is index
  3225. +;; operand 1 is the minimum bound (a const_int)
  3226. +;; operand 2 is the maximum bound - minimum bound + 1 (also a const_int)
  3227. +;; operand 3 is CODE_LABEL for the table;
  3228. +;; operand 4 is the CODE_LABEL to go to if index out of range (ie. default).
  3229. +;;
  3230. +;; We emit:
  3231. +;; i = index - minimum_bound
  3232. +;; if (i > (maximum_bound - minimum_bound + 1) goto default;
  3233. +;; casesi (i, 0, table);
  3234. +;;
  3235. (define_expand "casesi"
  3236. - [(match_operand:SI 0 "general_operand" "") ; index
  3237. - (match_operand:SI 1 "general_operand" "") ; lower
  3238. - (match_operand:SI 2 "general_operand" "") ; upper-lower
  3239. - (match_operand 3 "" "") ; table label
  3240. - (match_operand 4 "" "")] ; default label
  3241. - ""
  3242. -{
  3243. - emit_jump_insn (gen_casesi1 (operands[0], operands[1],
  3244. - operands[2], operands[3]));
  3245. + [(match_operand:SI 0 "general_operand" "")
  3246. + (match_operand:SI 1 "general_operand" "")
  3247. + (match_operand:SI 2 "general_operand" "")
  3248. + (match_operand 3 "" "")
  3249. + (match_operand 4 "" "")]
  3250. + ""
  3251. +{
  3252. + /* i = index - minimum_bound;
  3253. + But only if the lower bound is not already zero. */
  3254. + if (operands[1] != const0_rtx)
  3255. + {
  3256. + rtx index = gen_reg_rtx (SImode);
  3257. + emit_insn (gen_addsi3 (index,
  3258. + operands[0],
  3259. + GEN_INT (-INTVAL (operands[1]))));
  3260. + operands[0] = index;
  3261. + }
  3262. +
  3263. + /* if (i > (maximum_bound - minimum_bound + 1) goto default; */
  3264. + emit_insn (gen_cmpsi (operands[0], operands[2]));
  3265. + emit_jump_insn (gen_bgtu (operands[4]));
  3266. +
  3267. + /* casesi (i, 0, table); */
  3268. + emit_jump_insn (gen_casesi1 (operands[0], operands[2], operands[3]));
  3269. DONE;
  3270. })
  3271. +;; This insn is a bit of a lier. It actually falls through if no case
  3272. +;; matches. But, we prevent that from ever happening by emiting a jump
  3273. +;; before this, see the define_expand above.
  3274. (define_insn "casesi1"
  3275. - [(set (pc)
  3276. - (if_then_else
  3277. - (leu (minus:SI (match_operand:SI 0 "general_operand" "g")
  3278. - (match_operand:SI 1 "general_operand" "g"))
  3279. - (match_operand:SI 2 "general_operand" "g"))
  3280. - (plus:SI (sign_extend:SI
  3281. - (mem:HI (plus:SI (mult:SI (minus:SI (match_dup 0)
  3282. - (match_dup 1))
  3283. - (const_int 2))
  3284. - (pc))))
  3285. - (label_ref:SI (match_operand 3 "" "")))
  3286. - (pc)))]
  3287. - ""
  3288. - "casel %0,%1,%2")
  3289. -
  3290. -;; This can arise by simplification when operand 1 is a constant int.
  3291. -(define_insn ""
  3292. - [(set (pc)
  3293. - (if_then_else
  3294. - (leu (plus:SI (match_operand:SI 0 "general_operand" "g")
  3295. - (match_operand:SI 1 "const_int_operand" "n"))
  3296. - (match_operand:SI 2 "general_operand" "g"))
  3297. - (plus:SI (sign_extend:SI
  3298. - (mem:HI (plus:SI (mult:SI (plus:SI (match_dup 0)
  3299. - (match_dup 1))
  3300. - (const_int 2))
  3301. - (pc))))
  3302. - (label_ref:SI (match_operand 3 "" "")))
  3303. - (pc)))]
  3304. - ""
  3305. - "*
  3306. -{
  3307. - operands[1] = GEN_INT (-INTVAL (operands[1]));
  3308. - return \"casel %0,%1,%2\";
  3309. -}")
  3310. -
  3311. -;; This can arise by simplification when the base for the case insn is zero.
  3312. -(define_insn ""
  3313. - [(set (pc)
  3314. - (if_then_else (leu (match_operand:SI 0 "general_operand" "g")
  3315. - (match_operand:SI 1 "general_operand" "g"))
  3316. - (plus:SI (sign_extend:SI
  3317. - (mem:HI (plus:SI (mult:SI (match_dup 0)
  3318. - (const_int 2))
  3319. - (pc))))
  3320. - (label_ref:SI (match_operand 2 "" "")))
  3321. - (pc)))]
  3322. + [(match_operand:SI 1 "const_int_operand" "n")
  3323. + (set (pc)
  3324. + (plus:SI (sign_extend:SI
  3325. + (mem:HI (plus:SI (mult:SI (match_operand:SI 0 "general_operand" "g")
  3326. + (const_int 2))
  3327. + (pc))))
  3328. + (label_ref:SI (match_operand 2 "" ""))))]
  3329. ""
  3330. "casel %0,$0,%1")
  3331. Index: gcc/cp/ChangeLog
  3332. ===================================================================
  3333. RCS file: /cvs/gcc/gcc/gcc/cp/ChangeLog,v
  3334. retrieving revision 1.3076.2.277
  3335. retrieving revision 1.3076.2.281
  3336. diff -u -r1.3076.2.277 -r1.3076.2.281
  3337. --- gcc/gcc/cp/ChangeLog 30 Sep 2004 16:44:00 -0000 1.3076.2.277
  3338. +++ gcc/gcc/cp/ChangeLog 18 Dec 2004 20:26:04 -0000 1.3076.2.281
  3339. @@ -1,3 +1,25 @@
  3340. +2004-12-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
  3341. +
  3342. + PR c++/17456
  3343. + * cvt.c (convert_to_void): Set expr to void_zero_node after
  3344. + overload failure.
  3345. +
  3346. +2004-12-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
  3347. +
  3348. + PR c++/16806
  3349. + * error.c (dump_expr) [BASELINK]: Use dump_expr.
  3350. +
  3351. +2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
  3352. +
  3353. + PR c++/17868
  3354. + * error.c (dump_expr): Add missing case for RDIV_EXPR.
  3355. +
  3356. +2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
  3357. +
  3358. + PR c++/16681
  3359. + * init.c (build_zero_init): Build a RANGE_EXPR for an array
  3360. + initializer.
  3361. +
  3362. 2004-09-30 Release Manager
  3363. * GCC 3.3.5 Released.
  3364. Index: gcc/cp/cvt.c
  3365. ===================================================================
  3366. RCS file: /cvs/gcc/gcc/gcc/cp/cvt.c,v
  3367. retrieving revision 1.126.2.4
  3368. retrieving revision 1.126.2.5
  3369. diff -u -r1.126.2.4 -r1.126.2.5
  3370. --- gcc/gcc/cp/cvt.c 23 Feb 2004 12:50:50 -0000 1.126.2.4
  3371. +++ gcc/gcc/cp/cvt.c 18 Dec 2004 20:26:10 -0000 1.126.2.5
  3372. @@ -903,6 +903,7 @@
  3373. of an overloaded function, and this is not one of them. */
  3374. pedwarn ("%s cannot resolve address of overloaded function",
  3375. implicit ? implicit : "void cast");
  3376. + expr = void_zero_node;
  3377. }
  3378. else if (implicit && probe == expr && is_overloaded_fn (probe))
  3379. /* Only warn when there is no &. */
  3380. Index: gcc/cp/error.c
  3381. ===================================================================
  3382. RCS file: /cvs/gcc/gcc/gcc/cp/error.c,v
  3383. retrieving revision 1.192.2.9
  3384. retrieving revision 1.192.2.11
  3385. diff -u -r1.192.2.9 -r1.192.2.11
  3386. --- gcc/gcc/cp/error.c 24 Jul 2004 13:03:23 -0000 1.192.2.9
  3387. +++ gcc/gcc/cp/error.c 15 Dec 2004 16:45:23 -0000 1.192.2.11
  3388. @@ -1724,6 +1724,7 @@
  3389. case CEIL_DIV_EXPR:
  3390. case FLOOR_DIV_EXPR:
  3391. case ROUND_DIV_EXPR:
  3392. + case RDIV_EXPR:
  3393. dump_binary_op ("/", t, flags);
  3394. break;
  3395. @@ -2070,7 +2071,7 @@
  3396. break;
  3397. case BASELINK:
  3398. - print_tree_identifier (scratch_buffer, DECL_NAME (get_first_fn (t)));
  3399. + dump_expr (get_first_fn (t), flags & ~TFF_EXPR_IN_PARENS);
  3400. break;
  3401. case TREE_LIST:
  3402. Index: gcc/cp/init.c
  3403. ===================================================================
  3404. RCS file: /cvs/gcc/gcc/gcc/cp/init.c,v
  3405. retrieving revision 1.299.2.18
  3406. retrieving revision 1.299.2.19
  3407. diff -u -r1.299.2.18 -r1.299.2.19
  3408. --- gcc/gcc/cp/init.c 28 Jul 2004 02:17:28 -0000 1.299.2.18
  3409. +++ gcc/gcc/cp/init.c 9 Dec 2004 15:09:19 -0000 1.299.2.19
  3410. @@ -235,7 +235,6 @@
  3411. }
  3412. else if (TREE_CODE (type) == ARRAY_TYPE)
  3413. {
  3414. - tree index;
  3415. tree max_index;
  3416. tree inits;
  3417. @@ -249,15 +248,17 @@
  3418. /* A zero-sized array, which is accepted as an extension, will
  3419. have an upper bound of -1. */
  3420. if (!tree_int_cst_equal (max_index, integer_minus_one_node))
  3421. - for (index = size_zero_node;
  3422. - !tree_int_cst_lt (max_index, index);
  3423. - index = size_binop (PLUS_EXPR, index, size_one_node))
  3424. - inits = tree_cons (index,
  3425. - build_zero_init (TREE_TYPE (type),
  3426. - /*nelts=*/NULL_TREE,
  3427. - static_storage_p),
  3428. - inits);
  3429. - CONSTRUCTOR_ELTS (init) = nreverse (inits);
  3430. + {
  3431. + tree elt_init = build_zero_init (TREE_TYPE (type),
  3432. + /*nelts=*/NULL_TREE,
  3433. + static_storage_p);
  3434. + tree range = build (RANGE_EXPR,
  3435. + sizetype, size_zero_node, max_index);
  3436. +
  3437. + inits = tree_cons (range, elt_init, inits);
  3438. + }
  3439. +
  3440. + CONSTRUCTOR_ELTS (init) = nreverse (inits);
  3441. }
  3442. else if (TREE_CODE (type) == REFERENCE_TYPE)
  3443. ;
  3444. Index: gcc/doc/install.texi
  3445. ===================================================================
  3446. RCS file: /cvs/gcc/gcc/gcc/doc/install.texi,v
  3447. retrieving revision 1.151.2.53
  3448. retrieving revision 1.151.2.56
  3449. diff -u -r1.151.2.53 -r1.151.2.56
  3450. --- gcc/gcc/doc/install.texi 8 May 2004 17:37:31 -0000 1.151.2.53
  3451. +++ gcc/gcc/doc/install.texi 14 Oct 2004 12:31:38 -0000 1.151.2.56
  3452. @@ -3098,8 +3098,19 @@
  3453. @file{/usr/bin} before @file{/usr/xpg4/bin} for the duration of the build.
  3454. All releases of GNU binutils prior to 2.11.2 have known bugs on this
  3455. -platform. We recommend the use of GNU binutils 2.11.2 or the vendor
  3456. -tools (Sun @command{as}, Sun @command{ld}).
  3457. +platform. We recommend the use of GNU binutils 2.11.2 or later, or the
  3458. +vendor tools (Sun @command{as}, Sun @command{ld}). Note that your mileage
  3459. +may vary if you use a combination of the GNU tools and the Sun tools: while
  3460. +the combination GNU @command{as} + Sun @command{ld} should reasonably work,
  3461. +the reverse combination Sun @command{as} + GNU @command{ld} is known to
  3462. +cause memory corruption at runtime in some cases for C++ programs.
  3463. +
  3464. +The stock GNU binutils 2.15 release is broken on this platform because of a
  3465. +single bug. It has been fixed on the 2.15 branch in the CVS repository.
  3466. +You can obtain a working version by checking out the binutils-2_15-branch
  3467. +from the CVS repository or applying the patch
  3468. +@uref{http://sources.redhat.com/ml/binutils-cvs/2004-09/msg00036.html} to the
  3469. +release.
  3470. Sun bug 4296832 turns up when compiling X11 headers with GCC 2.95 or
  3471. newer: @command{g++} will complain that types are missing. These headers assume
  3472. @@ -3115,6 +3126,17 @@
  3473. 108377-20 for Intel), and Solaris 8 (108652-24 or newer for SPARC,
  3474. 108653-22 for Intel) that fix this bug.
  3475. +Sun bug 4927647 sometimes causes random spurious testsuite failures
  3476. +related to missing diagnostic output. This bug doesn't affect GCC
  3477. +itself, rather it is a kernel bug triggered by the @command{expect}
  3478. +program which is used only by the GCC testsuite driver. When the bug
  3479. +causes the @command{expect} program to miss anticipated output, extra
  3480. +testsuite failures appear.
  3481. +
  3482. +There are patches for Solaris 8 (117350-12 or newer for SPARC,
  3483. +117351-12 or newer for Intel) and Solaris 9 (117171-11 or newer for
  3484. +SPARC, 117172-11 or newer for Intel) that address this problem.
  3485. +
  3486. @html
  3487. <hr />
  3488. @end html
  3489. Index: gcc/doc/tm.texi
  3490. ===================================================================
  3491. RCS file: /cvs/gcc/gcc/gcc/doc/tm.texi,v
  3492. retrieving revision 1.182.2.8
  3493. retrieving revision 1.182.2.9
  3494. diff -u -r1.182.2.8 -r1.182.2.9
  3495. --- gcc/gcc/doc/tm.texi 5 Mar 2004 17:55:57 -0000 1.182.2.8
  3496. +++ gcc/gcc/doc/tm.texi 14 Oct 2004 06:54:32 -0000 1.182.2.9
  3497. @@ -4160,7 +4160,7 @@
  3498. @end table
  3499. @findex TARGET_ASM_OUTPUT_MI_THUNK
  3500. -@deftypefn {Target Hook} void TARGET_ASM_OUTPUT_MI_THUNK (FILE *@var{file}, tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, tree @var{function})
  3501. +@deftypefn {Target Hook} void TARGET_ASM_OUTPUT_MI_THUNK (FILE *@var{file}, tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, HOST_WIDE_INT @var{vcall_offset}, tree @var{function})
  3502. A function that outputs the assembler code for a thunk
  3503. function, used to implement C++ virtual function calls with multiple
  3504. inheritance. The thunk acts as a wrapper around a virtual function,
  3505. @@ -4174,7 +4174,15 @@
  3506. e.g.@: @samp{%o0} on a sparc. The addition must preserve the values of
  3507. all other incoming arguments.
  3508. -After the addition, emit code to jump to @var{function}, which is a
  3509. +Then, if @var{vcall_offset} is nonzero, an additional adjustment should be
  3510. +made after adding @code{delta}. In particular, if @var{p} is the
  3511. +adjusted pointer, the following adjustment should be made:
  3512. +
  3513. +@smallexample
  3514. +p += (*((ptrdiff_t **)p))[vcall_offset/sizeof(ptrdiff_t)]
  3515. +@end smallexample
  3516. +
  3517. +After the additions, emit code to jump to @var{function}, which is a
  3518. @code{FUNCTION_DECL}. This is a direct pure jump, not a call, and does
  3519. not touch the return address. Hence returning from @var{FUNCTION} will
  3520. return to whoever called the current @samp{thunk}.
  3521. @@ -4194,21 +4202,13 @@
  3522. not support varargs.
  3523. @end deftypefn
  3524. -@findex TARGET_ASM_OUTPUT_MI_VCALL_THUNK
  3525. -@deftypefn {Target Hook} void TARGET_ASM_OUTPUT_MI_VCALL_THUNK (FILE *@var{file}, tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, int @var{vcall_offset}, tree @var{function})
  3526. -A function like @code{TARGET_ASM_OUTPUT_MI_THUNK}, except that if
  3527. -@var{vcall_offset} is nonzero, an additional adjustment should be made
  3528. -after adding @code{delta}. In particular, if @var{p} is the
  3529. -adjusted pointer, the following adjustment should be made:
  3530. -
  3531. -@example
  3532. -p += (*((ptrdiff_t **)p))[vcall_offset/sizeof(ptrdiff_t)]
  3533. -@end example
  3534. -
  3535. -@noindent
  3536. -If this function is defined, it will always be used in place of
  3537. -@code{TARGET_ASM_OUTPUT_MI_THUNK}.
  3538. -
  3539. +@findex TARGET_ASM_CAN_OUTPUT_MI_THUNK
  3540. +@deftypefn {Target Hook} bool TARGET_ASM_CAN_OUTPUT_MI_THUNK (tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, HOST_WIDE_INT @var{vcall_offset}, tree @var{function})
  3541. +A function that returns true if TARGET_ASM_OUTPUT_MI_THUNK would be able
  3542. +to output the assembler code for the thunk function specified by the
  3543. +arguments it is passed, and false otherwise. In the latter case, the
  3544. +generic approach will be used by the C++ front end, with the limitations
  3545. +previously exposed.
  3546. @end deftypefn
  3547. @node Profiling
  3548. Index: gcc/testsuite/ChangeLog
  3549. ===================================================================
  3550. RCS file: /cvs/gcc/gcc/gcc/testsuite/ChangeLog,v
  3551. retrieving revision 1.2261.2.384
  3552. retrieving revision 1.2261.2.398
  3553. diff -u -r1.2261.2.384 -r1.2261.2.398
  3554. --- gcc/gcc/testsuite/ChangeLog 30 Sep 2004 16:45:41 -0000 1.2261.2.384
  3555. +++ gcc/gcc/testsuite/ChangeLog 23 Jan 2005 05:16:05 -0000 1.2261.2.398
  3556. @@ -1,3 +1,78 @@
  3557. +2005-01-22 Roger Sayle <roger@eyesopen.com>
  3558. +
  3559. + PR target/18402
  3560. + Backport from mainline
  3561. + 2003-02-05 Jakub Jelinek <jakub@redhat.com>
  3562. +
  3563. + PR optimization/8555
  3564. + * gcc.dg/20030204-1.c: New test.
  3565. +
  3566. +2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  3567. +
  3568. + PR c++/17115
  3569. + * g++.dg/warn/Winline-4.C: New test.
  3570. +
  3571. +2005-01-18 Eric Botcazou <ebotcazou@libertysurf.fr>
  3572. +
  3573. + * gcc.dg/short-compare-1.c: New test.
  3574. + * gcc.dg/short-compare-2.c: Likewise.
  3575. +
  3576. +2005-01-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  3577. +
  3578. + Backport:
  3579. + 2003-10-13 Geoffrey Keating <geoffk@apple.com>
  3580. +
  3581. + * gcc.dg/asm-names.c: Use scan-assembler-not rather
  3582. + than linker trickery.
  3583. +
  3584. +2005-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  3585. +
  3586. + * gcc.c-torture/execute/20020720-1.x: XFAIL for x86 when using
  3587. + -fpic or -fPIC.
  3588. +
  3589. +2004-12-21 Joseph S. Myers <jsm@polyomino.org.uk>
  3590. +
  3591. + PR c/14765
  3592. + * gcc.dg/pr14765-1.c: New test.
  3593. +
  3594. +2004-12-20 Andrew Pinski <pinskia@physics.uc.edu>
  3595. +
  3596. + PR other/19093
  3597. + * g++.dg/opt/max1.C: Fix for 64bit targets.
  3598. +
  3599. +2004-12-19 Roger Sayle <roger@eyesopen.com>
  3600. +
  3601. + PR middle-end/19068
  3602. + * g++.dg/opt/max1.C: New test case.
  3603. +
  3604. +2004-12-16 Wolfgang Bangerth <bangerth@dealii.com>
  3605. +
  3606. + * g++.dg/other/complex1.C: New test.
  3607. +
  3608. +2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
  3609. +
  3610. + PR rtl-optimization/16536
  3611. + * gcc.c-torture/execute/restrict-1.c: New test.
  3612. +
  3613. +2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
  3614. +
  3615. + PR c++/16681
  3616. + * g++.dg/init/array15.C: New.
  3617. + * g++.dg/init/array16.C: New.
  3618. +
  3619. +2004-11-29 Roger Sayle <roger@eyesopen.com>
  3620. +
  3621. + PR rtl-optimization/9771
  3622. + * gcc.dg/pr9771-1.c: New test case.
  3623. +
  3624. +2004-11-27 Falk Hueffner <falk@debian.org>
  3625. +
  3626. + * gcc.dg/loop-6.c: New test.
  3627. +
  3628. +2004-10-13 Eric Botcazou <ebotcazou@libertysurf.fr>
  3629. +
  3630. + * g++.dg/inherit/thunk1.C: Run on the SPARC.
  3631. +
  3632. 2004-09-30 Release Manager
  3633. * GCC 3.3.5 Released.
  3634. Index: gcc/testsuite/g++.dg/inherit/thunk1.C
  3635. ===================================================================
  3636. RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.dg/inherit/thunk1.C,v
  3637. retrieving revision 1.5
  3638. retrieving revision 1.5.12.1
  3639. diff -u -r1.5 -r1.5.12.1
  3640. --- gcc/gcc/testsuite/g++.dg/inherit/thunk1.C 24 Oct 2002 09:16:36 -0000 1.5
  3641. +++ gcc/gcc/testsuite/g++.dg/inherit/thunk1.C 14 Oct 2004 06:54:49 -0000 1.5.12.1
  3642. @@ -1,4 +1,4 @@
  3643. -// { dg-do run { target i?86-*-* x86_64-*-* s390*-*-* alpha*-*-* ia64-*-* } }
  3644. +// { dg-do run { target i?86-*-* x86_64-*-* s390*-*-* alpha*-*-* ia64-*-* sparc*-*-* } }
  3645. #include <stdarg.h>
  3646. Index: gcc/testsuite/g++.dg/init/array15.C
  3647. ===================================================================
  3648. RCS file: gcc/testsuite/g++.dg/init/array15.C
  3649. diff -N gcc/testsuite/g++.dg/init/array15.C
  3650. --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
  3651. +++ gcc/gcc/testsuite/g++.dg/init/array15.C 9 Dec 2004 15:09:32 -0000 1.1.6.1
  3652. @@ -0,0 +1,46 @@
  3653. +// { dg-do run }
  3654. +
  3655. +// Copyright (C) 2004 Free Software Foundation, Inc.
  3656. +// Contributed by Nathan Sidwell 8 Dec 2004 <nathan@codesourcery.com>
  3657. +
  3658. +// PR 16681 too much memory used
  3659. +// Origin: Matt LaFary <lafary@activmedia.com>
  3660. +
  3661. +struct foo {
  3662. + unsigned char buffer[4111222];
  3663. + foo() ;
  3664. + bool check () const;
  3665. +};
  3666. +
  3667. +foo::foo ()
  3668. + : buffer()
  3669. +{}
  3670. +
  3671. +bool foo::check () const
  3672. +{
  3673. + for (unsigned ix = sizeof (buffer); ix--;)
  3674. + if (buffer[ix])
  3675. + return false;
  3676. + return true;
  3677. +}
  3678. +
  3679. +void *operator new (__SIZE_TYPE__ size, void *p)
  3680. +{
  3681. + return p;
  3682. +}
  3683. +
  3684. +char heap[5000000];
  3685. +
  3686. +int main ()
  3687. +{
  3688. + for (unsigned ix = sizeof (heap); ix--;)
  3689. + heap[ix] = ix;
  3690. +
  3691. + foo *f = new (heap) foo ();
  3692. +
  3693. + if (!f->check ())
  3694. + return 1;
  3695. + return 0;
  3696. +}
  3697. +
  3698. +
  3699. Index: gcc/testsuite/g++.dg/init/array16.C
  3700. ===================================================================
  3701. RCS file: gcc/testsuite/g++.dg/init/array16.C
  3702. diff -N gcc/testsuite/g++.dg/init/array16.C
  3703. --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
  3704. +++ gcc/gcc/testsuite/g++.dg/init/array16.C 9 Dec 2004 15:09:32 -0000 1.1.6.1
  3705. @@ -0,0 +1,106 @@
  3706. +// { dg-do run }
  3707. +
  3708. +// Copyright (C) 2004 Free Software Foundation, Inc.
  3709. +// Contributed by Nathan Sidwell 8 Dec 2004 <nathan@codesourcery.com>
  3710. +
  3711. +// PR 16681 too much memory used
  3712. +// Origin: Matt LaFary <lafary@activmedia.com>
  3713. +
  3714. +
  3715. +struct elt
  3716. +{
  3717. + static int count;
  3718. + static elt*ptr;
  3719. + static int abort;
  3720. + char c;
  3721. +
  3722. + elt ();
  3723. + ~elt ();
  3724. +
  3725. +};
  3726. +
  3727. +int elt::count;
  3728. +elt *elt::ptr;
  3729. +int elt::abort;
  3730. +
  3731. +elt::elt ()
  3732. + :c ()
  3733. +{
  3734. + if (count >= 0)
  3735. + {
  3736. + if (!ptr)
  3737. + ptr = this;
  3738. + if (count == 100)
  3739. + throw 2;
  3740. + if (this != ptr)
  3741. + abort = 1;
  3742. + count++;
  3743. + ptr++;
  3744. + }
  3745. +}
  3746. +
  3747. +elt::~elt ()
  3748. +{
  3749. + if (count >= 0)
  3750. + {
  3751. + ptr--;
  3752. + count--;
  3753. + if (ptr != this)
  3754. + abort = 2;
  3755. + }
  3756. +}
  3757. +
  3758. +struct foo {
  3759. + elt buffer[4111222];
  3760. + foo() ;
  3761. + bool check () const;
  3762. +};
  3763. +
  3764. +foo::foo ()
  3765. + : buffer()
  3766. +{}
  3767. +
  3768. +bool foo::check () const
  3769. +{
  3770. + for (unsigned ix = sizeof (buffer)/ sizeof (buffer[0]); ix--;)
  3771. + if (buffer[ix].c)
  3772. + return false;
  3773. + return true;
  3774. +}
  3775. +
  3776. +void *operator new (__SIZE_TYPE__ size, void *p)
  3777. +{
  3778. + return p;
  3779. +}
  3780. +
  3781. +char heap[5000000];
  3782. +
  3783. +int main ()
  3784. +{
  3785. + for (unsigned ix = sizeof (heap); ix--;)
  3786. + heap[ix] = ix;
  3787. +
  3788. + try
  3789. + {
  3790. + foo *f = new (heap) foo ();
  3791. + return 1;
  3792. + }
  3793. + catch (...)
  3794. + {
  3795. + if (elt::count)
  3796. + return 2;
  3797. + if (elt::abort)
  3798. + return elt::abort + 3;
  3799. + }
  3800. +
  3801. + for (unsigned ix = sizeof (heap); ix--;)
  3802. + heap[ix] = ix;
  3803. +
  3804. + elt::count = -1;
  3805. + foo *f = new (heap) foo ();
  3806. + if (!f->check ())
  3807. + return 3;
  3808. + return 0;
  3809. +}
  3810. +
  3811. +
  3812. Index: gcc/testsuite/g++.dg/opt/max1.C
  3813. ===================================================================
  3814. RCS file: gcc/testsuite/g++.dg/opt/max1.C
  3815. diff -N gcc/testsuite/g++.dg/opt/max1.C
  3816. --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
  3817. +++ gcc/gcc/testsuite/g++.dg/opt/max1.C 20 Dec 2004 21:12:34 -0000 1.2.2.2
  3818. @@ -0,0 +1,29 @@
  3819. +/* PR middle-end/19068 */
  3820. +/* Test case by Andrew Pinski <pinskia@physics.uc.edu> */
  3821. +/* { dg-do run } */
  3822. +/* { dg-options "-O2" } */
  3823. +
  3824. +extern "C" void abort (void);
  3825. +
  3826. +long fff[10];
  3827. +
  3828. +void f(long a)
  3829. +{
  3830. + int i;
  3831. + a = *((long*)(a+1+sizeof(long))) >? *((long*)(a+1));
  3832. +
  3833. + for(i=0;i<10;i++)
  3834. + fff[i] = a;
  3835. +}
  3836. +
  3837. +int main(void)
  3838. +{
  3839. + int i;
  3840. + long a[2] = {10,5};
  3841. + f((long)(&a)-1);
  3842. + for(i = 0;i<10;i++)
  3843. + if (fff[i]!=10)
  3844. + abort ();
  3845. + return 0;
  3846. +}
  3847. +
  3848. Index: gcc/testsuite/g++.dg/other/complex1.C
  3849. ===================================================================
  3850. RCS file: gcc/testsuite/g++.dg/other/complex1.C
  3851. diff -N gcc/testsuite/g++.dg/other/complex1.C
  3852. --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
  3853. +++ gcc/gcc/testsuite/g++.dg/other/complex1.C 16 Dec 2004 14:04:52 -0000 1.1.4.1
  3854. @@ -0,0 +1,28 @@
  3855. +// PR middle-end/18882
  3856. +// Origin: Petr Mikulik <mikulik@physics.muni.cz>
  3857. +// Testcase by Wolfgang Bangerth <bangerth@dealii.com>
  3858. +
  3859. +// { dg-do run }
  3860. +// { dg-options "" }
  3861. +
  3862. +extern "C" void abort ();
  3863. +
  3864. +struct C {
  3865. + __complex__ long double c;
  3866. +};
  3867. +
  3868. +void foo()
  3869. +{
  3870. + C x = {2+2i};
  3871. +
  3872. + int n = 1;
  3873. + C y = (n==1) ? x : (C){3+3i};
  3874. + if (__imag__ y.c != 2)
  3875. + abort ();
  3876. +}
  3877. +
  3878. +int main(void)
  3879. +{
  3880. + foo ();
  3881. + return 0;
  3882. +}
  3883. Index: gcc/testsuite/g++.dg/warn/Winline-4.C
  3884. ===================================================================
  3885. RCS file: gcc/testsuite/g++.dg/warn/Winline-4.C
  3886. diff -N gcc/testsuite/g++.dg/warn/Winline-4.C
  3887. --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
  3888. +++ gcc/gcc/testsuite/g++.dg/warn/Winline-4.C 21 Jan 2005 10:02:30 -0000 1.1.42.1
  3889. @@ -0,0 +1,17 @@
  3890. +// { dg-do compile }
  3891. +// { dg-options "-O2 -Winline" }
  3892. +// Origin: <markus at oberhumer dot com>
  3893. +// PR 17115: We should not emit -Winline warning for functions marked with
  3894. +// noinline
  3895. +
  3896. +struct Foo {
  3897. + __attribute__((noinline)) int a(int r) { return r & 1; }
  3898. + virtual __attribute__((noinline)) int b(int r) { return r & 1; }
  3899. + static __attribute__((noinline)) int c(int r) { return r & 1; }
  3900. +};
  3901. +
  3902. +int bar(int r) {
  3903. + Foo f;
  3904. + int k = 1; k &= f.a(r); k &= f.b(r); k &= f.a(r);
  3905. + return k;
  3906. +}
  3907. Index: gcc/testsuite/gcc.c-torture/execute/20020720-1.x
  3908. ===================================================================
  3909. RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/20020720-1.x,v
  3910. retrieving revision 1.8.6.2
  3911. retrieving revision 1.8.6.3
  3912. diff -u -r1.8.6.2 -r1.8.6.3
  3913. --- gcc/gcc/testsuite/gcc.c-torture/execute/20020720-1.x 8 Mar 2003 14:34:06 -0000 1.8.6.2
  3914. +++ gcc/gcc/testsuite/gcc.c-torture/execute/20020720-1.x 3 Jan 2005 01:43:45 -0000 1.8.6.3
  3915. @@ -11,6 +11,19 @@
  3916. # and can make the optimization.
  3917. # Don't XFAIL at -O0, that should never fail.
  3918. +if { [istarget "i?86-*-*"] } {
  3919. + set torture_eval_before_compile {
  3920. + global compiler_conditional_xfail_data
  3921. + set compiler_conditional_xfail_data {
  3922. + "PR opt/10348" \
  3923. + { "*-*-*" } \
  3924. + { "-fpic" "-fPIC" } \
  3925. + { "-O0" }
  3926. + }
  3927. + }
  3928. + return 0
  3929. +}
  3930. +
  3931. set torture_eval_before_compile {
  3932. global compiler_conditional_xfail_data
  3933. set compiler_conditional_xfail_data {
  3934. Index: gcc/testsuite/gcc.c-torture/execute/restrict-1.c
  3935. ===================================================================
  3936. RCS file: gcc/testsuite/gcc.c-torture/execute/restrict-1.c
  3937. diff -N gcc/testsuite/gcc.c-torture/execute/restrict-1.c
  3938. --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
  3939. +++ gcc/gcc/testsuite/gcc.c-torture/execute/restrict-1.c 10 Dec 2004 17:25:07 -0000 1.2.44.1
  3940. @@ -0,0 +1,30 @@
  3941. +/* PR rtl-optimization/16536
  3942. + Origin: Jeremy Denise <jeremy.denise@libertysurf.fr>
  3943. + Reduced: Wolfgang Bangerth <bangerth@dealii.org>
  3944. + Volker Reichelt <reichelt@igpm.rwth-aachen.de> */
  3945. +
  3946. +extern void abort ();
  3947. +
  3948. +typedef struct
  3949. +{
  3950. + int i, dummy;
  3951. +} A;
  3952. +
  3953. +inline A foo (const A* p, const A* q)
  3954. +{
  3955. + return (A){p->i+q->i};
  3956. +}
  3957. +
  3958. +void bar (A* __restrict__ p)
  3959. +{
  3960. + *p=foo(p,p);
  3961. + if (p->i!=2)
  3962. + abort();
  3963. +}
  3964. +
  3965. +int main ()
  3966. +{
  3967. + A a={1};
  3968. + bar(&a);
  3969. + return 0;
  3970. +}
  3971. Index: gcc/testsuite/gcc.dg/20030204-1.c
  3972. ===================================================================
  3973. RCS file: gcc/testsuite/gcc.dg/20030204-1.c
  3974. diff -N gcc/testsuite/gcc.dg/20030204-1.c
  3975. --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
  3976. +++ gcc/gcc/testsuite/gcc.dg/20030204-1.c 23 Jan 2005 05:16:14 -0000 1.3.6.1
  3977. @@ -0,0 +1,16 @@
  3978. +/* PR optimization/8555 */
  3979. +/* { dg-do compile } */
  3980. +/* { dg-options "-O -ffast-math -funroll-loops" } */
  3981. +/* { dg-options "-march=pentium3 -O -ffast-math -funroll-loops" { target i?86-*-* } } */
  3982. +
  3983. +float foo (float *a, int i)
  3984. +{
  3985. + int j;
  3986. + float x = a[j = i - 1], y;
  3987. +
  3988. + for (j = i; --j >= 0; )
  3989. + if ((y = a[j]) > x)
  3990. + x = y;
  3991. +
  3992. + return x;
  3993. +}
  3994. Index: gcc/testsuite/gcc.dg/asm-names.c
  3995. ===================================================================
  3996. RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/asm-names.c,v
  3997. retrieving revision 1.2
  3998. retrieving revision 1.2.44.1
  3999. diff -u -r1.2 -r1.2.44.1
  4000. --- gcc/gcc/testsuite/gcc.dg/asm-names.c 27 Aug 2001 19:23:11 -0000 1.2
  4001. +++ gcc/gcc/testsuite/gcc.dg/asm-names.c 4 Jan 2005 00:20:35 -0000 1.2.44.1
  4002. @@ -2,26 +2,15 @@
  4003. to have an underscore prefixed, even if normal symbols are.
  4004. Problem reported by Krister Walfridsson <cato@df.lth.se>. */
  4005. -/* { dg-do link } */
  4006. +/* { dg-do compile } */
  4007. /* { dg-options "-fleading-underscore" } */
  4008. +/* { dg-final { scan-assembler-not "____frob14" } } */
  4009. extern void frobnicate (void) asm ("___frob14"); /* three underscores */
  4010. -void __frob14 (void) {} /* two underscores */
  4011. -
  4012. int
  4013. main (void)
  4014. {
  4015. frobnicate ();
  4016. return 0;
  4017. }
  4018. -
  4019. -/* In case built where the runtime expects no leading underscore on
  4020. - main(). */
  4021. -extern int xmain (void) asm ("main");
  4022. -
  4023. -int xmain (void) { return main(); }
  4024. -
  4025. -/* In case built where the runtime calls __main. */
  4026. -extern int ymain (void) asm ("___main");
  4027. -int ymain (void) { return main(); }
  4028. Index: gcc/testsuite/gcc.dg/loop-6.c
  4029. ===================================================================
  4030. RCS file: gcc/testsuite/gcc.dg/loop-6.c
  4031. diff -N gcc/testsuite/gcc.dg/loop-6.c
  4032. --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
  4033. +++ gcc/gcc/testsuite/gcc.dg/loop-6.c 27 Nov 2004 16:59:16 -0000 1.1.4.1
  4034. @@ -0,0 +1,25 @@
  4035. +/* PR optimization/18577 */
  4036. +/* Origin: Falk Hueffner <falk@debian.org> */
  4037. +
  4038. +/* { dg-do run } */
  4039. +/* { dg-options "-O2 -funroll-all-loops" } */
  4040. +
  4041. +static float tfcos12[3];
  4042. +__attribute__((noinline)) double f(double x) { return x; }
  4043. +int g;
  4044. +
  4045. +int main(void)
  4046. +{
  4047. + int i, j;
  4048. + for (i = 0; i < 1; i++)
  4049. + tfcos12[i] = 0.5;
  4050. +
  4051. + for (i = 0; i < 1; i++)
  4052. + {
  4053. + tfcos12[i] = 0.5 * f(i);
  4054. + for (j = 0; j < 12; j++)
  4055. + g++;
  4056. + }
  4057. +
  4058. + return 0;
  4059. +}
  4060. Index: gcc/testsuite/gcc.dg/pr14765-1.c
  4061. ===================================================================
  4062. RCS file: gcc/testsuite/gcc.dg/pr14765-1.c
  4063. diff -N gcc/testsuite/gcc.dg/pr14765-1.c
  4064. --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
  4065. +++ gcc/gcc/testsuite/gcc.dg/pr14765-1.c 21 Dec 2004 21:51:29 -0000 1.1.48.1
  4066. @@ -0,0 +1,11 @@
  4067. +/* Empty statement expressions should get void type. Bug 14765 from
  4068. + Serge Belyshev <belyshev@lubercy.com>. */
  4069. +/* { dg-do compile } */
  4070. +/* { dg-options "" } */
  4071. +
  4072. +int a;
  4073. +void fun ()
  4074. +{
  4075. + a = 0;
  4076. + a = ({}); /* { dg-error "not ignored" "void stmt expr" } */
  4077. +}
  4078. Index: gcc/testsuite/gcc.dg/pr9771-1.c
  4079. ===================================================================
  4080. RCS file: gcc/testsuite/gcc.dg/pr9771-1.c
  4081. diff -N gcc/testsuite/gcc.dg/pr9771-1.c
  4082. --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
  4083. +++ gcc/gcc/testsuite/gcc.dg/pr9771-1.c 30 Nov 2004 04:34:21 -0000 1.1.44.1
  4084. @@ -0,0 +1,43 @@
  4085. +/* PR rtl-optimization/9771 */
  4086. +/* { dg-do run { target i?86-*-* } } */
  4087. +/* { dg-options "-O2 -fomit-frame-pointer -ffixed-ebp" } */
  4088. +
  4089. +extern void abort(void);
  4090. +extern void exit(int);
  4091. +
  4092. +register long *B asm ("ebp");
  4093. +
  4094. +long x = 10;
  4095. +long y = 20;
  4096. +
  4097. +void bar(void)
  4098. +{
  4099. + B = &y;
  4100. +}
  4101. +
  4102. +void foo()
  4103. +{
  4104. + long *adr = B;
  4105. + long save = *adr;
  4106. +
  4107. + *adr = 123;
  4108. +
  4109. + bar();
  4110. +
  4111. + *adr = save;
  4112. +}
  4113. +
  4114. +int main()
  4115. +{
  4116. + B = &x;
  4117. +
  4118. + foo();
  4119. +
  4120. + if (x != 10 || y != 20)
  4121. + abort();
  4122. +
  4123. + /* We can't return, as our caller may assume %ebp is preserved! */
  4124. + /* We could save/restore it (like foo), but its easier to exit. */
  4125. + exit(0);
  4126. +}
  4127. +
  4128. Index: gcc/testsuite/gcc.dg/short-compare-1.c
  4129. ===================================================================
  4130. RCS file: gcc/testsuite/gcc.dg/short-compare-1.c
  4131. diff -N gcc/testsuite/gcc.dg/short-compare-1.c
  4132. --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
  4133. +++ gcc/gcc/testsuite/gcc.dg/short-compare-1.c 18 Jan 2005 08:39:29 -0000 1.1.4.1
  4134. @@ -0,0 +1,21 @@
  4135. +/* PR rtl-optimization/19296 */
  4136. +/* Origin: Falk Hueffner <falk@debian.org> */
  4137. +
  4138. +/* { dg-do run } */
  4139. +/* { dg-options "-O" } */
  4140. +/* { dg-options "-O -mcpu=i686" { target i?86-*-* } } */
  4141. +/* { dg-options "-O -m32 -mcpu=i686" { target x86_64-*-* } } */
  4142. +
  4143. +extern void abort(void);
  4144. +
  4145. +void f(unsigned short ad)
  4146. +{
  4147. + if (ad >= 0x4000 && ad < 0xc000)
  4148. + abort();
  4149. +}
  4150. +
  4151. +int main(void)
  4152. +{
  4153. + f(0xff00);
  4154. + return 0;
  4155. +}
  4156. Index: gcc/testsuite/gcc.dg/short-compare-2.c
  4157. ===================================================================
  4158. RCS file: gcc/testsuite/gcc.dg/short-compare-2.c
  4159. diff -N gcc/testsuite/gcc.dg/short-compare-2.c
  4160. --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
  4161. +++ gcc/gcc/testsuite/gcc.dg/short-compare-2.c 18 Jan 2005 08:39:29 -0000 1.1.4.1
  4162. @@ -0,0 +1,22 @@
  4163. +/* PR rtl-optimization/19296 */
  4164. +/* Origin: Falk Hueffner <falk@debian.org> */
  4165. +/* Testcase by Andrew Pinski <pinskia@gcc.gnu.org> */
  4166. +
  4167. +/* { dg-do run } */
  4168. +/* { dg-options "-O" } */
  4169. +/* { dg-options "-O -mcpu=i686" { target i?86-*-* } } */
  4170. +/* { dg-options "-O -m32 -mcpu=i686" { target x86_64-*-* } } */
  4171. +
  4172. +extern void abort();
  4173. +
  4174. +void f(unsigned short ad)
  4175. +{
  4176. + if ((short) (ad - 0x4000) >= 0)
  4177. + abort();
  4178. +}
  4179. +
  4180. +int main(void)
  4181. +{
  4182. + f(0xc000);
  4183. + return 0;
  4184. +}
  4185. Index: libstdc++-v3/ChangeLog
  4186. ===================================================================
  4187. RCS file: /cvs/gcc/gcc/libstdc++-v3/ChangeLog,v
  4188. retrieving revision 1.1464.2.192
  4189. retrieving revision 1.1464.2.195
  4190. diff -u -r1.1464.2.192 -r1.1464.2.195
  4191. --- gcc/libstdc++-v3/ChangeLog 30 Sep 2004 16:47:23 -0000 1.1464.2.192
  4192. +++ gcc/libstdc++-v3/ChangeLog 21 Jan 2005 23:52:45 -0000 1.1464.2.195
  4193. @@ -1,3 +1,18 @@
  4194. +2005-01-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
  4195. +
  4196. + PR libstdc++/19510
  4197. + * include/bits/stl_list.h (_List_iterator_base): Initialize _M_node
  4198. + in constructor.
  4199. + (_List_iterator): Initialize _List_iterator_base in constructor.
  4200. + * include/bits/stl_tree.h (_Rb_tree_iterator): Initialize _M_node
  4201. + in constructor.
  4202. +
  4203. +2004-12-03 Richard Henderson <rth@redhat.com>
  4204. +
  4205. + PR 17856
  4206. + * config/cpu/i486/atomicity.h (__exchange_and_add, __atomic_add):
  4207. + Split in-out memory constraints.
  4208. +
  4209. 2004-09-30 Release Manager
  4210. * GCC 3.3.5 Released.
  4211. Index: libstdc++-v3/config/cpu/i486/atomicity.h
  4212. ===================================================================
  4213. RCS file: /cvs/gcc/gcc/libstdc++-v3/config/cpu/i486/atomicity.h,v
  4214. retrieving revision 1.1.22.1
  4215. retrieving revision 1.1.22.2
  4216. diff -u -r1.1.22.1 -r1.1.22.2
  4217. --- gcc/libstdc++-v3/config/cpu/i486/atomicity.h 2 Jun 2003 18:48:52 -0000 1.1.22.1
  4218. +++ gcc/libstdc++-v3/config/cpu/i486/atomicity.h 3 Dec 2004 23:44:07 -0000 1.1.22.2
  4219. @@ -1,6 +1,6 @@
  4220. // Low-level functions for atomic operations: x86, x >= 4 version -*- C++ -*-
  4221. -// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
  4222. +// Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
  4223. //
  4224. // This file is part of the GNU ISO C++ Library. This library is free
  4225. // software; you can redistribute it and/or modify it under the
  4226. @@ -38,8 +38,8 @@
  4227. {
  4228. register _Atomic_word __result;
  4229. __asm__ __volatile__ ("lock; xadd{l} {%0,%1|%1,%0}"
  4230. - : "=r" (__result), "+m" (*__mem)
  4231. - : "0" (__val)
  4232. + : "=r" (__result), "=m" (*__mem)
  4233. + : "0" (__val), "m"(*__mem)
  4234. : "memory");
  4235. return __result;
  4236. }
  4237. @@ -49,7 +49,9 @@
  4238. __atomic_add (volatile _Atomic_word* __mem, int __val)
  4239. {
  4240. __asm__ __volatile__ ("lock; add{l} {%1,%0|%0,%1}"
  4241. - : "+m" (*__mem) : "ir" (__val) : "memory");
  4242. + : "=m" (*__mem)
  4243. + : "ir" (__val), "m"(*__mem)
  4244. + : "memory");
  4245. }
  4246. #endif /* atomicity.h */
  4247. Index: libstdc++-v3/include/bits/c++config
  4248. ===================================================================
  4249. RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/c++config,v
  4250. retrieving revision 1.574.2.657
  4251. retrieving revision 1.574.2.779
  4252. diff -u -r1.574.2.657 -r1.574.2.779
  4253. --- gcc/libstdc++-v3/include/bits/c++config 30 Sep 2004 00:16:09 -0000 1.574.2.657
  4254. +++ gcc/libstdc++-v3/include/bits/c++config 30 Jan 2005 00:16:14 -0000 1.574.2.779
  4255. @@ -35,7 +35,7 @@
  4256. #include <bits/os_defines.h>
  4257. // The current version of the C++ library in compressed ISO date format.
  4258. -#define __GLIBCPP__ 20040930
  4259. +#define __GLIBCPP__ 20050130
  4260. // This is necessary until GCC supports separate template compilation.
  4261. #define _GLIBCPP_NO_TEMPLATE_EXPORT 1
  4262. Index: libstdc++-v3/include/bits/stl_list.h
  4263. ===================================================================
  4264. RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/stl_list.h,v
  4265. retrieving revision 1.20
  4266. retrieving revision 1.20.8.1
  4267. diff -u -r1.20 -r1.20.8.1
  4268. --- gcc/libstdc++-v3/include/bits/stl_list.h 10 Sep 2002 23:19:10 -0000 1.20
  4269. +++ gcc/libstdc++-v3/include/bits/stl_list.h 21 Jan 2005 23:52:48 -0000 1.20.8.1
  4270. @@ -1,6 +1,6 @@
  4271. // List implementation -*- C++ -*-
  4272. -// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
  4273. +// Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
  4274. //
  4275. // This file is part of the GNU ISO C++ Library. This library is free
  4276. // software; you can redistribute it and/or modify it under the
  4277. @@ -108,6 +108,7 @@
  4278. { }
  4279. _List_iterator_base()
  4280. + : _M_node()
  4281. { }
  4282. /// Walk the %list forward.
  4283. @@ -156,6 +157,7 @@
  4284. { }
  4285. _List_iterator()
  4286. + : _List_iterator_base()
  4287. { }
  4288. _List_iterator(const iterator& __x)
  4289. Index: libstdc++-v3/include/bits/stl_tree.h
  4290. ===================================================================
  4291. RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/stl_tree.h,v
  4292. retrieving revision 1.17
  4293. retrieving revision 1.17.2.1
  4294. diff -u -r1.17 -r1.17.2.1
  4295. --- gcc/libstdc++-v3/include/bits/stl_tree.h 22 Nov 2002 18:53:53 -0000 1.17
  4296. +++ gcc/libstdc++-v3/include/bits/stl_tree.h 21 Jan 2005 23:52:49 -0000 1.17.2.1
  4297. @@ -1,6 +1,6 @@
  4298. // RB tree implementation -*- C++ -*-
  4299. -// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
  4300. +// Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
  4301. //
  4302. // This file is part of the GNU ISO C++ Library. This library is free
  4303. // software; you can redistribute it and/or modify it under the
  4304. @@ -191,7 +191,7 @@
  4305. typedef _Rb_tree_iterator<_Val, _Ref, _Ptr> _Self;
  4306. typedef _Rb_tree_node<_Val>* _Link_type;
  4307. - _Rb_tree_iterator() {}
  4308. + _Rb_tree_iterator() { _M_node = 0; }
  4309. _Rb_tree_iterator(_Link_type __x) { _M_node = __x; }
  4310. _Rb_tree_iterator(const iterator& __it) { _M_node = __it._M_node; }